Skip to content

Permissions & Background Modes Guide

Optional Permissions

The messages may use a variety of message triggers and some require permission from the user. It is important to understand how permissions work and their impact on the OpenBack platform. When OpenBack is installed in an application, OpenBack swizzle a few methods of the application delegate to handle system events in order to run the message checks. The more often the application runs, the more often the message triggers are checked.

Message Trigger - User Permission Matrix

Trigger Location Microphone Motion Coproc
Time - - -
Location - -
Other Apps1 - - -
Connectivity - - -
Power - - -
Brightness - - -
Weather - - -
Activity2 -
Roaming - - -
Memory - - -
Mobile Operator - - -
Signal - - -
Headphones - - -
Noise - -
Proximity - - -
Volume - - -
Aeroplane - - -
Locale - - -
Device - - -
Orientation - - -
Idle - - -
Beacons - -
Custom App - - -

1 See Application URL Schemes

2 The Activity trigger works using either location updates or motion coprocessor. If only location is used, activity will be calculated from a sample of speed data and unless you enable Location updates in the Background Modes, activity will not be available in the background.

Local Notifications Permission

Required to display notifications when the application is in the background.

It is likely that the majority of messages are triggered while your application is in the backbround. It is therefore very important to get the user's permission to display Alert Notifications. When the application is active, OpenBack can also deduce the current activity (still, walking...) from the location samples.

Location Permission

Required for Location Trigger, Beacon Trigger, and Activity Trigger unless the application enables Motion Coprocessor Permission.

If messages using user location will be used, the Always location permission needs to be enabled. It allows OpenBack to handle significant location changes that can be used to wake up the application in the background even after it was swipe closed (force kill). If a user swipe closes the application and doesn't go anywhere far enough to trigger a significant location change, the application will not re-start and OpenBack will not be able to check the messages. Traditional dumb push notifications aren't ever received after a force kill.

When using significant location change, iOS will likely display an alert after a few days to inform users that your application has been using location in the background.

![URL Schemes][locationbg]

Motion Coprocessor Permission

Required for Activity Trigger unless the application enabled Location Permission

For the activity trigger, OpenBack can use either location or motion coprocessor. The motion coprocessor is more accurate but requires another user permission. You will need to balance the permissions versus the messages you intend to run and the desired accuracy of the data.

Microphone Permission

Required for Noise Trigger messages.

It works by analyzing recording samples on the fly but none of the data is stored anywhere (going to /dev/null). Asking for the microphone permission may cause users to question the need for it, so OpenBack only recommends using this trigger for specific and useful scenarios for the user. Typically, unless the application already uses the micophone, we don't recommend you use noise trigger on iOS.

Background Modes

Location Updates

If very precise location triggers are required for messages when the application is in the background, select Location Updates in Background Modes. Although significant location changes are usually sufficient, extra accuracy may be required. It should be explained to users why background location in the App Description when submitting your applications in Itunes Connect - Apple recommends the following statement in the App description - "Continued use of GPS running in the background can dramatically decrease battery life." and may reject the app during review if it is not included and location updates are setup.

Background Fetch

There is no visual permission request to users to allow background fetch but users can turn it off in the application settings. When selected, the system will wake up the application once in a while to go fetch new data. It allows OpenBack to run a little more often when in the background and also cehck for updated messages.

Remote Notifications

The message campaign manager uses silent push notifications to inform the OpenBack SDK that an update is available. For example, when a new messages is added or updated, OpenBack sends a silent push so the OpenBack SDK fetchs new messages or when a timed message needs to be triggered more precisely. Thankfully these silent push notifications do not require any user permissions but similar to dumb push notifications, only works when the application is either in the foreground or the background. Once the user force close the application, a silent push is not received.

Audio

If the Noise trigger is going to be used when your application is in the background, select Audio and AirPlay in Background Modes. Unless the application already has this for background audio recording.