Device Control (local resource value/UI not provided by source code)
This SDK contains the UI and logic part of Aqara device control; the iOS version that the SDK depends on cannot be lower than 11.0.
Compiler environment: XCode14.0 or above.
Language: Object-C.
Dependency SDK list
The following SDKs are required to support the basic functions of device control:
| Name | Version | Function | Size |
|---|---|---|---|
| LMMeshDriverFramework | - | The logical part of equipment control, control instruction / receiving / processing | |
| LMMeshDriver_UI | - | The UI part of the device control, including the settings page and the device home page | |
| LMCommonUI | - | Aqara generic UI component library | |
| LMFramework | - | Aqara basic library, which encapsulates the general logic of Aqara |
Pod dependencies
pod 'YYModel'
pod 'AFNetworking', '3.2.0'
pod 'TTTAttributedLabel'
pod 'SVProgressHUD'
pod 'SDWebImage','5.9.1'
pod 'Masonry'
pod 'KVOController'
pod 'MJRefresh', '3.1.15.7'
pod 'RealReachability', '~> 1.3.0'
pod 'SSZipArchive'
pod 'SCIndexView', '2.2.3'
pod 'FMDB'
pod 'lottie-ios', '~> 2.5.3'
Integrated SDK
It is recommended to use the following directory structure to import the corresponding SDK:

SDK initialization and API description
Set initialization parameters
| Parameter | Description | Is it necessary | Source |
|---|---|---|---|
| host | Request domain name host | Yes | Aqara Open Platform |
| appId | ID issued by the open platform | Yes | Aqara Open Platform |
| appKey | Identity Key issued by the development platform | Yes | Aqara Open Platform |
| iconBaseUrl | Image Domain Prefix | Yes | Aqara Open Platform |
+ (void)setServer:(NSString*)host appId:(NSString*)appId appKey:(NSString*)appKey iconBaseUrl:(NSString *)iconBaseUrl;
Example:
[LMOpenSDK setServer:@"https://aiot-test.aqara.com/app/v1.0/lumi"
appId:xxxxxxx
appKey:xxxxxx
iconBaseUrl:@"https://cdn.aqara.com/cdn/common/mainland/test/statics/default"];
Set user account information
| Parameter | Description | Is it necessary | Source |
|---|---|---|---|
| userId | Current user account ID | Yes | Aqara Open Platform |
| token | Token of the current user account | Yes | Aqara Open Platform |
+ (void)setUserId:(NSString*)userId token:(NSString*)token;
Example:
[LMOpenSDK setUserId:xxxxx.xxxxzz
token:xxxxxxx];
Set the H5 resource path in the SDK
| Parameter | Description | Is it necessary | Source |
|---|---|---|---|
| h5UrlPrefix | Logs and other H5 related functions need to use | Not required | Aqara Open Platform |
+ (void)setH5UrlPrefix:(NSString *)h5UrlPrefix;
Example:
[LMOpenSDK setH5UrlPrefix:@"https://cdn.aqara.com/cdn/app/mainland/test-h5/index.html#"];
Set up languages
+ (void)setLanguage:(NSString*)language;
| Parameter | Description | Is it necessary | Code |
|---|---|---|---|
| language | Multilingual in SDK | Not required | See table below |
List of supported languages
| languageString | Description |
|---|---|
| zh-Hans | Chinese |
| en | English |
| ru | Russian |
| ko | Korean |
| zh-HK | Traditional |
| zh-Hant-TW | Taiwan - Traditional |
Example:
[LMOpenSDK setLanguage:@"zh-Hans"];
Read local resource bundle
[LMDriverConfig sharedInstance].isLocalResource(YES);