[英]aps-environment is always development
I have created the app id with APNS enabled and I configured both development and production certificate我创建了启用 APNS 的应用程序 ID,并配置了开发和生产证书
Now when I create entitlements it is always displaying development even If I change the Provisioning profile to iTunes deployment also the entitlements is displayed as development现在,当我创建权利时,它总是显示开发,即使我将配置文件更改为 iTunes 部署,权利也会显示为开发
<?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>aps-environment</key>
<string>development</string>
</dict>
</plist>
You can't use a production certificate in debug/development.您不能在调试/开发中使用生产证书。 Even if you do it, then, when you 'Archive', Xcode will automatically set it to production ( Apple reference ).即使你这样做了,那么,当你“归档”时,Xcode 会自动将它设置为生产( Apple 参考)。 You can see this when you try to submit your app to iTunes connect for TestFlight/Review or for Adhoc deployment.当您尝试将您的应用程序提交到 iTunes Connect 以进行 TestFlight/Review 或 Adhoc 部署时,您会看到这一点。
Xcode 8:代码 8:
Xcode 9:代码 9:
There is a known bug in Xcode whereby manually setting this to 'production' causes Xcode to display an error next to your entitlements config with a 'Fix Issue' button. Xcode 中有一个已知错误,手动将其设置为“生产”会导致 Xcode 在您的权利配置旁边显示错误,并带有“修复问题”按钮。 Clicking this sets it back to 'development' This is not intended functionality.单击它会将其设置回“开发” 这不是预期的功能。 As I said it is a known issue and I believe I filed a radar when I first discovered it.正如我所说,这是一个已知问题,我相信我第一次发现它时就提交了雷达。
It has been fixed in Xcode 8.3 beta 2. In the meantime, manually set it to 'production' and then ignore the error Xcode gives you, your project will work just fine.它已在 Xcode 8.3 beta 2 中修复。同时,手动将其设置为“生产”,然后忽略 Xcode 给您的错误,您的项目将正常运行。
XCode 10.2:代码 10.2:
If you change your target to "Generic iOS Device" before Archive it will set the aps-environment variable to production.如果您在存档之前将目标更改为“通用 iOS 设备”,它会将 aps-environment 变量设置为生产。 If you archive with the target set to your device it will archive with the aps-environment variable set to development.如果您将目标设置为您的设备进行存档,它将使用设置为 development 的 aps-environment 变量进行存档。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.