Mobile Push SDK compliance guide for iOS

Updated at:
Note

Laws and regulations, such as the Personal Information Protection Law, the Data Security Law, and the Cybersecurity Law, require app developers to protect the personal information of end users. When you provide network products and services, you must not illegally collect or use personal information. This guide explains how to use the Mobile Push software development kit (SDK) in a compliant manner to protect the personal information of end users and avoid infringing on their rights.

I. System permissions requested by the Mobile Push SDK

Permissions

Required

Purpose

INTERNET

Yes

The basic permission that allows the SDK to connect to the internet to provide the push service.

Notifications

Yes

Used to receive push notifications.

II. Mobile Push SDK features and related personal information

Feature

Personal information field collected

Purpose of collection

Configuration and example

Push feature

(Basic feature)

Device information (including operating system version and device model)

To identify the push device and enable pushes to a single device.

Basic feature. This information is required.

III. Configuration for optional personal information fields

Optional personal information field

Purpose of collection

Configuration and example

Not applicable

Not applicable

Not applicable

IV. Compliant initialization for the Mobile Push SDK

/**
 *	Initializes the Push SDK.
 *
 *	@param 	appKey          The appKey.
 *	@param 	appSecret       The appSecret.
 *	@param 	callback        The callback.
 */
+ (void)asyncInit:(NSString *)appKey
        appSecret:(NSString *)appSecret
         callback:(CallbackHandler)callback;

/**
 *  Registers the deviceToken with Alibaba Cloud Mobile Push.
 *
 *  @param deviceToken The deviceToken returned by the Apple Push Notification service (APNs) server.
 */
+ (void)registerDevice:(NSData *)deviceToken
          withCallback:(CallbackHandler)callback;
Important
  • Ensure the end user has agreed to the Privacy Policy before calling the CloudPushSDK initialization method and the [CloudPushSDK registerDevice...] method.

Code example

// Initialize the SDK. Manually enter the appKey and appSecret.
[CloudPushSDK asyncInit:appKey appSecret:appSecret callback:^(CloudPushCallbackResult *res) {
       if (res.success) {
           NSLog(@"Push SDK init success, deviceId: %@.", [CloudPushSDK getDeviceId]);
       } else {
           NSLog(@"Push SDK init failed, error: %@", res.error);
       }
   }];
    
/*
 *  Callback for successful APNs registration. Upload the returned deviceToken to the CloudPush server.
 */
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
    NSLog(@"Upload deviceToken to CloudPush server.");
    [CloudPushSDK registerDevice:deviceToken withCallback:^(CloudPushCallbackResult *res) {
        if (res.success) {
            NSLog(@"Register deviceToken success, deviceToken: %@", [CloudPushSDK getApnsDeviceToken]);
        } else {
            NSLog(@"Register deviceToken failed, error: %@", res.error);
        }
    }];
}