Cydia用のアプリを開発しています。実際に接続されている Wi-Fi ネットワークの名前を取得する方法はありますか?
Apple SDK を使用する方法があるようですが、何かアイデアはありますか?
これは私の行動です:
-(IBAction)addCurrent:(id)sender {
if ([[objc_getClass("SBWiFiManager") sharedInstance] currentNetworkName] != @"") {
NSMutableDictionary *dict = [[NSMutableDictionary alloc] initWithContentsOfFile:pathFile];
NSMutableArray *networks = [dict objectForKey:@"Networks"];
[networks addObject:[[objc_getClass("SBWiFiManager") sharedInstance] currentNetworkName]];
[dict setObject:networks forKey:@"Networks"];
[dict writeToFile:pathFile atomically: YES];
[dict release];
}
アクションに接続されたボタンをクリックしても、plist ファイルに何も追加されません