答案 0 :(得分:0)
这是我已编写的代码。
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSArray *array = [NSArray arrayWithObjects:@"SSID of my network",nil];
bool ok = CNSetSupportedSSIDs((__bridge CFArrayRef) array);
if(ok)
{
NSLog(@"completed %lu",(unsigned long)[array count]);
}
else
{
NSLog(@"failed");
}
// Override point for customization after application launch.
return YES;
}