tencent cloud

Extension SDK
Last updated: 2025-11-13 15:34:42
Extension SDK
Last updated: 2025-11-13 15:34:42
Many APIs that require system authorization for development and use need to be pre-authorized in the info.plist file of the project. However, your app may not need this feature, so the SDK has been split into core and extension modules, eliminating unnecessary permissions and reducing the size of the core module.
The SDK engine provides both core and extension modules, allowing users to integrate based on their specific needs.

Integration and usage of the extension SDKs

The extension SDK complements the core SDK, so to use the extension SDK, you must also depend on the core SDK. This separation ensures the security and stability of the SDK by placing APIs that require permissions into the extension SDK.

TCMPPExtMedia

TCMPPExtMedia provides the default implementations of three APIs: chooseMedia, chooseVideo, and chooseImage. If the superapp already has these capabilities, we recommend you implement them in open APIs. To use the media selection feature provided by SAS, you need to use this plugin.
How to use:
pod 'TCMPPExtMedia'
Add following lines to the info.plist file:Privacy - Photo Library Usage Description
After the Media extension SDK is added, the supported mini program APIs are as follows:
API name
Description
wx.chooseMedia
Selects an image or video.
wx.chooseVideo
Selects a video.
wx.chooseImage
Selects an image.
Required permissions:
Permission
Description
Gallery access
Required to access the gallery.

TCMPPExtScanCode

TCMPPExtScanCode module provides the processing logic for wx.scanCode. If the superapp has code scanning and recognition capabilities, it is recommended to integrate them through:
TMFMiniAppSDKDelegate.scanCode:(NSDictionary *)scanParams navigationController:(UINavigationController *)navigationController completionHandler:(MACommonCallback)completionHandler;
However, if you need to use the code scanning feature provided by the SDK, you need to use this plugin.
How to use:
pod 'TCMPPExtScanCode'
Add following lines to the info.plist file:Privacy - Camera Usage Description
After the QR code scanning extension SDK is added, the supported mini program APIs are as follows:
API name
Description
wx.scanCode
Opens the client’s QR code scanning interface
Required permissions:
Permission
Description
Camera
Required for QR code scanning.
Gallery access
Required to access the gallery.

TCMPPExtLive

If you need to use the live streaming components (live-player and live-pusher) for developing capabilities of live streaming push and pull, you need to refer to Mobile Live Video Broadcasting SDKdocument to select and integrate the live player, either TXLiteAVSDK_Live or TXLiteAVSDK_Professional. Additionally, you need to add the following SDKs to support the implementation of live streaming component features.
If you only integrate TXLiteAVSDK_Live, you will be able to use only the live streaming functionality and regular video playback. Example Podfile:
platform :ios, '9.0'
source 'https://github.com/CocoaPods/Specs.git'

target 'App' do
pod 'TXLiteAVSDK_Live'
end
If you need to use both live push-and-pull streaming and VOD playback, you need to integrate TXLiteAVSDK_Professional, for example:
pod "TCMPPExtLive"
pod "TXLiteAVSDK_Professional"
In addition to adding the above dependencies, you need to implement the following methods in TMFMiniAppSDKDelegate to provide the LicenseUrl and LicenseKey required for the live streaming component. This is necessary to complete the initialization configuration for the live streaming component. If you do not configure the correct LicenseUrl and LicenseKey, the live streaming component will not function properly.
Note:
For the method of obtaining the LicenseURL and LicenseKEY, see Adding and Renewing A License .
- (NSString *)setLiveLicenceURL {
return @"https://xxx.license";
}

- (NSString *)setLiveLicenceKey {
return @"xxx";
}
Add following lines to the info.plist file:
Privacy - Camera Usage Description
Privacy - Microphone Usage Description
After the live streaming extension SDK is added, the supported mini program APIs are as follows:
API name
Description
wx.createLivePusherContext
Creates the live streaming pusher context.
LivePusherContext
Supports LivePusherContext APIs.
wx.createLivePlayerContext
Creates a live streaming player context.
LivePlayerContext
Supports LivePlayerContext APIs.
Component
-
<live-pusher>
Streaming tag.
<live-player>
Playback tag.
Required permissions:
Permission
Description
Camera
-
Recording
-

