Document Navigation SDK for iOS Guides Set Up Your Project Additional Configuration

Additional Configuration

This document describes the privacy compliance requirements for the navigation SDK. Before using any navigation manager, you must ensure that the privacy policy is compliant by calling the relevant interfaces.

Privacy Compliance Interfaces

The following interfaces must be called before instantiating any navigation manager.

/**
 * @brief Updates the display status of the privacy popup and whether it contains the AMap SDK privacy agreement.
 *        Note: Must be called before instantiating any navigation manager. (since 8.1.0)
 * @param showStatus The display status of the privacy popup.
 * @param containStatus Whether the popup contains the AMap SDK privacy agreement.
 */
- (void)updatePrivacyShow:(AMapPrivacyShowStatus)showStatus privacyInfo:(AMapPrivacyInfoStatus)containStatus;

/**
 * @brief Updates the user's authorization status for the AMap SDK privacy agreement.
 *        Note: Must be called before instantiating any navigation manager. (since 8.1.0)
 * @param agreeStatus The user's authorization status for the AMap SDK privacy agreement.
 */
- (void)updatePrivacyAgree:(AMapPrivacyAgreeStatus)agreeStatus;

Parameter Specifications

Name

Meaning

Rule Description

showStatus

Privacy popup display status

Indicates whether the privacy popup has been shown to the user.

containStatus

Privacy agreement inclusion status

Indicates whether the privacy popup contains the AMAP SDK privacy agreement.

agreeStatus

User authorization status

Indicates whether the user has agreed to the AMAP SDK privacy agreement.

Compliance Check

Before calling any navigation manager, you must perform a compliance check. Ensure the privacy policy is compliant by setting the following interfaces:

[[AMapNaviManagerConfig sharedConfig] updatePrivacyShow:AMapPrivacyShowStatusDidShow privacyInfo:AMapPrivacyInfoStatusDidContain];
[[AMapNaviManagerConfig sharedConfig] updatePrivacyAgree:AMapPrivacyAgreeStatusDidAgree];

Singleton Construction Behavior

The behavior of the navigation manager singleton depends on the privacy compliance status.

If the user has not authorized the AMAP SDK privacy agreement, or the privacy popup has not been displayed, or the popup does not contain the AMAP SDK privacy agreement, the singleton construction fails and returns nil.

If the user has authorized the AMAP SDK privacy agreement, the privacy popup has been displayed, and the popup contains the AMAP SDK privacy agreement, the singleton construction succeeds and returns a valid instance object. The navigation functionality can then be used normally.