iOS Certificate Setting Guide
Create the application ID
- Go to the Apple Developer website to access the developer account.
- Go to the Certificates, IDs & Profiles page from the left side of the developer account page.
- Create an App ID and fill in the NAME of the App ID and Bundle ID (skip this step if the ID already exists).
Note: Specify the Bundle ID and do not use wildcards.
- Enable Push Notification for the App. If an App ID has been created, you can also enable the Push Notification function by setting it.
- After filling in the above properties, click "Continue" to confirm the correctness of the AppId property and click "Register" to register the AppId successfully.
Configure two authentication modes
The authentication information of EngageLab website application, once configured, can only be updated with the same bundleID authentication information and cannot be changed into other Bundleids. Please check the bundleID carefully before configuration. If you need to modify for special reasons, please contact technical support.
Method 1: Using the.p12 certificate authentication
- If you have not created a Push certificate before or want to create a new one, create a new one below the certificate list.
- Select the APNs certificate type when creating a certificate. As shown in the figure, there are two APNs certificates: Development and Production.
Note: The development certificate is used for development and debugging; The production certificate can be used for development debugging as well as product release. Here we use the production certificate as an example.
- It can be used in development stage
- It can be used in both development and production
- Click "Continue", then select the AppID to which the certificate is to be bound.
- Clicking "Continue" will allow you to upload the CSR file. (The CSR file will be created in the next step)
- Open the KeychainAccess of the system to create a Certificate Signing Request. Operation as shown below:
- Enter user Email and Common Name, and select Save to Disk. The certificate file extension is.certsigningRequest.
- Go back to the CSR upload page in your browser and upload the file you just generated with the suffix.certsigningRequest.
- After the certificate is successfully generated, click the "Download" button to download the certificate. The certificate is a.cer file.
- Double-click the certificate and it will be opened in KeychainAccess. Select "Login" in the left "Keychain" list and "My Certificate" in the "Kinds" list to find the certificate you just downloaded and export it as a.p12 file. The diagram below:
- In EngageLab console, go to iOS Authentication in your app Settings and select "iOS Certificate Configuration" and upload the exported.p12 certificate. EngageLab will authenticate your app in the background.
- Apple's production push certificate allows for the push of the development environment. If you select "use the production certificate for the development environment", developers can upload the production certificate only and select the development environment from the official website push platform for the push, instead of regenerating and uploading the development certificate.
Method 2: Use the APNs Auth Key for authentication
- Click "All" in the left list of "Keys" to check whether there is an auth key in the account; if not, click "+" to create a new one.
- Fill in the description of the key and select the service, as shown below. (Note: It works in both development and production environments and does not expire.)
- Click "Continue" to confirm the information and then "Confirm" to download the key. (Note: Make a note of the key id, and it can only be downloaded once, please keep it safe.)
- Get the Bundle ID of the app you created earlier
- Get the Team ID from the Membership page of the developer account
- In EngageLab console, enter your app's App Settings iOS Authentication select "Token Authentication Configuration", upload the APNs Auth Key file and fill in your KEY ID, Team ID, And specify the Bundle ID of the application. EngageLab will authenticate your app in the background.
Provisioning Profile creation
- Before creating a Provisioning Profile, an App ID of the Bundle ID used by the application to be published has been created on the Apple Developer website and an iOS Development certificate has been created for the App ID.
- Click the button below on the Apple Developer Account Provisioning Profile page to create a Provisioning Profile
- Click [Continue] after selecting the environment for the Provisioning Profile:
provisioning profile for iOS Development environment Production environment provisioning profile 3. Provisioning Profile 3. Production environment provisioning profile for the live AppStore
- Select the App ID for creating a Provisioning Profile and click [Continue] :
- For convenience, Select [Select All] and click [Continue] to proceed to the next step: (Multiple developer certificates are created here. It is recommended to create only one for easy management.)
- For the Provisioning Profile, Select the device to be installed (Select All) and click [Continue]:
- Provide the Provisioning Profile with a Profile Name and click on [generate].
- After filling in the Profile Name, click on [generate] to complete the creation and click on [DownLoad] to download the Provisioning Profile
- Double-click the downloaded Provisioning Profile and add it to xcode.
Certificate configuration tutorial for XCode
Refer to 【iOS SDK Integration Guide】 to integrate the MTPush SDK and upload the p12 certificate used in the push. Before compiling and running, configure the certificate. The steps are as follows:
- Open the Bundle identifier entry in xxx-info.plist and enter the bundle id uploaded to the EngageLab console:
- Click the project, select the target to enter the Build Setting screen, search for "Code signing", and configure according to the following figure
- Select the master certificate you selected when creating the provison Profile.
- Select the previously created provison Profile