IOS6.1: Problems trying to access Wi-Fi RSSI (MobileWiFi.framework)

I am trying to access the RSSI values ​​of several access points around me using iPod Touch 4G with iOS6.1 and Xcode 4.6.3 with a valid Provisioning Profile. I read a few discussions on this topic, and the best way to do this seems to be using the private MobileWifi Framework. Since this project is for private use only, I am fine with it.

According to this website, I need a special right to access MobileWiFi features. I had never worked with rights before, but according to some examples, the .entitlement file looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>keychain-access-groups</key>
    <array>
        <string>$(AppIdentifierPrefix)com.apple.wifi.manager-access</string>
    </array>
</dict>
</plist>

AppSync, . iPod, , , . :

WiFiManagerRef manager = WiFiManagerClientCreate(kCFAllocatorDefault, 0);
if (!manager)
    NSLog(@"ERROR: Couldn't create WiFiManagerClient!");

CFArrayRef devices = WiFiManagerClientCopyDevices(manager);
if (!devices)
    NSLog(@"ERROR: devices is NULL");

CFArrayRef networks = WiFiManagerClientCopyNetworks(manager);
if (!networks)
    NSLog(@"ERROR: networks is NULL");

NSLog(@"manager: %@", manager);
NSLog(@"%d devices: %@", (int)CFArrayGetCount(devices), devices);
NSLog(@"%d networks: %@",(int)CFArrayGetCount(networks), networks);

, WiFiManagerClientCopyDevices WiFiManagerClientCopyNetworks , , , 0x00000000 , - EXC_BAD_ACCESS .

, MobileWifi , . , .entitlement entitlement.xml ldid , , Xcode .

, , , , - !

+3
1

, .

wifi.manager. - wifi.manager /.

Xcode /.

    <key>com.apple.wifi.manager-access</key>
    <true/>

, , :

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>keychain-access-groups</key>
    <array>
        <string>YOUR_APP_BUNDLE_ID</string>
    </array>
    <key>com.apple.wifi.manager-access</key>
    <true/>
</dict>
</plist>
+1

All Articles