You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 7, 2019. It is now read-only.
In the README.md and in the demo app, it first calls pushPlugin.register() then calls pushPlugin.registerUserNotificationSettings(). It seems like this is the reverse of the example in the Configuring Remote Notification Support (in the Obtaining a Device Token in iOS and tvOS section) of the Apple Docs.
self.updateMessage("Successfully registered for interactive push.");
},(err)=>{
self.updateMessage("Error registering for interactive push: "+JSON.stringify(err));
});
}
},(errorMessage: String)=>{
self.updateMessage(JSON.stringify(errorMessage));
});
}
Apple Sample Code:
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Configure the user interactions first.
self.configureUserInteractions()
// Register with APNs
UIApplication.shared.registerForRemoteNotifications()
}
It makes sense that you would want to setup the interactions first so that you don't run into a race condition trying to configure interactions before a notification comes in.
I'm totally new to mobile dev and just happened to be reading the Apple Docs to make sure I understood how this stuff works.
In the README.md and in the demo app, it first calls
pushPlugin.register()then callspushPlugin.registerUserNotificationSettings(). It seems like this is the reverse of the example in the Configuring Remote Notification Support (in the Obtaining a Device Token in iOS and tvOS section) of the Apple Docs.push-plugin/demo/app/main-view-model.ts
Lines 53 to 70 in a096afc
Apple Sample Code:
It makes sense that you would want to setup the interactions first so that you don't run into a race condition trying to configure interactions before a notification comes in.
I'm totally new to mobile dev and just happened to be reading the Apple Docs to make sure I understood how this stuff works.