Run the Sample Directly Connected Device Application

Run the iOS sample directly connected device application to learn how to use the client software library APIs. The device client samples use software to simulate temperature and humidity sensors. The class HumiditySensor is used to simulate data points on a sine wave. The directly connected device sample applications periodically send temperature, humidity, and alert messages to Oracle Internet of Things Cloud Service. The attributes, actions, and alerts of the sample temperature and humidity sensors are specified in device models which you upload to Oracle Internet of Things Cloud Service.

About the Sample Directly Connected Device Application

The sample application is located in the iotcs/csl/ios/samples directory and it uses a high-level, virtual device abstraction that hides the details of sending and receiving data from Oracle Internet of Things Cloud Service.

  1. Upload the humidity and temperature sensor device models to Oracle Internet of Things Cloud Service. See Upload the Sample Device Models.
  2. Register the device and download the provisioning file.
  3. Run the DirectlyConnectedDeviceSample application:
    1. Open Xcode and then open the DirectlyConnectedDeviceSample.xcodeproj file in the iotcs/csl/ios/samples directory.
    2. Right-click the project name and select Add Files to “DirectlyConnectedDeviceSample”.
    3. Browse to the location of the provisioning file and then click Add.
    4. Expand the DirectlyConnectedDeviceSample 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 DirectlyConnectedDeviceSample application. Output similar to this image appears: