...
Tip |
---|
|
- WSO2 IoT Server supports devices on iOS 7, 8, 9, and 10.
- Install Oracle Java SE Development Kit (JDK) version 1.8.* and set the
JAVA_HOME environment variable. For more information on setting up JAVA_HOME on your OS, see Installing the Product. Download WSO2 IoT Server and unzip it. Note |
---|
The downloaded WSO2 IoT Server file is large. Therefore, when unzipping it the OS might extract it halfway through and stop. To avoid this, we recommend that you unzip the file via the terminal. Example: Code Block |
---|
unzip wso2iot-3.1.0.zip |
|
Start WSO2 IoT Server core profile, which corresponds to the WSO2 Connected Device Management Framework (WSO2 CDMF) profile. Code Block |
---|
cd <IOTS_HOME>/bin
sh iot-server.sh |
The default port assigned for the core is 9443. In your browser, access the IoT Server Console by navigating to https://<IoT_HOST>:9443/devicemgt and log in using admin as the username and password. Fill in the following iOS form via the WSO2 site. WSO2 will send you an email with the following information. The P2 repository with the iOS features, End User License Agreement (EULA) and the README.txt. The iOS agent source code. You can use this if you want to customize the iOS agent application in WSO2 IoT Server.
Get your certificate signed by Apple. Register your organization with the Apple Developer Enterprise Program . Thereafter, follow the steps mentioned in MDM Vendor CSR Signing Overview .
|
Configuring iOS support in WSO2 IoT Server
...
Tip |
---|
If you are facing issues while configuring WSO2 IoT Server for iOS in your testing environment, contact us and we will help you out. |
Configuring WSO2 IoT Server to install iOS applications
Panel |
---|
borderColor | #11375B |
---|
bgColor | #ffffff |
---|
borderWidth | 1 |
---|
|
Expand |
---|
title | Click here for more information. |
---|
| The download URL for WSO2 IoT Server is configured for HTTP by default. Although you can install Android mobile applications using this default configuration, to install iOS applications, you need to configure it for HTTPS as it's required for the iOS MDM protocol behavior. Follow the steps given below to configure WSO2 IoT Server to install iOS mobile applications: - Open the
<IoT_HOME>/conf/app-manager.xml file. Add %https% as the value for the AppDownloadURLHost property. Code Block |
---|
<Config name="AppDownloadURLHost">%https%</Config> |
Tip |
---|
Tip: To test WSO2 IoT Server App management features on Android devices, please use one of the following options: - Change the value of the
AppDownloadURLHost property back to HTTP - Continue using HTTPS to install applications on Android devices by Generating a BKS File for Android.
|
Chris has now done the configurations needed to allow users to register and monitor their devices with WSO2 IoT Server. Chris then proceeds to configure iOS support in IoT Server. |
|
Configuring the IP or hostname
Panel |
---|
borderColor | #11375B |
---|
bgColor | #ffffff |
---|
borderWidth | 1 |
---|
|
Expand |
---|
title | Click here for more information. |
---|
| Thie script automatically configures the IP and creates the required SSL certificates for the IP or hostname. This method is recommended because manually configuring the IP address includes many steps and if you miss out on a step you will run into errors. - Navigate to the
<IOTS_HOME>/scripts directory. Run the change-ip script. Example: Running the script on a Mac or Linux OS. Tip: The script will find and replace the IP address given in argument1 (localhost ) with the IP address given as argument2 (10.10.10.14 ), in the necessary configuration files. Change the current IP address of the IoT Server core, broker, and analytics profile. Enter the values for IoT Server core SSL certificate.
Expand |
---|
title | Click here for more information. |
---|
| Enter the requested information when prompted. Field | Usage/Purpose |
---|
Country | The name of your country. Enter the two digit code for your country. | State | The state your organization is at. | Location | The city your organization is located at. | Organization | The name of your organization. For this scenario, we entered wso2. | Organization Unit | Defined the Team ID as the organization unit. | Email | The email is used to identify the existing users. For this scenario, we entered chris@wso2.com as the email. | Commonname | Fully qualified domain name of your server. | 
|
|
|
Installing the iOS features
Panel |
---|
borderColor | #11375B |
---|
bgColor | #ffffff |
---|
borderWidth | 1 |
---|
|
Expand |
---|
title | Click here for more information. |
---|
| After obtaining a signed CSR, the P2 repository, and the other files via email, Chris can install the specific features in the P2 repository that are required to enable iOS by following the instructions given below. Download and extract the ios-feature-deployer that you received via email. - Copy the ios-feature-deployer folder to the
<IOTS_HOME> directory. Navigate inside the ios-feature-deployer folder on the terminal and execute the following command to install the iOS features to WSO2 IoT. Agree to the End User License Agreement (EULA) to complete the iOS configurations. Code Block |
---|
cd ios-feature-deployer
mvn clean install -f ios-feature-deployer.xml |
Tip |
---|
| Tip: To verify successful installation of the iOS features, do the following: Open the bundles.info file found in the <IOTS-HOME>/wso2/components/default/configuration/org.eclipse.equinox.simpleconfigurator directory and verify if the following properties have changed from false to true . Code Block |
---|
org.wso2.carbon.device.mgt.ios.api.utils,3.0.5.SNAPSHOT,../plugins/org.wso2.carbon.device.mgt.ios.api.utils_3.0.5.SNAPSHOT.jar,4,true
org.wso2.carbon.device.mgt.ios.apns,3.0.5.SNAPSHOT,../plugins/org.wso2.carbon.device.mgt.ios.apns_3.0.5.SNAPSHOT.jar,4,true
org.wso2.carbon.device.mgt.ios.core,3.0.5.SNAPSHOT,../plugins/org.wso2.carbon.device.mgt.ios.core_3.0.5.SNAPSHOT.jar,4,true
org.wso2.carbon.device.mgt.ios.payload,3.0.5.SNAPSHOT,../plugins/org.wso2.carbon.device.mgt.ios.payload_3.0.5.SNAPSHOT.jar,4,true
org.wso2.carbon.device.mgt.ios.plugin,3.0.5.SNAPSHOT,../plugins/org.wso2.carbon.device.mgt.ios.plugin_3.0.5.SNAPSHOT.jar,4,true |
|
Once the ios-feature-deployer script has finished running, you can see the <IOTS_HOME>/ios-configurator directory that was created. Navigate inside the <IOTS_HOME>/ios-configurator directory and run the ios.sh script. Code Block |
---|
cd ios-configurator
sh ios.sh |
Enter the requested information when prompted. Be sure to provide the same information when configuring the iOS platform configurations. Field | Usage/Purpose |
---|
Country | The name of your country. Enter the two digit code for your country. | State | The state your organization is at. | Location | The city your organization is located at. | Organization | The name of your organization. For this scenario, we entered MobX. | Organization Unit | Defined the Team ID as the organization unit. | Email | The email is used to identify the existing users. For this scenario, we entered chris@mobx.com as the email. | Commonname | Fully qualified domain name of your server. | This part of the script creates a key pair, generates a signature, and signs the key using the signature.
Uncomment the APNSBasedPushNotificationProvider that is under the PushNotificationProviders configuration in the <IOTS_HOME>/conf/cdm-config.xml file. Code Block |
---|
<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> |
Note |
---|
Make sure the <EnabledUpdateApi> parameter in the <IOTS_HOME>/conf/etc/webapp-publisher-config.xml file is set to false if you need to restart the server many times after configuring the IP. This configuration is enabled when you run the ios.sh script. By enabling the update API property, the APIs and the respective web apps get updated when the server restarts. This takes some time. Therefore, if you need to restart the server many times after this configuration or when in a production environment, you need to revert back to the default setting. |
|
|
Generating an MDM APNS certificate
Panel |
---|
borderColor | #11375B |
---|
bgColor | #ffffff |
---|
borderWidth | 1 |
---|
|
Expand |
---|
title | Click here for more information. |
---|
| Except for a few operations (ring, message and get location) that are performed by the WSO2 IoT Server agent, all the other device operations, and policies areappliedonaniOS device via it's operating system. Therefore, for the WSO2 IoT Server server to communicate with the operating system of the device, you need to generate the MDM APNS certificate. The MDM APNS certificate will be referred to as the MDM certificate in the IoT Server Console. - Go to https://appleid.apple.com/account#!&page=create and get an Apple ID, if you do not have one already.
- Go to the Apple Push Certificate Portal at https://identity.apple.com/pushcert/ and log in with your customer account details. You do not need an enterprise account for this. Your Apple ID is sufficient.
- Click Create Certificate and agree to the terms and conditions.
Upload the encoded .plist file you got after signing your certificate. Download the generated MDM signing certificate, which is a certificate for third-party servers provided by Apple, and rename it to MDM_Certificate . Anchor |
---|
| MDM_APNS_TopicID |
---|
| MDM_APNS_TopicID |
---|
|
Get the USERID (TOPIC ID) from the MDM signing certificate (MDM_Certificate.pem ), as it will be used later in the configuration. You can decode the MDM signing certificate to obtain the USERID by executing the following command: Code Block |
---|
openssl x509 -in MDM_Certificate.pem -text -noout |
Info |
---|
The TOPIC ID is assigned to the UID property. Example: UID=com.apple.mgmt.External.0dbe5637-8f16-4d9f-bac4-e18cac2f7d4e |
Remove the password/pass phrase from your private key file (e.g.,customerPrivateKey.pem ). Code Block |
---|
openssl rsa -in customerPrivateKey.pem -out customerKey.pem |
Merge the customer key file that was derived in the latter step with the MDM signing certificate to generate the MDM Apple Push Notification Service (APNS) Certificate. In this example, Chris merges the customerKey.pem file with the MDM_Certificate.pem file to generate the MDM_APNSCert.pem file. Tip |
---|
Tip: Before you merge the customerKey.pem file and the MDM_Certificate.pem file, make sure both files are in the same directory. |
Code Block |
---|
cat MDM_Certificate.pem customerKey.pem > MDM_APNSCert.pem |
Open the APNS Certificate (MDM_APNSCert.pem ) and add a line break between the content of the two files. For example, if your content looks as "-----END CERTIFICATE----------BEGIN RSA PRIVATE KEY----- ", add a line break after 5 dashes so that the content looks as follows: Code Block |
---|
-----END CERTIFICATE-----
-----BEGIN RSA PRIVATE KEY----- |
Convert the MDM_APNSCert.pem file to MDM_APNSCert.pfx file. You need a password for this, which you will need again when configuring the iOS platform configurations. Code Block |
---|
openssl pkcs12 -export -out MDM_APNSCert.pfx -inkey customerPrivateKey.pem -in MDM_APNSCert.pem |
|
|
Panel |
---|
borderColor | #11375B |
---|
bgColor | #ffffff |
---|
borderWidth | 1 |
---|
|
Expand |
---|
title | Click here for more information. |
---|
| Multiple tenants can use WSO2 IoT Server while maintaining tenant-based isolation. The iOS platform configurations page enables tenants to customize the iOS settings based on their own requirements. Chris proceeds to configure the iOS platform configurations by adding the generated MDM APNS certificate. Log in to the device management console at https://<IoT_HOST>:9443/devicemgt using admin as the username and password if you haven't previously logged in. Click Menu > CONFIGURATION MANAGEMENT > PLATFORM CONFIGURATIONS > iOS Configurations and fill in the form. Note |
---|
Use the generated MDM-APNS certificate for both the MDM certificate and the APNS certificate. In this tutorial, you are not installing the WSO2 IoT Server's iOS agent on the device. Therefore, you don't need to generate the APNS certificate. The APNS certificate is used to trigger operations, such as ring, notification, and iOS. If you want to trigger these operations, you need to generate the APNS certificate and upload it. |
MDM Certificate Password : Give the same password you gave when converting the MDM_APNS certificate from the pem to the pfx format. MDM Certificate Topic ID : Give the topic ID of the certificate. If you are unsure of the topic ID, refer step 6 under generating the MDM APNS certificate.

