Utility Methods (iOS)

Explore the iOS utility methods related to location permissions.

Set DeviceToken

The Roam SDK is capable of sending push notifications to your users. Click here to get the device token.

func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {

Check Location Permission

Check if the location permissions for the app are enabled.


Location Permission Status

By using the locationPermissionStatus method you can check the location permission status.


notDetermined = 0

restricted = 1

denied = 2

authorizedAlways = 3

authorizedWhenInUse = 4

Request Location Permission

Application request for the user location.


Check Location Tracking

Check whether location tracking has started or not. This method returns a boolean value.


Notification Opened Handler

By using this method inside the Notification delegate method you can track the campaign's impressions and counts.

func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void)

Last updated