IMS SDK Product Document
  • Getting Started
    • iOS
      • Requirements
      • Importing the SDK
      • Permissions
      • Initializing the SDK
      • Using the SDK
        • Using Push Notifications
          • Push notification certificate and profile creation guide
    • Android
      • Requirements
      • Import the SDK
      • Permissions
      • Obfuscation
      • Initialize the SDK
      • Using the SDK
        • Trip Detection and Recording
          • Trip Manager Configuration
            • Using TripDetector.AWARENESS
            • Trip Manager Device Support
          • Trip Manager Control
          • Trip Manager Status
        • Bluetooth and Other Devices
    • React Native
      • Requirements
      • Import the SDK
      • Permissions
      • Initialize the SDK
        • Android
        • iOS
      • Using the SDK
        • Trip Manager
        • Device service
    • Flutter
      • Requirements
      • Import the SDK
      • Permissions
      • Initialize the SDK
      • Using the SDK
  • Security
  • App misuse
  • Time Driven Without Phone
  • DriveSync Portal
    • Requirement
    • User
    • Device
    • Driving Alert
    • Push Notification
    • Invitations
    • Subscription
    • Trip
    • Location
    • Driving Summary
    • Discount
    • Scoring
    • Vehicle
    • Leaderboard
    • Rewards
    • Submit consent to EULA
    • Legal documents and FAQ
    • Named Driver
    • Wedge
  • Known Issues
    • iOS
    • Android
      • 1.17.0
      • 1.18.0
      • 1.22.0
  • Releases
    • 1.13.0
      • iOS
      • Android
    • 1.14.0
      • Android
    • 1.15.0
      • iOS
      • Android
    • 1.15.1
    • 1.16.0
      • iOS
      • Android
    • 1.17.0
      • iOS
      • Android
    • 1.18
      • iOS
      • Android
    • 1.18.1
    • 1.19.0
      • iOS
      • Android
    • 1.20.0
      • Android
      • iOS
    • 1.21.0
      • Android
      • iOS
    • 1.22.0
      • Android
      • iOS
    • 1.23.0
      • Android
      • iOS
    • 1.24.0
      • Android
      • iOS
    • 1.24.1
      • iOS
  • Migration
    • iOS
      • 1.15.x -> 1.16.0
      • 1.16.0 -> 1.17.0
      • 1.17.0 -> 1.18.0
      • 1.18.0 -> 1.19.0
      • 1.19.0 -> 1.20.0
      • 1.20.0 -> 1.21.0
      • 1.21.0 -> 1.22.0
      • 1.22.0 -> 1.23.0
      • 1.23.0 -> 1.24.0
      • 1.24.0 -> 1.24.1
    • Android
      • 1.15.x -> 1.16
      • 1.16 -> 1.17
      • 1.17 -> 1.18
      • 1.18 -> 1.19
      • 1.19 -> 1.20
      • 1.20 -> 1.21
      • 1.21 -> 1.22
      • 1.22 -> 1.23
      • 1.23 -> 1.24
  • Support
Powered by GitBook
On this page
  • Steps to follow for using the push notifications for phone only trip detection
  • App needs to create the push notification certificate with Apple app store connect.
  • After successful submission of certificate, system will create a unique device token for the respective device
  • The device token needs to be passed to SDK using the PushNotificationService to set the token on DriveSync and the device will be registered to receive push notification from DriveSync.
  • Once the device token is set to DriveSync, the server will be sending silent push notifications to wake up the app in the background and to improve trip detection.
  • Required permissions
  1. Getting Started
  2. iOS
  3. Using the SDK

Using Push Notifications

Starting with SDK v1.17 the SDK requires a server upgrade in case you are migrating from a previous version (you need to contact IMS for that) and the server requires push notification capabilities.

Steps to follow for using the push notifications for phone only trip detection

App needs to create the push notification certificate with Apple app store connect.

The guide for creating the push notification certificate+profile and how to export the certificate as a .p12 file can be found here.

After successful submission of certificate, system will create a unique device token for the respective device

Note: Helpful system apis to verify if the registration of remote push notification is successful or not.

These two functions should be in AppDelegate.swift file in order to verify the registration of remote push notifications

func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
    let deviceTokenString = deviceToken.reduce("", {$0 + String(format: "%02X", $1)})
    debugPrint("DEVICE TOKEN -> \(deviceTokenString)")
    // pass the device token to the SDK PushNotificationService
}

func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) {
    // indicates registration failed
}

The device token needs to be passed to SDK using the PushNotificationService to set the token on DriveSync and the device will be registered to receive push notification from DriveSync.

Upon successful registration of device token, the token can be passed to the SDK PushNotificationService to set the token on DriveSync.

Once the device token is set to DriveSync, the server will be sending silent push notifications to wake up the app in the background and to improve trip detection.

No steps are required on the host app upon receiving silent push notifications except making sure the required permissions are there to facilitate the feature.

Required permissions

  • Allow push notification permission

    • Will be asked during onboarding

  • Background app refresh permission

    • Needs to be checked in info.plist of the host app

PreviousUsing the SDKNextPush notification certificate and profile creation guide

Last updated 3 months ago

Please refer to this for using the service.

page