Customizations
In this page we'll dive deeper into several aspects of our iOS library that can be customized to match your needs.
Setting keys in code
Instead of relying on the Application Key and Application Secret in Notificare.plist, it is possible to set these in code:
[[NotificarePushLib shared] setApiID:@"APP_KEY"];
[[NotificarePushLib shared] setApiSecret:@"APP_SECRET"];
NotificarePushLib.shared().apiID = "APP_KEY"
NotificarePushLib.shared().apiSecret = "APP_SECRET"
These methods should be called before instantiating our library, in order to make sure the correct keys are used.
Notifications UI
The Notificare.plist is used by the library for setup and customization. It allows you to change the colours of the notifications user interface. By default we provide a UI that might not match your app's look and feel and using the options below, you will be able to change that look & feel. Open you Notificare.plist and change the following properties if needed.
Localizable Texts
Our library ships with a default theme that can be customized if needed. Inside the DefaultTheme.bundle you will find several localizable folders that contain all the texts used in the library. Your free to change those texts to match your needs and even add new languages if needed.
Settings View
This feature of Notificare allows you to present the user with a built-in view where location and notifications can be turned off. It will also include a list of pre-defined device tags that the user is allowed to subscribe/unsubscribe. This creates a mechanism in your app that automatically categorize devices using the user input. To add pre-defined tags to this view simply open the file NotificareTags.plist that is included with the library and add/remove keys in the tags array like shown below:
Exclude PassKit Framework
For some apps it might not make sense to support Wallet. Because this support will be displayed automatically in the App Store, to prevent this you can add the following preprocessor flag in your release configuration. First search for Preprocessor Macros in your app's target Build Phases tab:
Then add set the property DO_NOT_USE_PASSKIT to 1 to the release configuration: