To use all the potential of the iOS
SDK, some additionnal integration step needs to be done.
- XCode 8
- iOS 8 and higher.
Configure push notifications
Push notifications allow an app that isn’t running in the foreground to notify the user when it has information for them. Push notifications originate from a notification server that you manage and are pushed to your app on a user’s device by the Apple Push Notification service (APNs).
First, you enable push notifications in the Xamarin project.
After you enable push notifications, generate and export a TLS certificate.
Enable push notifications
Please ensure that in the Entitlements.plist file, your Push Notifications entitlement is checked.
Creating and using certificates
Please follow this Xamarin documentation link to learn how to create a certificate, associate it with a provisioning profile, and then get a Personal Information Exchange certificate.
Configure URL schemes
Creating an URL schemes
Deep Linking is becoming very important, it's a great way to enhance the effectiveness of you app's marketing campaigns.
It will allow you to open a specific view of your app from another app, from a push message, from an in-app message
or even from a website to your app.
To take advantage of it, you must create a custom URL Scheme associated with your application. A URL scheme lets you
communicate with other apps through a protocol that you define. To find out more, check out Apple documentation.
To register your URL Scheme:
- Open your Info.plist and select the Advanced tab.
- Click Add URL Type in the URL Types expander.
- In URL Schemes field, enter your_app_url_scheme.
- Assign a unique identifier to the scheme to ensure uniqueness and avoid name collisions, so we'll use com.myapp.url for the example.
To verify that everything works:
- Run your app.
- Open Safari on the same device.
Type your_app_url_scheme:// in the address bar, then press Go.
Whitelisting URL Schemes
Like ATS, iOS 9 introduces changes that impact URL Scheme management. For more details, you can consult Apple's documentation.
Make sure that your application Info.plist includes the LSApplicationQueriesSchemes set with the Log App's URL scheme.
Configure logging application
Accengage provide an application to help your team to identify for sure their device profile among the others, which is helpful for push notifications tests. It also allows our technical team to properly investigate in case of unexpected behavior. We strongly recommend it.
This configuration is mandatory if Accengage teams need to test the SDK integration.
In order to be able to use our application, you will need to:
- add the scheme bma4sreceiver to the schemes whitelist as explained in the previous section.
- add a localhost exception to the App Transport Security key in your info.plist.
Enabling console logs
For diagnostic purposes, the library contains an option that turns on logging. These logs allow you to gain more insight on the library's integration and ensure it's working as expected. These logs can also be helpful for support staff who are troubleshooting problems.
First, get an empty configuration file to add to your project from this link.
Drag the AccengageConfig.plist file you just downloaded into the root of your Xamarin iOS project and add it to all targets then complete it with your own partner id and private key.
Right-click the file and set Build Action to BundleRessource.
Now you're ready to begin implementing. Start the library in your AppDelegate FinishedLaunching method. From version 1.2.0 of the plugin, several ways to manager SDK starting are available depending on whether you need to use features related to GDPR. If you need more details, please refer to iOS native documentation.
If you plan to start the SDK using GDPR related features, data collection is disabled by default. Data collection is mandatory to use most of the SDK features. If you need it, you have to enable it explicitly.
Plugin 1.2.0 also brings features related to geolocation optin.