Reputation: 1489
I have set up a method in a separate class (called ExternalClass) that needs to take two arguments.
-(void) openImage:(NSDictionary *)payload InApp:(UIApplication *)app;
In my AppDelegate.m, I call the method like this:
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)payload fetchCompletionHandler (void (^)(UIBackgroundFetchResult))completionHandler
{
[[ExternalClass sharedInstance] openImage:payload InApp:application];
}
I am getting "No visible @interface for ExternalClass declares the selector 'openImage:InApp'
Any idea why?
Upvotes: 0
Views: 3103
Reputation: 1489
Okay, I'm trying to create a framework and use it in my app. It turns out none of the changes I made to any my framework methods were being reflected in my app. Thank you guys for pointing me in the right direction.
Upvotes: 0
Reputation: 14504
I think you forgot to declare this method in header(.h) file.
Declare this method in ExternalClass.h
file.
-(void) openImage:(NSDictionary *)payload InApp:(UIApplication *)app;
And import this ExternalClass.h
, where you want to use this method.
Upvotes: 2