By default, Mini Program components include all API capabilities. You can remove any APIs that your Mini Program does not use.
Component supported by remove_pod | Component description | Included APIs |
mPaaS_TinyApp_Audio | Mini Program audio | audio |
mPaaS_TinyApp_Device | Mini Program device | my.onAccelerometerChange(function callback) my.onGyroscopeChange(function callback) my.onCompassChange(function callback) my.onUserCaptureScreen(CALLBACK) my.getScreenBrightness(OBJECT) |
mPaaS_TinyApp_Location | Mini Program location | |
mPaaS_TinyApp_Multimedia | Mini Program multimedia | |
mPaaS_TinyApp_Player | Mini Program player | |
mPaaS_TinyApp_Scan | Mini Program code scanning |
Procedure
Install the beta version of the cocoapods-mPaaS plugin.
NoteThe beta version of the cocoapods-mPaaS plugin is supported on baselines 10.2.3 and later.
sh <(curl -s http://mpaas-ios-test.oss-cn-hangzhou.aliyuncs.com/cocoapods/installmPaaSCocoaPodsPlugin.sh)After the installation is complete, run the
pod mpaas version --plugincommand to verify that the beta version is installed.Run the
pod mpaas update 10.2.3command to update the local baseline.Before running the
mPaaS_podcommand, addremove_pod "mPaaS_xxx"to yourPodfile. For example, to remove the Mini Program audio component, addremove_pod "mPaaS_TinyApp_Audio"beforemPaaS_pod "mPaaS_Ariver".remove_pod "mPaaS_TinyApp_Audio" mPaaS_pod "mPaaS_Ariver" pod 'xxx' # The corresponding third-party native library