- (void)applyConfiguration:(NEHotspotConfiguration *)configuration error is nil when connect failed

NEHotspotConfiguration *config = [[NEHotspotConfiguration alloc] initWithSSID:[NSString stringWithFormat:@"SomeSSID"];
[[NEHotspotConfigurationManager sharedManager] applyConfiguration:config completionHandler:^(NSError * _Nullable error) {
}];


This function does not giving an error(error is nil) when it failed to connect the given ssid, but an alert message is presented "Unable to join network SomeSSID"



How do we know as developer if the app is connect to the SSID.


Thanks ahead.

Replies

Same here.
Did you opend a bug on that?

Did you read this :

https://stackoverflow.com/questions/48670034/nehotspotconfigurationmanager-no-error-for-invalid-password-ssid


And it provides answer to your request:

"After filing a radar with Apple, it appears this API is working as designed. The success/failure case only applies to the application of the hotspot configuration.

The good news is, I have found a suitable work around for this in using

CNCopySupportedInterfaces
to verify if the app has indeed connected to the SSID it said it did."