The P2 repository contains the feature list required to enable iOS.
If you are on a Windows OS, be sure to point the -Dcarbon.home
property in the product's startup script (wso2server.bat
) to the product's distribution home (e.g.,
-Dcarbon.home=C:\Users\VM\Desktop\wso2iot-3.0.0
). Alternatively, you can also set the carbon.home
as a system property in Windows. Then, restart the server. Without this setting, you might not be able to install features through the management console.
Where do I get the P2 repository from?
After you obtained the signed CSR and submitted it, the WSO2 Account Managers will evaluate the CSR file you submitted. Once the evaluation process is complete, you will receive an email with the following:
- WSO2 MDM Connector for iOS
This contains the P2 repository with the iOS features, End User License Agreement (EULA) and theREADME.txt
file.
TheREADME.txt
includes the installation instructions and the URL to thecdmf-agent-ios
repository, which contains the agent source code. - The signed CSR file in the .plst format
If you failed the evaluation process or have your own signed certificate, fill the Contact Us form, select IoT as the area of interest, and request for the P2 repository, which is needed to configure WSO2 IoT Server for iOS.
Follow the instruction below to install the iOS features via the P2 repository you received via email:
Only start the core profile of the WSO2 IoT Server.
cd <IoT_HOME>/core/bin ./wso2server.sh
- Click Features on the Configure tab.
- Click Add Repository that is on the Repository Management tab to add the repository to the server.
- Fill out the Add Repository form and click Add.
Enter a preferred name for the repository as the Name.
Select the Location.
If the local option is selected for location, you need to provide the path to the current working directory.
Follow the steps below to retrieve the path:Unzip the
p2-repo.zip
file you received via email when obtaining the CSR file and navigate to the respective directory.cd <IOT_HOME>/p2-repo
Retrieve the output path of the current working directory.
pwd
Example output:
/Users/Documents/IoTS/p2-repo
Click the Available Features tab and select the respective repository, and click Find Features.
If the Group features by category is selected by default, deselect it before checking for the available features.
- Select the feature and click Install.
- Click Next.
Accept the license agreement and click Next to install the features.
Once the features are successfully installed, you will be prompted to click Restart Now and Restart Later.
Until you complete step 10 and 11 don't click Restart Now.
Update the following parameters in the
ios-config
.xml
file, which is in the<IoT_HOME>/core/repository/conf
directory:
Enter the server IP or the server domain name for the following parameters:iOSEnrollURL
iOSProfileURL
iOSCheckinURL
iOSServerURL
TokenURL
For example:
<?xml version="1.0" encoding="ISO-8859-1"?> <iOSEMMConfigurations> <!-- iOS MDM endpoint urls --> <iOSEnrollURL>https://10.10.10.253:8243/api/ios/v1.0/scep</iOSEnrollURL> <iOSProfileURL>https://10.10.10.253:8243/api/ios/v1.0/profile</iOSProfileURL> <iOSCheckinURL>https://10.10.10.253:8243/api/ios/v1.0/checkin</iOSCheckinURL> <iOSServerURL>https://10.10.10.253:8243/api/ios/v1.0/server</iOSServerURL> </iOSEMMConfigurations>
Open the
<IoTS_HOME>/core/repository/conf/iot-api-config.xml
file and replacelocalhost
with your IP or hostname.
For example:<ServerConfiguration> <!-- IoT server host name, this is referred from APIM gateway to call to IoT server for certificate validation--> <Hostname>https://10.10.10.253:9443/</Hostname> <!--End point to verify the certificate--> <VerificationEndpoint>https://10.10.10.253:9443/api/certificate-mgt/v1.0/admin/certificates/verify/</VerificationEndpoint> <!--Admin username/password - this is to use for oauth token generation--> <Username>admin</Username> <Password>admin</Password> <!--Dynamic client registration endpoint--> <DynamicClientRegistrationEndpoint>https://10.10.10.253:9443/dynamic-client-web/register</DynamicClientRegistrationEndpoint> <!--Oauth token endpoint--> <OauthTokenEndpoint>https://10.10.10.253:9443/oauth2/token</OauthTokenEndpoint> <APIS> <ContextPath>/services</ContextPath> </APIS> </ServerConfiguration>
Open the product's startup script based on your OS (i.e.,
wso2server.sh
for Linux/Solaris andwso2server.bat
for Windows), which is in the<IOT_HOME>/core/bin
directory and add the IP addresses.
For example:-Diot.core.host="10.10.10.253" \ -Diot.keymanager.host="10.10.10.253" \ -Diot.gateway.host="10.10.10.253" \
Uncomment the
APNSBasedPushNotificationProvider
that is under thePushNotificationProviders
configuration in the<IoT_HOME>/core/repository/conf/cdm-config.xml
file.
For example:<PushNotificationProviders> <Provider>org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.MQTTBasedPushNotificationProvider</Provider> <Provider>org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.XMPPBasedPushNotificationProvider</Provider> <Provider>org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.GCMBasedPushNotificationProvider</Provider> <!--<Provider>org.wso2.carbon.device.mgt.mobile.impl.ios.apns.APNSBasedPushNotificationProvider</Provider>--> </PushNotificationProviders>
Navigate to the
<IoT_HOME>/core/repository/deployment/server/synapse-configs/default/api
directory and replacelocalhost
with your<SERVER_IP>
for the files listed below:admin--IOS-Enrollment-Profile.xml
admin--IOS-Enrollment-Scep.xml
admin--IOS-Enrollment.xml
- Go back to the IoTS Management console and click Restart Now.
What's next?
Next, you need to configure the general iOS server settings.