All Products
Document Center

Access iOS

Last Updated: May 25, 2021

This guide introduces how to integrate Device ID to iOS client. You can integrate Device ID to iOS client based on native project with CocoaPods.


You have connected your project to mPaaS. For more information, refer to: Connect to mPaaS based on an existing project and CocoaPods.

Add the SDK

Use the cocoapods-mPaaS plug-in to add the SDK.

  1. In the Podfile file, add mPaaS_pod "mPaaS_UTDID" to add the dependencies of the Device ID component.
  2. Run pod install to connect the component to the mPaaS.

Use the SDK

After you add the SDK, you can call the following method to obtain the unique device ID:

  1. /**
  2. Obtain the unique device ID generated by the SDK.
  3. */
  4. + (NSString *)deviceId;

For more information, see the MPUtdidInterface.h file in MPUTDIDAdapter.framework.