0
votes

After I update main.m file using MCEAppDelegate replace with AppDelegate class. When i try to login via Facebook or Google, after logged in, it's not call-back to this method.

(BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {} Could you help to check. Here's the document I follow to intergration with IBM, my project written by Objective-C https://developer.ibm.com/customer-engagement/tutorials/configuring-basic-push-services-for-ios-apps/#tocstep1

1

1 Answers

0
votes

This may be because AppDelegate is no longer the delegate of the application for UIApplication, but you can continue to access your AppDelegate thanks to a property declared in MCEAppDelegate, called appDelegate, which gives access to everything previously accessed directly in AppDelegate. It has been declared as follows in MCEAppDelegate:

@property (readonly) id<UIApplicationDelegate> appDelegate;

This is the swift code that I use to access to AppDelegate. I am using IBMMobilePush framework in Swift, I am sorry for the inconvenience.

What was previously accessed with:

UIApplication.shared.delegate as? AppDelegate

Now it is accessed as follows:

(UIApplication.shared.delegate as? MCEAppDelegate)?.appDelegate as? AppDelegate

I hope this can help you.