Registering the iOS Client

Register and enable your iOS device clients to receive push notifications.

  1. Configure push notification in Management Cockpit. Specify the device type during application connection and registration.
  2. Enable push notifications in the application:
    1. To receive the device token, implement the application:didRegisterForRemoteNotificationsWithDeviceToken: method in your application delegate.
    2. Update the ApnsDeviceToken and DeviceType properties via a PUT request. The HTTP header must also include X-SMP-APPCID and Authorization headers.
      https://<host:port>/odata/applications/{latest|v1}/{appid}/Connections/('{appcid}')
      Method : PUT
      HTTP Headers : "Content-Type" = "application/atom+xml"
      
      Body:
      <?xml version='1.0' encoding='utf-8'?>
      <entry xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" 
      xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xml:base="http://host:port/odata/applications/v1/com.example.IOS/">
        <id>https://{application URL}/odata/applications/{latest|v1}/e2eTest/Connections('32552613-470f-45e0-8acc-b7d73d501682')</id>
          <content type="application/xml">
          <m:properties>
            <d:ApnsDeviceToken>{APNS device token received by the application from APNS}</d:ApnsDeviceToken>
            <d:DeviceType>iPhone</d:DeviceType>
          </m:properties>
        </content>
      </entry>