tencent cloud

Feedback

iOS Extended component

Last updated: 2024-07-03 18:15:27
    In development and usage, many system-authorized APIs require preset authorization in the project's info.plist file. However, your app might not need these features. Therefore, the TCMPP SDK splits out an extension SDK, eliminating unnecessary authorizations and reducing the core module size.
    The TCMPP SDK engine provides both core and extension modules, allowing users to integrate based on their needs.

    Connect to and use extended SDKs

    The mini program engine classifies SDKs into the core SDK and extended SDKs, and the latter is the supplement to the former. Therefore, extended SDKs need to depend on the core SDK. To guarantee the SDK security and stability, you should place APIs requiring permissions in extended SDKs as much as possible.

    TCMPPExtMedia

    `TCMPPSDKExtMedia` provides the default implementations of three APIs: `chooseMedia`, `chooseVideo`, and `chooseImage`. If the host app already has these capabilities, we recommend you implement them in open APIs. To use the media selection feature provided by TMF, you need to use this plugin.
    Usage
    pod 'TCMPPSDK'
    pod 'TCMPPSDKExtMedia'
    Add the following in info.plist file: Privacy - Photo Library Usage Description
    After adding the Media extended SDK, the supported mini program API list is as follows:
    API Name
    Description
    wx.chooseMedia
    select a photo or video
    wx.chooseVideo
    Select a video
    wx.chooseImage
    Select a photo
    Permissions involved:
    Permission
    Description
    Album access permissions
    Requires permissions to access the album

    TCMPPExtScanCode

    `TCMPPSDKExtScanCode` provides the processing logic for `wx.scanCode`. If the host app has code scanning and recognition capabilities, we recommend you use the following code to connect to the existing code scanning module:
    TMFMiniAppSDKDelegate.scanCode:(NSDictionary *)scanPrams navigationController:(UINavigationController *)navigationController completionHandler:(MACommonCallback)completionHandler;
    To use the code scanning feature provided by TMF, you need to use this plugin.
    Usage:
    pod 'ncnn'
    pod 'TMFCodeDetector'
    pod 'TCMPPSDK'
    pod 'TCMPPSDKExtScanCode'
    Add the following in info.plist file: Privacy - Camera Usage Description
    After adding the Scan Code extended SDK, the supported mini program API list is as follows:
    API Name
    Description
    wx.scanCode
    Invokes the client's code scanning UI to scan a code
    Permissions involved:
    Permission
    Description
    Camera permission
    Requires camera access for scanning codes

    TCMPPExtQMap

    TCMPPSDKExtQMap provides Tencent Map SDK capabilities for users in Chinese mainland.
    Usage:
    pod "TCMPPSDKExtQMap"
    Apply for an appkey on Tencent Maps Open Platform and set it in the code:
    [TMFAppletQMapComponent setQMapApiKey:@"XXXXXXXXXXX"];

    TCMPPExtBaiduMap

    TCMPPSDKExtBaiduMap provides the capabilities of the Baidu Maps SDK for users in mainland China.
    Usage:
    pod "TCMPPExtBaiduMap"
    Apply for an appkey on the Baidu Map open platform and set it in the code:
    [TMFAppletBaiduMapComponent setBaiduMapApiKey:@"XXXXXXXXXXX"];

    TCMPPExtAMap

    TCMPPSDKExtBaiduMap provides users in mainland China with relevant capabilities of the Gode Map SDK.
    Usage:
    pod "TCMPPExtAMap"
    Apply for appkey in the Gaode map open platform and set it in the code:
    [TMFAppletAMapComponent setAMapApiKey:@"XXXXXXXXXXX"];
    After adding the Tencent, Baidu, and AMap extended SDKs, the supported mini program API list is as follows:
    API Name
    Description
    Map
    Supports map-related APIs, including map display, location selection, and POI queries
    Permissions involved:
    Permission
    Description
    Locationa
    Requires location access for map display and positioning

    TCMPPExtLive

    If you need to use live components (live-player and live-pusher) for live streaming scenarios, you need to add the following SDKs to support the live component functionalities.
    pod "TCMPPSDKExtLive"
    pod 'TXLiteAVSDK_Professional', :podspec => 'https://liteav.sdk.qcloud.com/pod/liteavsdkspec/TXLiteAVSDK_Professional.podspec'
    In addition to adding the above dependencies, you also need to implement the following methods in TMFMiniAppSDKDelegate to provide the LicenseUrl and LicenseKey required by the live component for initialization. If you do not configure the correct LicenseUrl and LicenseKey, the live component functionality will be unavailable.
    Note:
    For details about obtaining LicenseUrl and LicenseKey, see Adding and Renewing License.
    - (NSString *)setLiveLicenceURL {
    return @"https://xxx.license";
    }
    
    - (NSString *)setLiveLicenceKey {
    return @"xxx";
    }
    Add the following in info.plist file:
    Privacy - Camera Usage Description
    Privacy - Microphone Usage Description
    After adding the Live extension SDK, the supported mini program API list is as follows:
    API Name
    Description
    wx.createLivePusherContext
    Creates a live streaming pusher context.
    LivePusherContext
    Supports APIs related to LivePusherContext
    wx.createLivePlayerContext
    Creates a live streaming player context
    LivePlayerContext
    Supports APIs related to LivePlayerContext
    Components
    -
    live-pusher
    Tag for pushing
    live-player
    Tag for playing
    Permissions involved:
    Permission
    Definition
    Camera permission
    -
    Recording permission
    -

    TCMPPExtAuthentication

    TCMPPExtAuthentication provides capabilities related to biometric authentication.
    Usage:
    pod "TCMPPExtAuthentication"
    Usage
    Add the following in info.plist file: Privacy - Face ID Usage Description
    After adding the biometric authentication extended SDK, the supported mini program API list is as follows:
    API Name
    Description
    wx.startSoterAuthentication
    -
    wx.checkIsSupportSoterAuthentication
    -
    wx.checkIsSoterEnrolledInDevice
    -
    Permissions involved:
    Permission
    Definition
    Biometric authentication access
    Requires biometric authentication permission

    TCMPPExtBLE

    TCMPPExtBLE provides capabilities related to low-energy Bluetooth and beacons.
    Usage:
    pod "TCMPPExtBLE"
    Add the following in info.plist file:
    Privacy - Bluetooth Always Usage Description
    Privacy - Bluetooth Peripheral Usage Description
    After adding the LBS extended SDK, the supported mini program API list is as follows:
    API Name
    Description
    Bluetooth - general
    General Bluetooth APIs
    Bluetooth - Low energy peripherals
    APIs related to peripheral devices
    Bluetooth - Low energy central
    APIs related to central devices
    Bluetooth - Beacon
    APIs related to Bluetooth beacons
    Permissions involved:
    Permission
    Description
    Bluetooth
     Required for Bluetooth operations
    Location
    Required for Bluetooth device search

    TCMPPExtCalendar

    TCMPPExtCalendar provides calendar-related capabilities.
    Usage:
    pod "TCMPPExtCalendar"
    Add the following in `info.plist` file:
    Privacy - Calendars Usage Description
    Privacy - Reminders Usage Description
    API list:
    API name
    Description
    addPhoneRepeatCalendar
    Adds a repeated event to the system calendar
    addPhoneCalendar
    Adds an event to the system calendar

    TCMPPExtClipBoard

    TCMPPExtClipBoard provides clipboard-related capabilities.
    Usage:
    pod "TCMPPExtClipBoard"
    API List:
    API name
    Description
    setClipboardData
    Sets the content of the system clipboard
    getClipboardData
    Gets the content of the system clipboard

    TCMPPExtContact

    TCMPPExtContact provides contact-related capabilities.
    Usage:
    pod "TCMPPExtContact"
    Add the following in `info.plist` file: Privacy - Contacts Usage Description
    API LIst:
    API name
    Description
    chooseContact
    Select a contact
    addPhoneContact
    Add phone contacts

    TCMPPExtLBS

    TCMPPExtLBS provides capabilities related to location services, maps, compass, accelerometer, device orientation, and gyroscope.
    Usage:
    pod "TCMPPExtLBS"
    Add the following in info.plist file:
    Privacy - Location Always and When In Use Usage Description
    Privacy - Location Always Usage Description
    Privacy - Location Usage Description
    Privacy - Location When In Use Usage Description
    Privacy - Motion Usage Description
    API List:
    API name
    Description
    Location
    A series of APIs related to location
    System map
    A series of APIs related to system maps
    Compass, accelerometer, device orientation, and gyroscope
    A series of APIs related to these sensors

    TCMPPExtMDNS

    TCMPPExtMDNS provides capabilities related to local network communication.
    Usage:
    pod "TCMPPExtMDNS"
    Add the following in `info.plist` file:
    Privacy - Local Network Usage Description
    Privacy - Bonjour services
    API List:
    API name
    Description
    MDNS
    A series of APIs related to MDNS

    TCMPPExtNetwork

    TCMPPExtNetwork provides capabilities related to TCP/UDP communication.
    Usage:
    pod "TCMPPExtNetwork"
    Add the following in info.plist file:
    App Transport Security Settings
    Allow Arbitrary Loads - YES
    Privacy - Bonjour services
    API List:
    API name
    Description
    TCP
    A series of APIs related to TCP
    UDP
    A series of APIs related to UDP

    TCMPPExtMp3Encoder

    TCMPPExtMp3Encoder provides the capability to save recordings as MP3 format when using RecorderManager.
    Usage:
    pod "TCMPPExtMp3Encoder"
    Usage:
    The recording to MP3 format depends on the Lame library, which is open-source under the GNU Library or Lesser General Public License version 2.0 (LGPLv2) and GNU General Public License version 2.0 (GPLv2). For details, see LAME. You can integrate as needed.
    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