ibm-bluemix-mobile-services/bms-clientsdk-cordova-plugin-push

Code snippets error in document

Closed this issue · 1 comments

In the readme file, this method is:
// Handle receiving a remote notification on launch
// Handle receiving a remote notification on launch

  • (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions {

    if (launchOptions != nil) {
    [[CDVBMSPush sharedInstance] didReceiveRemoteNotificationOnLaunchWithLaunchOptions:launchOptions];
    }}

Actually It should be:
// Handle receiving a remote notification on launch

  • (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
    {
    self.viewController = [[MainViewController alloc] init];
    if (launchOptions != nil) {
    [[CDVBMSPush sharedInstance] didReceiveRemoteNotificationOnLaunchWithLaunchOptions:launchOptions];
    }
    return [super application:application didFinishLaunchingWithOptions:launchOptions];
    }

Fixed 💯