TCMPPExtAuthentication

TCMPPExtAuthentication module provides capabilities related to biometric authentication.
Integration method:
pod "TCMPPExtAuthentication"
How to use:
Add following lines to the info.plist file:Privacy - Face ID Usage Description
After the biometric authentication extension SDK is added, the supported mini program APIs are as follows:
API name
Description
wx.startSoterAuthentication
-
wx.checkIsSupportSoterAuthentication
-
wx.checkIsSoterEnrolledInDevice
-
Required permissions:
Permission
Description
Biometric authentication access
Requires the biometric authentication permission.

TCMPPExtBLE

TCMPPExtBLE module provides Low Energy (BLE) Bluetooth and beacon related capabilities.
Integration method:
pod "TCMPPExtBLE"
How to use:
Add following lines to the info.plist file:
Privacy - Bluetooth Always Usage Description
Privacy - Bluetooth Peripheral Usage Description
After the LBS extension SDK is added, the supported mini program APIs are as follows:
API
Description
Bluetooth - general-purpose
General-purpose Bluetooth API.
Bluetooth - Low Energy (BLE) peripheral device
Bluetooth Low Energy (BLE) peripheral devices APIs.
Bluetooth-Low Energy (BLE) central device
Central device APIs.
Bluetooth - beacon
Bluetooth beacon APIs.
Required permissions:
Permission
Description
Bluetooth
Required to operate the Bluetooth.
Location permission
Required to search the Bluetooth device.

TCMPPExtCalendar

TCMPPExtCalendar module provides calendar-related capabilities.
Integration method:
pod "TCMPPExtCalendar"
How to use:
Add following lines to the info.plist file:
Privacy - Calendars Usage Description
Privacy - Reminders Usage Description
API list:
API name
API description
addPhoneRepeatCalendar
Adds a recurring event to the system calendar.
addPhoneCalendar
Adds an event to the system calendar.

TCMPPExtClipBoard

TCMPPExtClipBoard module provides clipboard-related capabilities.
Integration method:
pod "TCMPPExtClipBoard"
API list:
API name
API description
setClipboardData
Sets the content of the system clipboard.
getClipboardData
Gets the content of the system clipboard.

TCMPPExtContact

TCMPPExtContact provides contact-related capabilities.
Integration method:
pod "TCMPPExtContact"
How to use:
Add following lines to the info.plist file:Privacy - Contacts Usage Description
API list:
API name
API description
chooseContact
Selects a contact.
addPhoneContact
Adds a contact to the phone's contact list.

TCMPPExtLBS

TCMPPExtLBS module provides system positioning, system map, compass, accelerometer, device orientation, and gyroscope related capabilities.
Integration method:
pod "TCMPPExtLBS"
How to use:
Add following lines to the 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
API description
Location permission
Refer to APIs in Location
System map
Refer to APIs in Map Component
Compass, accelerometer, device motion, gyroscope

TCMPPExtMDNS

TCMPPExtMDNS module provides the capabilities to communicate over a LAN.
Integration method:
pod "TCMPPExtMDNS"
How to use:
Add following lines to the info.plist file:
Privacy - Local Network Usage Description
Privacy - Bonjour services
API list:
API name
API description
mDNS
Refer to APIs in mDNS

TCMPPExtNetwork

TCMPPExtNetwork module provides the capabilities for TCP/UDP communication.
Integration method:
pod "TCMPPExtNetwork"
How to use:
Add following lines to the info.plist file:
App Transport Security Settings
Allow Arbitrary Loads - YES
Privacy - Bonjour services
API list:
API name
API description
TCP
Refer to APIs in TCP Communication
UDP
Refer to APIs in UDP Communication

TCMPPExtMp3Encoder

TCMPPExtMp3Encoder module provides the capabilities to save files in MP3 format when using RecorderManager.
Integration method:
pod "TCMPPExtMp3Encoder"
How to use:
The MP3 saving feature provided by the platform depends on the Lame library. The Lame library is open-source and licensed under the GNU Library or Lesser General Public License version 2.0 (LGPLv2), GNU General Public License version 2.0 (GPLv2) For more information, see: LAME. You can integrate it as needed.

