Last updated: Dec 12 2018
This topic describes how to integrate your iOS app for receiving push messages via Episerver Campaign. It also includes access to the Software Developer Kit (SDK) and documentation to receive required code components for integration into your app.
See Mobile Push how to set up required mobile push components before you start developing.
- iOS version 8.0 or higher.
Register with Firebase Cloud Messaging (FCM)
- Open the Firebase console and log in using your Google account.
- Click Add project and create a new project for the app.
- Click Settings and then Project settings.
- Open the Cloud Messaging tab and note the Legacy server key and sender ID for passing to Episerver Campaign.
- Click Settings and then Users and permissions.
- In the navigation on the left-hand side, click Service accounts.
- At the top of the navigation, click + CREATE SERVICE ACCOUNT.
- Enter the name of the service account and provide an optional service account ID.
- Select Furnish a new private key and activate the JSON option.
- Click Create and save the generated JSON file. The new service account appears in the overview along with the key ID.
Download the following for iOS:
- SDK for iOS (executable JAR file in a zip file) - Version 1.0.
- SDK documentation for iOS (zip file).
Integrate iOS SDK
- Log in to FCM with your Google Developer account.
- Download the GoogleService-Info.plist with the iOS onfiguration for FCM.
- Add the iOS source code including dependencies (see Install iOS source code).
- In -application:didFinishLaunchingWithOptions:, create an instance of OPPushClient with the package name and authorization token which you received from customer support.
- Call up required -application* methods, which are specified in OPPushClient.h header by your app delegate.
Note: Use userinfo in the app delegate -application:didReceiveRemoteNotification* methods to process incoming messages.
Install iOS source code
- In your Podfile, enter the following extension, according to the cocoapods.org rules:
pod 'Google/CloudMessaging', '~> 1.1.0'
- Add the iOS source code to your project.