...
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 theAppDownloadURLHost
property.Code Block <Config name="AppDownloadURLHost">%https%</Config>
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.
- Change the value of the
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.
- Open the
Configuring the IP or hostname
Panel borderColor #11375B bgColor #ffffff borderWidth 1 Expand title Click here for more information. Thie This 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.Code Block ./change-ip.sh
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.
Info If you want to configure the steps manually, see Configuring the IP or hostname manually and if you want to change the default ports, see Changing the Default Ports.
- Navigate to the
Installing the iOS features
Panel borderColor #11375B bgColor #ffffff borderWidth 1 Expand title Click here for more information. 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.
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 title Tip by Chris 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 fromfalse
totrue
.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 theios.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 thePushNotificationProviders
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 tofalse
if you need to restart the server many times after configuring the IP. This configuration is enabled when you run theios.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.
...