TCMPPExtMiniGame

TCMPPExtMiniGame module provides the capabilities to run mini games.
Integration method:
pod "TCMPPExtMiniGame"
How to use:
Note that TCMPPExtMiniGame currently only supports running and debugging on real devices. It does not support running on simulators.

TCSASExtGoogleAds

TCSASExtGoogleAds supports Google AdMob ad loading.
Integration method:
pod "TCSASExtGoogleAds"
How to use:
Note that this feature depends on AdMob. Please integrate it according to the official documentation first. For more information, see AdMob > Mobile Ads SDK (iOS) > Get Started.

TCSASBaseLib

TCSASBaseLib provides preloading of the base library to reduce the waiting time when the mini program is opened for the first time.
Integration method:
pod "TCSASBaseLib"


TCSASExtVodPlayer

TCSASExtVodPlayer is a video component built on the cloud VOD player. Once integrated, you can use advanced DRM video playback features.
Note:
The default preloading size is 2 MB.
In scenarios where the video auto-plays, the default buffer size is set to 30 seconds multiplied by the video bitrate.
In scenarios where the video does not auto-play, the default preloading size of 2 MB is loaded first, followed by a default buffer size of 5 MB.
Integration method:
pod "TCSASExtVodPlayer"
You need to refer to the VOD documentation > Integration Guideto choose between integrating the TXLiteAVSDK_Player_Premium or TXLiteAVSDK_Professional.
Using the official CocoaPods repository, you can specify the version number. Below is a sample Podfile:
platform :ios, '9.0'
source 'https://github.com/CocoaPods/Specs.git'

target 'App' do
pod 'TXLiteAVSDK_Player_Premium'
end
If you also use the TCMPPExtLive extension library, you need to integrate TXLiteAVSDK_Professional to enable live streaming functionality.
platform :ios, '9.0'
source 'https://github.com/CocoaPods/Specs.git'

target 'App' do
pod 'TXLiteAVSDK_Professional'
end
In addition to adding the above dependencies, you need to implement the following methods in TMFMiniAppSDKDelegate to provide the LicenseUrl and LicenseKey required for the live streaming component. This is necessary to complete the initialization configuration for the video component. If you do not configure the correct LicenseUrl and LicenseKey, the live streaming component will not function properly.
Note:
For the method of obtaining the LicenseURL and LicenseKEY, see Adding and Renewing A License .
- (NSString *)setLiveLicenceURL {
return @"https://xxx.license";
}

- (NSString *)setLiveLicenceKey {
return @"xxx";
}
After integrating TCSASExtVodPlayer, the premium player is used by default. However, if you have implemented the following delegate methods in TMFMiniAppSDKDelegate, you can choose to create the appropriate player based on the app or parameters.
- (id<TMAVideoPlayerDelegate>)app:(TMFMiniAppInfo *_Nonnull)app createVideoViewWithFrame:(CGRect)frame andVideoParams:(NSDictionary *)params;
Add following lines to the info.plist file:
Privacy - Camera Usage Description
Privacy - Microphone Usage Description
After the extension SDK is added, the supported mini program APIs are as follows:
API name
Description
Video component
Required permissions:
Permission
Description
Camera
Records a video using the camera.
Recording
Records audio for playing audio and video

TCMPPExtQMap

TCMPPExtQMap provides Tencent Maps.
Integration method:
pod "TCMPPExtQMap"
Apply for an appkey on Tencent Maps Open Platform and set it in the code:
[TMFAppletQMapComponent setQMapApiKey:@"XXXXXXXXXXX"];
Add following lines to the 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
API list:
API name
API description
Location permission
Refer to APIs in Location
Map
Refer to APIs in Map Component
If you want to use the offline map feature, you need to implement the stringWithConfigKey method in the TMFMiniAppSDKDelegate protocol. For the key TMA_SK_MINIAPP_QMapOffline_Enabled, return 0 or 1, with 0 as the default indicating the feature is disabled.
Example:
- (NSString *)stringWithConfigKey:(NSString *)key {
if([key isEqualToString:TMA_SK_MINIAPP_QMapOffline_Enabled]) {
return @"1";
}
return nil;
}



Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback