Additional, platform-specific integration steps
  • 23 Oct 2024
  • 2 Minutes to read
  • Dark
    Light

Additional, platform-specific integration steps

  • Dark
    Light

Article summary

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 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

  1. In the Firebase console (https://console.firebase.google.com), import your Google project.

  2. From the project settings, retrieve the server key for cloud messaging.

  3. Use this server key for the content of the Android project key.

  4. 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

  1. 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.

  2. 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

  1. Connect to your Apple Developer Account (https://developer.apple.com/account).

  2. Select Certificate, IDs & Profiles and Keys (https://developer.apple.com/account/ios/authkey).

  3. Select the APNs check box to create a new key.

  4. 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

  1. Connect to your Apple Developer Account (https://developer.apple.com/account).

  2. 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).

  3. 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.

  4. Verify that your provisioning profiles now include the Push Notification service.


Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.
ESC

Ozzy, our interactive help assistant