tencent cloud

Tencent Cloud Super App as a Service

Pre-Downloading Mini Programs

Download
Focus Mode
Font Size
Last updated: 2026-06-10 15:11:43
AI-Translated
Since the mini program checks for updates and synchronizes versions upon opening, there may be a waiting period. To minimize the startup time and enhance the user experience, the following API is provided to pre-download the mini program packages.
/// Preloads mini program information.
/// @param appIds List of mini program appids to preload.
/// @param isDownload Whether to download the package directly.
/// @param complete Batch preload callback.
- (void)preloadMiniApps:(NSArray *)appIds isDownload:(BOOL)isDownload complete:(void (^)(NSArray * _Nullable results, NSError *_Nullable error))complete;

Preload all subpackages of the specified mini programs

/// Preloads mini programs with main package and all subpackages.
/// @param appIds List of mini program appids to preload.
/// @param complete Batch preload callback.
/// @discussion The difference from preloadMiniApps:isDownload:complete: is that this method downloads all subpackages in appInfo.subPkgs to
// local storage, ensuring the mini program's full resources are available offline. Suitable for preload scenarios that require complete offline availability.


- (void)preloadMiniAppsWithAllPkgs:(NSArray *)appIds complete:(void (^)(NSArray * _Nullable results, NSError *_Nullable error))complete;




Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback