API and Version Notes
Applies to version 2.1.8.
SDK Management and Return Values
| API | Return value / notes |
|---|---|
GizSDKManager.sharedInstance.initSDK(config:) | Synchronous Void |
GizSDKManager.sharedInstance.getDevices() | async -> [GizDevice]; queries the cloud and merges device lists |
GizSDKManager.sharedInstance.getProductDataPointConfig(productKey:) | async -> String? |
GizSDKManager.sharedInstance.cleanCache() | Synchronous Void, clears caches |
GizSDKManager.sharedInstance.feedback(uploadLog:contact:content:) | async -> Void; errors are logged internally |
GizUserManager.sharedInstance.updateAuthorizeData(token:uid:) | Synchronous Void |
GizUserManager.sharedInstance.getAuthorizeData() | GizLoginResultInfo, not GizResult |
Call async methods in a Task or asynchronous function. For methods returning GizResult, inspect success, error, and optional data.
Provisioning and Module Profiles
provideWiFiCredentials(ssid:password:timeout:processHandler:bindWithUid:)returnsGizResult<GizBaseProfile?, GizActivatorException?>.timeoutis in seconds.bindWithUidisBool?with no default argument, so it must be passed explicitly.- For an AI module that establishes its own cloud binding, enable
bindWithUidand authorize the user first. See BLE and AP provisioning. - Read
capability.deviceProfile, casting BLE profiles toGizBleProfile.configuredisBool?.netStatusis aGizWifiDeviceNetStatusenum, not an integer. GizProductInfoStruct.cmbDeviceTypeIdenables CMB discovery.GizBleProfile.bleModuleVariantandsupport5GConfigdescribe the module variant and 5 GHz provisioning support.- AirLink uses
ESPTouchSmartConfig.sharedInstance.provideWiFiCredentialsWithAirLink(ssid:password:timeout:productKeys:processHandler:), returningGizResult<GizBaseProfile?, GizActivatorException?>.timeoutis in seconds;productKeysrestricts cloud confirmation to selected products. Cancel withstopProvideWiFiCredentialsWithAirLink(). This API has nobindWithUidargument.
Other Public Entry Points
| API | Notes |
|---|---|
capability.addDeviceDataListener(closure:) / removeDeviceDataListener(closure:) | Per-channel data listeners |
device.getDataPointConfig() | async -> DataPointConfig?, device product configuration |
device.sendDp(json:) | Selects an authenticated channel in LAN, BLE, MQTT order; returns GizResult |
device.lanCapability.sendDpToUDP(data:) | LAN UDP writes |
device.startMusicalRhythm(sensitivity:mode:callback:) / stopMusicalRhythm() | Synchronous Void; requires recording permission and device support |
userManager.getUserInfo() / changeUserInfo(info:) | Read or update user profile |
userManager.changeEmail(newEmail:code:) | Change-email entry point; validate server behavior for your application |
userManager.sendEmailChangeEmailVerifyCode(email:lang:) / sendMobileChangeEmailVerifyCode(phoneCode:phone:lang:) | Change-email verification codes |
Here userManager is GizUserManager.sharedInstance. The public transAnonymousUserToEmailUser, transAnonymousUserToPhoneUser, and transAnonymousUserToNormalUser methods currently return an empty success result without performing a conversion. Do not treat them as implemented functionality.