我想分享未签名的 xcarchive。制作未签名的 xcarchive。我将临时配置文件和签名证书设置为无。 我已经用以下命令一一创建了 Xcarchive。
xcodebuild -scheme xxxx -workspace xxx.xcworkspace -configuration Release clean archive -archivePath "/Users/exxx/Desktop/PROD/xxx.xcarchive" CODE_SIGN_ENTITLEMENTS=/Users/exxx/Desktop/PROD/Cert/entitlements.plist CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
& 不通过 CODE_SIGN_ENTITLEMENTS
xcodebuild -scheme xxxx -workspace xxx.xcworkspace -configuration Release clean archive -archivePath "/Users/exxx/Desktop/PROD/xxx.xcarchive" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
当我使用 Organizer 上传该存档时,在最终检查时它会显示授权摘要,其中始终缺少“aps-environemt” key 。我附上了屏幕截图以供引用。两个版本都有同样的问题。
我也尝试过将相同的导出存档导出到 codesign 并获得权利,但这也不起作用。 (使用以下命令)
codesign --entitlements /Users/xxx/Desktop/PROD/Cert/xxx.entitlements -f -s xxx /Users/xxx/Desktop/PROD/xxx.xcarchive
当我的上传完成后收到来自苹果的邮件,
您的应用似乎注册了 Apple 推送通知服务,但应用签名的权利不包括“aps-environment”权利...
最佳答案
要将 APS 权利添加到您的 xcarchive,您应该使用具有 aps-environment 的
键(和其他需要的键)例如:entitlements.plist
sign
您的 .app
文件
entitlements.plist
<?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>
接下来使用权利签署嵌入式框架和您的应用文件:
$ codesign -f -s "<codesiging identity>" -v /foo.xcarchive/Products/Application/foo.app/Frameworks/*
$ codesign -f -s "<codesiging identity>" --entitlements /pathToEntitlements/entitlements.plist /foo.xcarchive/Products/Application/foo.app
要获得可用的代码签名身份,请运行下一个命令:
security find-identity -vp codesigning
关于ios - 缺少未签名的 xcarchive aps 环境,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65678931/