cannot find interface declaration for 'NSObject', superclass of 'GPXType'

18.5k views Asked by At

I have done some research on that issue , but I have not found anything similar just yet.

I am using iOS GPX framework to draw the path on map using GPX file. I have import iOS GPX.framework on my project. but I have face an issue.

Please Guide me, If anyone has any advice...

enter image description here

3

There are 3 answers

0
Rahul Saini On BEST ANSWER

Finally I have solved my problem

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

Thanks so much Guys.

4
l0gg3r On

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

#import <Foundation/Foundation.h>

Seems they thought that you will have a PCH file, where Foundation and UIKit will be imported, but Xcode 6 removed PCH default support, so the problem came. (See my previous answer)

0
Ondrej Rafaj On

You haven't imported the header file #import ...

When compiling for both iOS and OsX, I had similar issue that I have resolved by importing TargetConditionals.h. The final thing looks like this:

#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