Generating an APNS Certificate
This section will guide you on how to generate an APNS certificate.
Why is this step required?
In iOS, the server passes messages to the client via the Apple Push Notification Service (APNS). When doing so in order to establish a secure connection between the EMM and the APNS server, a client SSL certificate needs to be generated and downloaded from Apple Inc. This APNS certificate is used to send an awake message to the iOS agent application.
Prerequisites
- You have to be enrolled in the Apple Developer Program as an individual or organization before starting the iOS server configurations.
- A valid distribution certificates that you obtained from Apple.
Follow the steps given below:
Clone the
emm-agent-ios
repository to a preferred location.git clone https://github.com/wso2/emm-agent-ios
- Open the
emm-agent-ios
from X-Code and follow the subsequent steps:- Change the
org.wso2.carbon.emm.ios.agent
Bundle Identifier so that it matches your organization details.
Example:org.<ORGANIZATION_NAME>.emm.ios.agent
Select the development team, provisioning profile and sign certificate from Xcode.
If you are unsure of how to select the development team, or add the provisioning profile or sign the certificate via Xcode, see the blog post on How to export “in-house” developed iOS app as an enterprise application.
- Change the
Login to the Apple Developer program and follow the subsequent steps:
Before you follow the steps, confirm that your machine is connected to the Internet and that Xcode has a valid developer account.
- Navigate to Certificates, IDs & Profiles that is under Identifiers.
- Click App IDs and see if the Bundle ID that you defined under Xcode is listed here.
- Click the Bundle ID, and click Edit.
- Creating an APNs SSL certificate:
- Select Push Notifications to enable the setting.
Once push notification is enabled, you are able to generate the development and production certificates. - To try out the create certificate use case, let's create a development SSL certificate.
Please note that the development SSL certificate is created only as an example. You can create a production SSL certificate if you have registered with the Apple Developer Program as an Organization.
Click Create Certificate that is under Development SSL Certificate.
- Select Push Notifications to enable the setting.
- Creating a CSR file using the keychain access tool in the Mac OS:
- Launch the keychain access application.
- On the menu bar click KeyChain Access > Certificate Assistant > Request a Certificate from Certificate Authority.
- Define the email address, common name, select Saved to disk, and click Continue.
Example:
- Go back to the Apple Developer Portal, upload the generated certificate, and click Continue.
- Exporting the certificate to the
pfx
format.- Click Download to download the file.
- Double-click the downloaded file to open it with the Keychain access tool.
- Right-click the certificate and select export.
- Define the location where you wish to save the file and set a password for the exported file when prompted.
- Rename the files
p12
extension topfx
.
- Click Download to download the file.
What's Next?
You need to configure WSO2 EMM with the iOS features by installing the P2 repository and configuring the server side settings. For more information, see iOS Server Configurations.