react-native-esptouch-smartconfig
Version:
React Native module for ESP-Touch SmartConfig to provision IoT devices over Wi-Fi on iOS and Android.
31 lines (27 loc) • 725 B
Markdown
// Set result callback
[ ]; // if YES send broadcast packets, else send multicast packets
```
- Execute task
```Objective-C
int expectCount = 1;
NSArray * results = [task executeForResults:expectCount];
ESPTouchResult *first = [results objectAtIndex:0];
if (first.isCancelled) {
// User cancel the task
return;
}
if (first.isSuc) {
// EspTouch successfully
}
```
- Cancel task
```Objective-C
[ ];
```
- [example](../UI/V1/)
- Create task instance
```Objective-C
ESPTouchTask *task = [[ESPTouchTask alloc] initWithApSsid:apSsid andApBssid:apBssid andApPwd:apPwd];
[ ];