iOS SDK
API and Version Notes

API and Version Notes

Applies to version 2.1.8.

SDK Management and Return Values

APIReturn 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:) returns GizResult<GizBaseProfile?, GizActivatorException?>.
  • timeout is in seconds. bindWithUid is Bool? with no default argument, so it must be passed explicitly.
  • For an AI module that establishes its own cloud binding, enable bindWithUid and authorize the user first. See BLE and AP provisioning.
  • Read capability.deviceProfile, casting BLE profiles to GizBleProfile. configured is Bool?. netStatus is a GizWifiDeviceNetStatus enum, not an integer.
  • GizProductInfoStruct.cmbDeviceTypeId enables CMB discovery. GizBleProfile.bleModuleVariant and support5GConfig describe the module variant and 5 GHz provisioning support.
  • AirLink uses ESPTouchSmartConfig.sharedInstance.provideWiFiCredentialsWithAirLink(ssid:password:timeout:productKeys:processHandler:), returning GizResult<GizBaseProfile?, GizActivatorException?>. timeout is in seconds; productKeys restricts cloud confirmation to selected products. Cancel with stopProvideWiFiCredentialsWithAirLink(). This API has no bindWithUid argument.

Other Public Entry Points

APINotes
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.