As a developer, you can add necessary switch configuration items in Mobile Delivery Service > Configuration management in the mPaaS Console and deliver the configuration items by platform, whitelist or percentage, version, device model, Android or iOS version and other information.
Install the switch configuration service SDK on the Android or iOS client.
You can add configuration items one by one, or import a JSON file to add the configuration items in batches.
The switch configuration list shows information including the configuration keys, creation time, update time, creator, and modifier. The newly created configuration item is activated by default.
Log in to the mPaaS console, and complete the following steps:
- From the navigation bar on the left, click Mobile Delivery service > Configuration management.
- Click Add configuration, add Configuration key, Resource value, and choose Platform and Type. The resource value is the value of the configuration key. A configuration key may have multiple resource values. Click the Add button to set multiple resource values.
- (Optional) Click Add on the right of Advanced rule, and set version, osVersion, and device model to deliver the configuration selectively.
- Click Finished after you complete the configurations, and the items will appear in the configuration list.
On the Configuration Switch Management page, click More operations > Import file, and import a JSON file containing configuration items. The configuration items will appear in the list after import succeeded.
On the Configuration switch management page, enter a keyword to search for the configuration item.
Complete the following steps to modify a configuration item:
- On the Configuration switch management page, select the target configuration item and click Modify.
- Edit the Note, Resource value, Platform, Type or Advanced rule field based on your needs, and click Finished. The configuration key cannot be modified.
The newly created configuration item is activated by default. If you don’t need a configuration, you can click Disable to deativate the configuration item. Likewise, for disabled configuration items, click Activate to make them take effect again.
After the switch key is released through the console, the client can obtain the key value corresponding to the switch key by calling interfaces: