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 !
I have submitted a bug to apple and they answer that it will not pop up our app.
It seems this is not a complete implementation by Apple. You need to have valid 'entitlements' to use their system library. See this handy post explaining it some more:
http://kalapun.com/blog/2013/02/11/reverse-engineering-ios-app/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With