Platform-Specific Steps to Integrate the OneSpan Notification SDK
Depending on your platform, you need to complete additional platform-specific steps when you integrate the OneSpan Notification SDK.
Enable Push Notification in a Google project
OneSpan proposes two solutions to enable Push Notification Push notifications are clickable pop-up messages that are displayed outside an app. They are pushed from the server the app uses to the user's device. on Android. To connect to Firebase Cloud Messaging (FCM), you can use one of the following:
-
Android project key
-
Google services account.
After the connection is set, you can migrate the server- and client sides of your project to FCM.
To get the Android project key
-
In the Firebase console (https://console.firebase.google.com), import your Google project.
- From the project settings, retrieve the server key for cloud messaging.
- Use this server key for the content of the Android project key.
- Use the sender ID in your mobile application (ANDROID_PROJECT_NUMBER constant in the Android sample).
For more information about the creation and import of projects in the Firebase console, refer to the Firebase documentation at https://firebase.google.com/docs.
To get a google-services.json file
-
In the Firebase console (https://console.firebase.google.com), import your Google project.
- Download the google-services.json file; this file should replace the existing configuration file in the SDK sample.
To migrate from Google Cloud Messaging (GCM) to Firebase Cloud Messaging with the Notification SDK
- Migrate the server-side of your project.
This step is required to comply with Google's announcement about the end of life for Google Cloud Messaging (GCM) as of April 2019. When you update the Notification SDK, the applications that are enabled for GCM as well as the future mobile application can be notified. The Firebase server-side can handle both identifier types.
If you still have a legacy server key in your old project, it can be used but we recommend using the server key available on FCM.
- The server-side can be migrated with the previous settings. You can use either the Android project key or the Firebase service account credentials mechanism.
The Firebase service account credentials option allows an OAuth connection to the Firebase back end.
- The server-side can be migrated with the previous settings. You can use either the Android project key or the Firebase service account credentials mechanism.
- Migrate the client-side of your project.
This step is necessary for a complete migration to Firebase Cloud Messaging (FCM). When you update the mobile application, the previous version will still work and receive notifications with the updated server library.
Enable Push Notification in an iOS project with token-based authentication scheme
With the token-based authentication scheme, a private key is used to authenticate to the Apple Push Notification Service. It is simpler to use this authentication scheme because:
- The same key can be used for development and production apps.
- The same key can be used for all your apps as referenced in your Apple developer account.
- The key does not expire.
To use the Push Notification feature in your iOS application with a token-based authentication scheme
-
Connect to your Apple Developer Account (https://developer.apple.com/account).
- Select Certificate, IDs & Profiles and Keys (https://developer.apple.com/account/ios/authkey).
- Select the APNs check box to create a new key.
-
Download the key and store it in a secure location.
Enable Push Notification in an iOS project with certificate-based authentication scheme
To use the Push Notification feature in your iOS application with a certificate-based authentication scheme
-
Connect to your Apple Developer Account (https://developer.apple.com/account).
- Locate or create your App ID that matches your bundle ID to enable the notification service. The bundle ID must be specific to your application (no wildcards are allowed for push notifications).
- Generate a client SSL certificate for the connection between your notification server and the Apple Push Notification Service.
You can work with separate client SSL certificates for development and production. When you use a development certificate, you must use the sandbox gateway.
- Verify that your provisioning profiles now include the Push Notification service.