简体   繁体   English

aps-环境永远是发展

[英]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 8

Xcode 9:代码 9:Xcode 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.

相关问题 iOS Team Provisioning Profile是否与开发aps环境兼容? - Is the iOS Team Provisioning Profile compatible with the development aps-environment? CloudKit,远程通知和aps环境 - CloudKit, remote-notification, and aps-environment CloudKit +没有有效的APS环境授权错误 - CloudKit + no valid aps-environment entitlement error 没有有效的&#39;aps-environment&#39;权利字符串 - no valid 'aps-environment' entitlement string Apple推送通知错误(aps-environment) - Apple Push Notification Error (aps-environment) Xcode 8说Provisioning Profile具有aps环境权利,但是在导出后缺少aps环境存档 - Xcode 8 Says Provisioning Profile Has aps-environment entitlement but after export Archive aps-environment is missing 找不到适用于企业应用程序的应用程序的有效aps环境权利字符串 - No valid aps-environment entitlement string found for application for Enterprise app 应用程序失败的代码签名验证-非法密钥APS环境 - Application failed codesign verification - illegal key aps-environment 推送通知对话框即使在没有aps环境的情况下也显示 - Push Notification Dialog displaying Even without aps-environment 没有为通知应用程序中的应用程序找到有效的“aps-environment”权利字符串 - no valid 'aps-environment' entitlement string found for application in Notifications app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM