Run the Sample Enterprise Applications

Run the iOS sample enterprise applications to learn how to use the client software library APIs. The sample enterprise applications simulates software that communicates with and controls directly connected or gateway devices. The sample enterprise application reads humidity and temperature values of directly connected or gateway devices. The sample enterprise applications can also change device attributes by sending commands through Oracle Fusion Cloud IoT Intelligent Applications.

About the Sample Enterprise Applications

Two sample enterprise applications are available. one that demonstrates a gateway connecting using virtualization and a sample that demonstrates a gateway connecting using direct messaging. The first sample is located in the iotcs/csl/ios/samples directory and it uses a high-level, virtual device abstraction that hides details of sending and receiving data from Oracle Fusion Cloud IoT Intelligent Applications. The second sample is located in the iotcs/csl/ios/samples/advanced folder and it uses a send and receive model to provide direct control over the client software library.

  1. Upload the humidity and temperature sensor device models to Oracle Fusion Cloud IoT Intelligent Applications. See Upload the Sample Device Models.
  2. Create a new application named iOS Device. See Creating a New Application.
  3. Associate the humidity and temperature sensor device models with the iOS Device application.
  4. Add an integration named iOS Device to the application. See Integrating Enterprise Applications with Oracle IoT Cloud Service.
  5. Download the provisioning file for the integration:
    1. Log in to your Oracle Fusion Cloud IoT Intelligent Applications instance.
    2. Click the Menu (Menu icon) icon adjacent to the Oracle Fusion Cloud IoT Intelligent Applications title on the Management Console.
    3. Click Applications and then Browse Applications.
    4. Click iOS Device and then Integration.
    5. Select the iOS Device integration and click the Edit (Edit icon) icon.
    6. Click the Overview tab.
      If you are using Oracle Fusion Cloud IoT Intelligent Applications version 17.3.3 or earlier, record the ID and Shared Secret values. These values may be required when you run the provisioning tool to create the trusted assets store.
    7. Enter a password in the File Protection Password field to encrypt the provisioning file that contains the configuration and credentials to activate your integration.
    8. Enter the password again in the Confirm Password field.
    9. Click Download Provisioning File.
    10. Click Save File.
    11. Browse to a directory and then click Save.
  6. Run the DirectlyConnectedDevice or the GatewayDevice sample applications. See Run the Sample Directly Connected Device Application or Run the Sample Gateway Application.
  7. Run the EnterpriseClientSample application:
    1. Open Xcode and then open the EnterpriseClientSample.xcodeproj file located in the iotcs/csl/ios/samples directory.
    2. Right-click the project name and select Add Files to “GatewayDeviceSample”.
    3. Browse to the location of the provisioning file and then click Add.
    4. Expand the EnterpriseClientSample folder and select the TrustStore.plist file.
    5. Click the filename field and enter the name of the provisioning file without the file extension.
    6. Click the fileextension field and enter the file extension of the provisioning file.
    7. Click the password field and enter the provisioning file password.
    8. Run the EnterpriseClientSample application.
    9. On the first screen enter iOS Device and click Next.
    10. Select Humidity Sensor.
    11. Select a device to monitor and control.
    12. Click in the New field and enter a value between 65 and 100 and click Apply. Output similar to this image appears:
      Description of iosenterpriseclient.png follows
      Description of the illustration iosenterpriseclient.png

      Note that the maxThreshold value is changed on the device.