Tip |
---|
Tip: To learn more about each platform setting, hover your mouse pointer over the help tip. |
|
|
Creating users and a sample policy
Follow the steps given below to create two users, Alex and Chris, and a configured passcode policy. This will make it easy for you to try out the IoT Server quick start guide.
...
Tip |
---|
Check out the WSO2 IoT Server dashboard by signing in to the WSO2 IoT Server console using chris as the username and chrisadmin as the password: https://<IoT_HOST>:9443/devicemgt You will then see the new iotMobileUser role, three new policies, and the two new users that were added using this script |
Updating the passcode policy
As a security measure, the MobX management has asked Chris to update the passcode policy for all iOS devices so that a device user can only enter the wrong password five times. If a user fails to enter the correct password in the fifth attempt, the device will not be accessible for 15 minutes. This can be regulated in WSO2 IoT Server by updating the passcode policy that was already in place. Chris follows the steps given below to update the policy:
...
Tip |
---|
|
You can ensure that the policy is applied on the device by going to the enrolled device page, clicking on your device and clicking the Policy Compliance tab on the Device Management console. Another way to ensure that the policy is enforced on the device is by checking the settings in the device. For more information, see Verifying Policies Applied on an iOS Device. |
Publishing applications
Chris needs to publish the WSO2Con application that was created when running the mobile-qsg
script.
...
Info |
---|
To learn more about the mobile application life cycle, see Mobile Application Lifecycle Management. |
Registering the iOS device
Info |
---|
WSO2 IoT Server supports devices on iOS 7, 8, 9, and 10. |
...
Sign in to the WSO2 IoT Server device management console using alex as the username and alexuser as the password.
- Click Enroll New Device.
- Click iOS to enroll your device with WSO2 IoTS.
- Enroll the device.
- Click Enroll Device.
Scan the QR code and the Safari browser will display the IoT Server iOS enrollment screen.
After scanning the QR code you will be directed to a web page. When this page appears, the web browser will typically display an "insecure connection" message, which requires your confirmation before you can continue.
- Tap Install IoT Server Certificate. The iOS devices need the root certificate to be downloaded to trust the server certificate.

