Last Updated on : 2025-04-16 03:18:57download
Resolve the issue of the gateway resetting after the gateway button is accidentally pressed.
The UI BizBundle must be v6.2.0 or later.
source 'https://github.com/tuya/tuya-pod-specs.git'
platform :ios, '11.0'
target 'Your_Project_Name' do
pod "ThingSmartBusinessExtensionKit"
end
Management class of the button anti-misoperation
open class ThingAntiMisoperationManager : NSObject {
...
}
Listener for the button anti-misoperation
public protocol ThingAntiMisoperationManagerListener : NSObjectProtocol {
optional func antiMisoperationManager(_ manager: ThingAntiMisoperationManager, statusDidUpdate status: Bool)
}
Add a listener.
open func add(_ listener: any ThingAntiMisoperationManagerListener)
Request parameter | Type | Description |
---|---|---|
listener | ThingAntiMisoperationManagerListener | The listener object. |
Remove a listener.
open func remove(_ listener: any ThingAntiMisoperationManagerListener)
Request parameter | Type | Description |
---|---|---|
listener | ThingAntiMisoperationManagerListener | The listener object. |
Check whether the device supports the button anti-misoperation mechanism.
open func isSupport(success: ((Bool) -> Void)?, failure: ((any Error) -> Void)? = nil)
Request parameter | Type | Description |
---|---|---|
success | Boolean | The success callback. true : supported. false : not supported. |
failure | error | The error message. |
Get the button anti-misoperation status.
open func getStatus()
Get the status callback via the listener.
Update the button anti-misoperation status.
open func updateStatus(_ status: Bool)
Request parameter | Type | Description |
---|---|---|
status | Boolean | The button anti-misoperation status. |
Get the status callback via the listener.
For more information, see the Demo.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback