tencent cloud

Feedback

iOS FAQs

Last updated: 2024-11-21 18:05:59

    Integration FAQs

    What is the minimum configuration required to integrate the SDK?

    The TCMPP mini program SDK supports iOS 9 later versions. The versions earlier than iOS 9 are not supported.

    Crashes on iOS 12 and earlier versions after compiling with XCode 15

    Add the -Wl,-ld_classic configuration in the project compilation options.
    
    
    

    What is the impact on the installation package size after integrating the SDK?

    The TCMPP SDK uses a core library and extension libraries, allowing users to integrate the SDK as needed. Integrating only the core library impacts the overall installation package size by approximately 4 MB.

    FAQs during usage

    Troubleshooting mini program startup failures

    If the mini program fails to start, it could be due to the following reasons:
    Reason 1: Incorrect configuration file path. If the configuration file is in a sub-directory, you need to append the directory path, e.g., server/tcmpp-ios-configurations.json;
    Reason 2: Modifying the mini program configuration file content is not allowed; otherwise, the mini program will not run properly;
    Reason 3: The bundleId in the configuration file must match the application's bundleId. Otherwise, the app will fail to run because the bundleId in the configuration file is verified during initialization.
    

    Is it supported to completely hide the navigation bar on a page of a mini program? If it is supported, how to implement it?

    A: Support.
    The navigationStyle of mini programs like WeChat, Alipay, Baidu, etc. has two values of default/custom, while TCMPP mini program SDK adds a new hide on top of that, that is, it has three values of default/custom/hide.
    So on the page where you need to hide the navigation bar, just set navigationStyle to hide.

    How do I set up grey scale release conditions?

    The host application developer can set the user's attribute information (region or account number) through the method provided by the SDK, which is convenient for use in scenarios such as grey-scale push.
    Set User ID
    // Report user ID, if parameter is null it is considered unbound
    // Report user ID, if parameter is null it is considered unbound.
    // @param customisedUserID User customised user ID - customised user ID
    - (void)updateCustomizedUserID:(nullable NSString *)customizedUserID;
    Setting location information
    // Report location information
    // Report location information
    // @param country Country - country
    // @param province - province
    // @param city - city
    - (void)updateAreaInfoWithCountry:(nullable NSString *)country Province:(nullable NSString *)province City:(NSString *)city;
    [[TMFMiniAppSDKManager sharedInstance] updateCustomizedUserID:@"abc123"];
    [[TMFMiniAppSDKManager shared instance] updateAreaInfoWithCountry:@"China" Province:@"Beijing" City:@"Chaoyang District"];

    Does it support uploading to a tri-party service when data is reported?

    Support APP to report mini program data to any service, see Logging and event reporting.

    Does mini program support data isolation for different login users?

    Yes.
    TCMPP SDK supports segregated storage of mini program data according to different logged-in users for data protection and business logic confusion, which requires the developer to implement the return of AppUID in the agent, and the SDK will store the data according to the AppUID.
    /**
    * @brief Get the current user account identifier of the SDK host platform, usually fill in uin or openid - Get the current user account identifier of the SDK host platform, usually fill in uin or openid
    * Note: Returning nil will invalidate some caches within the SDK. If not logged in, you can fill in a device number id to avoid cache invalidation - Note: Returning nil will cause some caches within the SDK to be invalidated. If not logged in, you can fill in a device number id to avoid cache invalidation.
    */
    
    - (NSString *_Nonnull)getAppUID;

    How do I pass parameters when Mini programs open?

    Mini programs can be opened by specifying the paramsStr parameter:
    [[TMFMiniAppSDKManager sharedInstance] startUpMiniAppWithAppID:@"mpbz0uqwzddj5zbt" scene:TMAEntrySceneNone firstPage:nil paramsStr:@"a=1&b=2" parentVC:self completion:^(NSError * _Nullable err) {}];
    In Mini programs, you can get the parameters passed in when opening in the extendData field of wx.getEnterOptionsSync:
    

    Debugging Related

    How to debug a mini program?

    After integrating the mini program SDK and running the mini program in Xcode (apps packaged using the develop profile can also be viewed using Safari on your computer), you can open Safari on your computer, and then in the toolbar Develop, select the running emulator or real device, you can select the list of pages opened by the mini program, and by selecting the currently opened page, you can review page elements, view network calls, and some logs.
    After ios16.4, because of system limitations, you need to turn on inspectable to support safari development mode, you can implement the relevant interfaces in the proxy class and return YES.
    // Whether to enable checkable after ios16.4, you can develop and debug via safari
    // Whether or not inspectable is enabled after ios16.4, you can develop and debug via safari.
    - (BOOL)inspectableEnabled;

    How to open vConsole?

    The development version and preview version of mini programs support to open the debug switch in the capsule menu to view the VConsole information, the official version of the mini program can not open the VConsole, you need to open the VConsole through the mini program internal call wx.setEnableDebug.
    TCMPP SDK also supports to open the vConsole mode of all mini programs automatically in the app settings, you need to implement the related interface in the proxy class.
    // Whether debugging is enabled
    // Whether debugging is enabled
    - (BOOL)vConsoleEnabled;
    How to troubleshoot when a mini program opens abnormally?
    When opening a mini program, you can get the error code and error description in the mini program callback interface. The error description contains the traceId of the current request. It is strongly recommended that you save the error information to facilitate troubleshooting.
    
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support