The Install Profile screen appears. Tap Install.

Tip |
---|
|
If you are using iOS 10 with a self-signed certificate, do the following to mark it as a trusted certificate. This is required in iOS 10 because there is a change in how self-signed CA certificates are trusted by iOS devices from iOS 10 onwards. - Open the Certificate Trust Settings found in Settings > General > About.
Enable full trust for the certificate related to WSO2 IoT Server.
|
- Tap the Skip Agent Installer link at the bottom of the screen.
In this tutorial, you are registering the iOS device with WSO2 IoT Server without installing the WSO2 iOS agent. Therefore, you will not be able to ring the device, get the device location or send notifications to the device using WSO2 IoT Server. If you want to try out the said operations, click Install IoT Server agent.

- On the IoT Server Registration screen, enter your details:
- Domain - You don't need to enter the domain details for this scenario.
- Username - Enter alex as the username.
- Password - Enter alexuser as the password.
Info |
---|
By default WSO2 IoT Server only supports the "bring your own device" (BYOD) registration process for the iOS platform. |
Tap Log In.
Expand |
---|
title | Click for a troubleshooting tip |
---|
|
Warning |
---|
| If you get an error stating that the server certificate is invalid, it may be because your iOS version is version 10 or a later version. Ensure that you have enabled full trust for the certificate as mentioned on this tip in step 6. To resolve, do the following: - Open the Certificate Trust Settings found in Settings>General>About.
Enable full trust for the certificate related to WSO2 IoT Server. - Open Settings>General, scroll to the bottom and open Profiles.
If you do not see a Profiles section, you do not have a configuration profile installed. - In the Profiles section, select the IoT profile and tap Delete Profile.
- Restart the device enrollment process from step 4.
|
|
After reading the End User License Agreement (EULA), tap I accept the terms.

