问题
I am using MobileWifi private framework to list all access points. Its a jailbroken phone and I use iOSOpenDev to compile and deploy. I included entitlements.xml in Project->BuildSettings->"Code Signing Entitlements"
XML has
<?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>com.apple.wifi.manager-access</key>
<true/>
</dict>
</plist>
I still get error
_wifi_manager_open Client WifiTest has no entitlement
I think I am missing the right way to add entitlements. Any ideas how to make it work?
EDIT: So I used ldid to sign the app per your previous answer. ldid gave following output.
WifiTest
<?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>application-identifier</key>
<string>ECZNUJJL7C.com.WifiTest</string>
<key>get-task-allow</key>
<true/>
<key>keychain-access-groups</key>
<array>
<string>ECZNUJJL7C.com.WifiTest</string>
</array>
</dict>
</plist>
I am assuming it signed the app. Then using iExplorer I transferred the WifiTest.app directly on device. It crashes. Logs show..
Sep 6 16:02:31 com.apple.launchd[1] (UIKitApplication:com.WifiTest[0x4d49][19575]) <Error>: (UIKitApplication:com.WifiTest[0x4d49]) posix_spawn("/var/mobile/Applications/CCCAA7CB-2304-4A99-8306-20234E38652F/WifiTest.app/WifiTest", ...): Permission denied
Sep 6 16:02:31 SpringBoard[19291] <Warning>: Unable to obtain a task name port right for pid 19575: (os/kern) failure
Sep 6 16:02:31 com.apple.launchd[1] (UIKitApplication:com.WifiTest[0x4d49][19575]) <Warning>: (UIKitApplication:com.WifiTest[0x4d49]) Exited with code: 1
Sep 6 16:02:31 SpringBoard[19291] <Warning>: Unable to look up event port name for pid 19575: (os/kern) successful
Sep 6 16:02:31 SpringBoard[19291] <Warning>: Unable to send activation event to <SBApplication: 0xd223be0> com.WifiTest animate statusBarOrientation = 1 activate: animationStart = 0 deactivate: : (ipc/send) invalid destination port
来源:https://stackoverflow.com/questions/18648995/ios-entitlements-in-jailbreak-solution-iosopendev