tencent cloud

Tencent Cloud Super App as a Service

DocumentaçãoTencent Cloud Super App as a Service

Mini Program Authorization Popup

Download
Modo Foco
Tamanho da Fonte
Última atualização: 2025-12-19 22:58:11

Set mini program permission dialog

You can customize the authorization pop-up window of the mini program by implementing the createAuthorizeAlertViewWithFrame method in the TMFMiniAppSDKDelegate protocol. This method allows you to create a custom view for the authorization dialog, including the mini program and the permissions it needs to request.
/**
* @brief Creates a custom authorization window
*
* @param frame Window size
* @param scope The scope of the authorization
* @param title Permission name
* @param desc Permission description
* @param privacyApi The API being called that requires the permission
* @param appInfo Information of the current mini program
* @param allowBlock Callback for allowing the permission
* @param denyBlock Callback for denying the permission
*/

- (UIView *)createAuthorizeAlertViewWithFrame:(CGRect)frame
scope:(NSString *)scope
title:(NSString *)title
desc:(NSString *)desc
privacyApi:(NSString *)privacyApi
appInfo:(TMFMiniAppInfo *_Nullable)appInfo
allowBlock:(void (^)(void))allowBlock
denyBlock:(void (^)(void))denyBlock;




Login to version V2 and get phone number/email pop-up

The `createPhoneNumberAuthViewWithFrame` and `createEmailAddressAuthViewWithFrame` methods in the TMFMiniAppSDKDelegate protocol allow for customized methods to retrieve phone numbers/email addresses in a mini-program. SuperApp can then implement the corresponding view according to its own style and return it.

/**
* @brief Create a custom phone number acquisition popup
*
* @param frame The window size
* @param appInfo The current mini program information
* @param maskAccount Masked phone number
* @param allowBlock allows callbacks
* @param denyBlock deny callback
*/
- (UIView *)createPhoneNumberAuthViewWithFrame:(CGRect)frame
appInfo:(TMFMiniAppInfo *)appInfo
maskAccount:(NSString *)maskAccount
allowBlock:(void (^)(void))allowBlock
denyBlock:(void (^)(void))denyBlock;

/**
* @brief Create a custom email acquisition popup
*
* @param frame The window size
* @param appInfo The current mini program information
* @param maskAccount Masked email
* @param allowBlock allows callbacks
* @param denyBlock deny callback
*/
- (UIView *)createEmailAddressAuthViewWithFrame:(CGRect)frame
appInfo:(TMFMiniAppInfo *)appInfo
maskAccount:(NSString *)maskAccount
allowBlock:(void (^)(void))allowBlock
denyBlock:(void (^)(void))denyBlock;








Ajuda e Suporte

Esta página foi útil?

comentários