Tap Install when prompted to install the carbon.super Profile Service.

A warning message appears to indicate that by installing the profile the IoT Server will remotely manage the iOS device. Tap Install.
Tap Trust to confirm that you are aware of the device being remotely managed by installing the profile.

After the profile is installed, click Done.

Upon the successful registration, the DEVICE ADDED confirmation appears.
Note |
---|
Since you are not installing the WSO2 IoT Server iOS agent in this guide, you will get a Cannot Open Page warning message after the enrollment is complete. |
Trying out iOS device operations
Alex can now navigate to the Device management page, view information specific to her device, and carry out operations on the device. She follows the steps given below:
- Access the IoT Server Management Console using alex as username and alexuser as the password.
- Click the
icon. - Click DEVICE MANAGEMENT.
- Click on the registered device.

Alex tries out the various operations on her device via the WSO2 IoT Server Management Console.
Note |
---|
NOTE: Because we didn't install the WSO2 IoT Server iOS agent while registering the device, the ring device, send notifications, and get device location operations do not function. For more information on installing the agent in the registration process, you can follow the steps in the Enrolling With the iOS Agent tutorial. |

Expand |
---|
|
Panel |
---|
borderColor | #11375B |
---|
bgColor | #FFFFFF |
---|
borderWidth | 2 |
---|
| The details of each registered devices will be shown on separate pages within the Device page.
| Description |
---|
Device Details | The following device information will be retrieved automatically when you register with WSO2 IoTS. Device | This shows the name the user has given his/her device (e.g., Kim's iPhone). | Model | The type of device will be stated (e.g., iPhone, iPad) | IMEI | The International Mobile Station Equipment Identity (IMEI) number of all GSM devices. This is not applicable to devices suchasiPadswhichwork without a SIM. | Status | Indicates if the device is active, inactive or removed from WSO2 IoTS. | Ownership | Indicates if the device is your own device/Bring Your Own Device (BYOD) or if it's a Corporate-Owned, Personally Enabled (COPE) device. For the device to be a COPE device, WSO2 IoT Server must be configured to use the system server application. |
| Operation Log | A list of all the operations that have been carried out by you and its current status. | Location | Provides the location of your device. | Applications | A list of all the applications that have been installed on your device and the memory consumption by each application will be listed under this section. | Policy Compliance | If your device does not comply with certain criteria in the enforced policy, the aspects in which your device is none compliant will be highlighted under this section. | |
|
Expand |
---|
|
Panel |
---|
borderColor | #11375B |
---|
bgColor | #ffffff |
---|
borderWidth | 2 |
---|
| Click on the operation you wish to carry out and provide the required details (if requested) to apply the selected operation on your device. Operation | Description |
---|
Device Lock | Ability to lock a device via WSO2 IoT Server. | Location | Ability to receive the location of the device. | Ring | Ability to ring the device via WSO2 IoT Server. | Clear Password | Ability to remove a device lock via WSO2 IoT Server. | Enterprise Wipe | Ability to unregister a device from WSO2 IoT Server. | Send Notification | Ability to send a notification to the device via WSO2 IoT Server. The WSO2 IoT Server admin can use this device operation to send notifications to the WSO2 IoT Server users. | Wipe Data | Ability to carry out a factory reset operation on your own device via the IoT Server. The user will have to provide the PIN, which he/she entered when registering to IoT Server, to be able to wipe his/her device. | |
|
Tip |
---|
|
To know if a policy is applied on your device, see Verifying Policies Applied on an iOS Device. |
Installing an application on the iOS device
MobX wants Chris to ensure that the employees can only download mobile applications made available via the MobX app store. For this, Chris creates and publishes the WSO2Con application to the MobX app store.
...
Note |
---|
|
Remember to change the AppDownloadURLHost property value that is in the <IOTS_HOME>/conf/app-manager.xml file back to HTTP if you are trying out the quick start guide for Android or testing WSO2 IoT Server with Android devices. If you wish to continue using HTTPS to install applications on Android devices, generate a BKS file for Android. |
Unregistering and uninstalling the iOS agent
Want to unregister your device from WSO2 IoT Server and uninstall the iOS agent that's on your device? Follow the steps given below:
...
Now you have successfully unregistered your device from WSO2 IoT Server, removed the profiles that were added when the iOS agent was installed, and uninstalled the WSO2 Device management application.
What's next?
- Want to enroll your iOS device with the iOS agent? See, Enrolling With the iOS Agent
- To know more on what you can do with iOS in WSO2 IoT Server, see Working with iOS Devices.