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.
Use the cocoapods-mPaaS plug-in to add the SDK.
- In the Podfile file, add
mPaaS_pod "mPaaS_UTDID"to add the dependencies of the Device ID component.
pod installto connect the component to the mPaaS.
After you add the SDK, you can call the following method to obtain the unique device ID:
Obtain the unique device ID generated by the SDK.
+ (NSString *)deviceId;
For more information, see the
MPUtdidInterface.h file in