قالب وردپرس درنا توس
Home / IOS Development / ios – NEHotspotConfigurationManager cannot join

ios – NEHotspotConfigurationManager cannot join



I use NEHotspotConfigurationManager to programmatically connect wifi.
It is an open network with no password
I'll use the code below:

       if (@available (iOS 11.0, *)) {


NEHotspotConfiguration * config = [[NEHotspotConfiguration 
 alloc] initWithSSID: SSIDName];


[NEHotspotConfigurationManager.sharedManager applyConfiguration:config completionHandler:^(NSError* error) {
                if (error) {
                       printf([error description]);
}
else
{
printf (@ "success");
}
}];

I connect to the hostpot / access point of a device, but every time I get an error not to join, but in response, it goes to success as the error is zero. Is there anything I need to add to configuration or add to setting or am I missing something?

PS: wifi is by IOT device

̵

1; Thanks in advance


Source link