tencent cloud

Tencent Cloud Super App as a Service

Customizing Permission List

ダウンロード
フォーカスモード
フォントサイズ
最終更新日: 2025-07-04 18:03:49
Certain APIs involve user privacy, and the Super App as a Service (SAS) enforces authorization controls for them. Users can choose whether to grant permissions based on their preferences. This doc covers customization requirements for the authorization list.

Get the mini program permission list

Call [TMFMiniAppSDKManager sharedInstance] getCurrentAppAuthorizeList to get the permission list for the specified mini program.
// Get the permission list of the currently running mini program

// @return NSArray<TMASettingItem *> *
- (NSArray *)getCurrentAppAuthorizeList;

Set mini program authorization status

Call [TMFMiniAppSDKManager sharedInstance] setCurrentAppAuthStatus: forScope: completionHandler to set the authorization status for the specified mini program.
// Change the authorization status of the currently running mini program

//@param status - Authorization status
//@param scope - Scope name
// @param completionHandler - Request result callback
- (void)setCurrentAppAuthStatus:(BOOL)status
forScope:(NSString *)scope
completionHandler:(MACommonCallback _Nullable)completionHandler;

Customize mini program permission description

Permission list information can be customized by implementing the customizedScopeModelInfo API.
/**
* @brief - Change the default scope description
* @param appInfo - The current mini program information
*/
- (void)customizedScopeModelInfo:(NSArray<TMAScopeModel *> *)scopeModelList appInfo:(TMFMiniAppInfo *_Nullable)appInfo;
For mini program permission list, refer to Scope list
Example:
- (void)customizedScopeModelInfo:(NSArray<TMAScopeModel *> *)scopeModelList appInfo:(TMFMiniAppInfo *)appInfo {
for (TMAScopeModel *model in scopeModelList) {
if(model.scope == ScopeChooseImage) {
model.title = @"Choose Image";
model.desc = @"Choose your image";
model.settingPageTitle = @"Image";
}
}
}



ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック