iphoneobjective-cwificaptivenetwork

CaptiveNetwork : CNSetSupportedSSIDs usage


I tried to use CaptiveNetwork in order to replace the web sheet that for user authentication with the network. The method is CNSetSupportedSSIDs.

I have tried to add this method in AppDelegate of my app, but when I want to use a hotspot with the SSID that I have registred with the method above, nothing happend. The web sheet not appear, but my app is not opened.

This is my code :

CFStringRef ssids[2] = { CFSTR("Wifi 1"), CFSTR("Wifi 2") };
CFArrayRef arr_ssids = CFArrayCreate(NULL, (const void **)ssids, 2, &kCFTypeArrayCallBacks);

if( CNSetSupportedSSIDs((CFArrayRef)array))
{
    NSLog(@"Successfully registered supported network SSIDs");
}
else
{
    NSLog(@"Error: Failed to register supported network SSIDs");
}
CFRelease(arr_ssids);

PS : I have also added an URL scheme to my app.

Thanks for your answers !


Solution

  • I have submitted a bug to apple and they answer that it will not pop up our app.