MeiCam SDK For iOS  3.11.2
Asset Package Installation

Meishe SDK offers many kinds of asset packages, including stickers, filters, themes, transitions, etc. When using a kind of the asset package,users need to install, upgrade or uninstall. For each type of asset package, there is a uniform installation method. The steps are as follows:
1. Users need to log in to the Meishe SDK official website and download the corresponding asset package. Note: changing the name and suffix of the downloaded package is not allowed. If users use the license file, forbid modifying the suffix.

2.After initializing the class of NvsStreamingContext, users can obtain the resource package manager object through the NvsStreamingContext property of "assetPackageManager".


3.After getting the object of resource package manager, users can call the installAssetPackage() interface to install the package. If the return type is NvsAssetPackageManagerError_NoError or NvsAssetPackageManagerError_AlreadyInstalled, it indicates that the installation is successful or has been installed. Others mean the installation fails. If the installation fails, users can find the reason for the corresponding installation failure according to the return value. If the installation is successful, the UUId value of the asset package is obtained which is used to add package assets (including themes, filters, transitions, etc.).

Note,Installation error lies in two points:
First, the installation interface installAssetPackage() needs to pass in the type of the package to be installed, which may cause an error.
The second is that initialize the NvsStreamingContext using the SDK license, the asset license must be added when users installs the asset package, otherwise it will report an error.

In addition, if users want to upgrade or uninstall after installation, users need to call the upgradeAssetPackage() interface or the uninstallAssetPackage() interface.