Cannot find interface declaration for "NSObject", superclass "GPXType"

I have done some research on this issue, but have not yet found anything.

I am using the iOS GPX infrastructure to draw a path on a map using a GPX file. I have an import of iOS GPX.framework in my project. but I ran into a problem.

Please guide me if anyone has any advice ...

enter image description here

+5
source share
3 answers

Finally, I solved my problem

I have import #import <UIKit / UIKit.h> and change my Xcode 6 $ architectures (ARCHS_STANDARD_32_BIT) .

Thanks a lot to the guys.

+2
source

Just change the header file, add this line on top of the file

#import <Foundation/Foundation.h> 

They seemed to think that you would have a PCH file where Foundation and UIKit would be imported, but Xcode 6 removed the default support for PCH, so the problem arose. (See previous answer)

+34
source

You did not import the #import header file ...

When compiling for iOS and OsX, I had a similar problem that I solved by importing TargetConditionals.h. The last thing is as follows:

 #import <TargetConditionals.h> #if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE #import <UIKit/UIKit.h> #elif TARGET_OS_MAC #import <Cocoa/Cocoa.h> #endif @interface MyClass : NSObject #if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE // Define UIKit methods #elif TARGET_OS_MAC // Define Cocoa methods #endif - (void)reloadRegisteredComponents; @end 
0
source

Source: https://habr.com/ru/post/1207780/


All Articles