如果你的 App 包含了 .entitlements 并且啟用了沙盒,但上傳到 App Store 時(shí)仍然出現(xiàn)如下錯(cuò)誤的話:
ERROR ITMS-90296: "App sandbox not enabled. The following executables must include the "com.apple.security.app-sandbox" entitlement with a Boolean value of true in the entitlements property list: [( "com.app.pkg/Payload/AppName.app/Contents/MacOS/AppName" )] Refer to App Sandbox page at https://developer.apple.com/devcenter/mac/app-sandbox/ for more information on sandboxing your app."
那就打開終端然后執(zhí)行如下命令:
- cd /yourprojectdirectory
- codesign --entitlements entitlements.plist -v -f -s "3rd Party Mac Developer Application: xxx xxx (XXXXXXXXXX)" yourappname.app
- productbuild --component yourappname.app /Applications --sign "3rd Party Mac Developer Installer: xxx xxx (XXXXXXXXXX)" yourappname.pkg