我想分享未经签名的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当我上传与组织者的档案,然后在最后的检查,它显示的权利摘要,其中‘aps-环境’键总是丢失。我已附上屏幕快照,以供参考。两种构建都有相同的问题。
我还尝试了将相同的导出存档导出到codesign,但这也不起作用。(以下命令)
codesign --entitlements /Users/xxx/Desktop/PROD/Cert/xxx.entitlements -f -s xxx /Users/xxx/Desktop/PROD/xxx.xcarchive当我上传完之后收到一封来自苹果的邮件,
您的应用程序似乎注册到苹果推送通知服务,但应用签名的权利不包括‘aps-环境’的权利.

发布于 2022-04-29 11:01:47
要将APS权限添加到xcarchive中,您应该使用具有sign密钥(和其他所需密钥)的entitlements.plist对.app文件进行entitlements.plist处理,例如:
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要获得可用的codesign标识,请运行next命令:
security find-identity -vp codesigninghttps://stackoverflow.com/questions/65678931
复制相似问题