OpenBack can be fully configured from your application
Info.plist or from a separate file named
OpenBack.plist. The plist configurations are optional and the default values will be used. The library will pick the settings from
Info.plist first if the
OpenBack dictionary key exists. It will fallback to using
Available configuration keys:
|AppCode||-||The OpenBack app code for your application|
|AppGroup||-||The app group used for OpenBack and notification app extenstions|
|DebugLevel1||0||The debug log level - see debug levels|
|EnableAutoStart2||true||Controls if OpenBack starts automatically|
|ClearBadgeCount5||false||Controls if OpenBack clears the badge number when app is opened (only if badge is enabled)|
|EnableCoreMotionActivity||false||Controls if library can use Core Motion Activity manager.|
|EnableMicrophone||false||Controls if OpenBack can use the microphone (noise trigger)|
|EnableProximity3||false||Controls if OpenBack can use the proximity sensor (proximity trigger)|
|EnableSwizzle4||true||Controls if swizzle is enabled|
|LargeIcon||-||Default large icon for notification (filename in main bundle or image asset name)|
|NotificationSound||-||Set the default notification sound (filename in main bundle)|
- : Using the debug level in the plist during development can be useful to get startup logs that might occur before you have a chance to call the API.
- : If you disable auto-start, you will need to manually call `+ start:` in your application.
- : Enabling proximity on iOS has the side effect of turning the screen off when the device is close to the face.
- : If you disable delegate swizzling, you will need to manually call OpenBack functions. See below for more details.
- : If you enable clearing the badge count on app launch, the SDK will set the badge count to 0 but keep the notifications in the notification center. This is done by setting the `applicationIconBadgeNumber` to -1. Setting a value of 0 would have the side effect of removing all the delivered notifications.
You can override some settings (AppCode, DebugLevel, EnableAutoStart) using the API. The API settings will take precedence.
Be default, OpenBack swizzles some methods in order to intercept system calls related to notifications. The goal is to simplify integration so you do not need to add more code to your application.
There are no side effects to your project but if you are using other 3rd party library that also swizzle classes, you might see some issues. We test our SDK with the most common SDKs like Firebase, Facebook, etc... to make ensure everything works as expected.
If you prefer to avoid OpenBack using swizzle, set the
EnableSwizzle key in the plist to
false. You must then call a few OpenBack functions so it can run properly.
These functions are listed in the public headers:
OpenBackAppDelegate.h header for the functions
Here is an example of an application delegate with all the required calls: