I use NEHotspotConfigurationManager in a native module developed for a react native app, to connect to a device that exposes an open wifi hotspot. In older iOS versions (iOS 12 and lower) it worked fine, but in iOS 13 the device is being disconnected after a few seconds of being connected.
this is my native method, I use joinOnce
as it makes sense according to the docs:
NEHotspotConfiguration* configuration = [[NEHotspotConfiguration alloc] initWithSSID:ssid];
configuration.joinOnce = true;
[[NEHotspotConfigurationManager sharedManager] applyConfiguration:configuration completionHandler:^(NSError * _Nullable error) {
if (error != nil) {
reject(ERR_HOTSPOT_CONFIGURATION, ERR_HOTSPOT_CONFIGURATION, error);
} else {
resolve(nil);
}
}];
What is the proper way of keeping the connection up for longer periods of time? Is this an intended/documented change in iOS 13? Is it a bug?
Also, in Android if the hotspot does not have internet connectivity the system automatically switches to mobile network. Is this some similar policy in iOS? The device I am connecting to does not provide internet access