I am having issues implementing the code from the answer on this question: iPhone get SSID without private library
I have xcode 4.2 and iOS 5.1.
#import <SystemConfiguration/CaptiveNetwork.h>
- (id)fetchSSIDInfo
{
NSArray *ifs = (id)CNCopySupportedInterfaces();
NSLog(@"%s: Supported interfaces: %@", __func__, ifs);
id info = nil;
for (NSString *ifnam in ifs) {
info = (id)CNCopyCurrentNetworkInfo((CFStringRef)ifnam);
NSLog(@"%s: %@ => %@", __func__, ifnam, info);
if (info && [info count]) {
break;
}
[info release];
}
[ifs release];
return [info autorelease];
}
I get the following errors:
What am I doing wrong?