如链接中所示:How containerURLForSecurityApplicationGroupIdentifier in NSFileManager works on iOS 7 我能够在模拟器上获得两个应用程序访问公共位置 /Library/Application%20Support/iPhone%20Simulator/7.0.3/Containers/somegroupIDhere / 。
然而,当我尝试在设备(iPhone / iPad)上运行应用程序时,我得到以下错误
以下是我的权利文件
<?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>teamIDHere.com.abc.pqr</string>
</array>
<key>Can be debugged</key>
<true/>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.application-groups</key>
<array>
<string>teamIDHere.com.abc.pqr</string>
</array>
</dict>
</plist>