Xcode 4.1代码签名问题

我读过很多线程,找不到像我这个问题这样的东西.我认为这是一个简单的修复,但我似乎找不到答案.我正在使用 Xcode 4.1 Gold Master.

基本上,当我归档我的Mac应用程序时,它会遍历所有正常的进程.构建成功.但是,当我提交给应用商店时,我会收到以下消息:

Invalid Code Signing Entitlements - Your application bundle's signature contains code 
signing entitlements that are not supported on Mac OS X; this may happen if your Mac OS X 
project was ported from iOS. Please check your Xcode project's code signing entitlements 
configuration,and remove any unneeded entitlements.

Specifically,key "application-identifier" in "My App" is not supported.

我的应用程序没有从iOS移植,我从来没有设置权限.经过许多小时的挖掘,我发现代码符号阶段正在以下列格式生成一个.xcent文件:

<?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>application-identifier</key>
    <string>My.App.Identifier</string>
    <key>com.apple.application-identifier</key>
    <string>My.App.Identifier</string>
</dict>
</plist>

第一个关键是导致问题的关键.当我删除它,并通过命令行强制使用相同的.xcent文件重命名该应用程序,然后该应用程序通过.

我已经删除并重新安装了xcode,看看是否有帮助…它没有.

我知道这个文件创建与配置配置文件有关.它似乎正在获取正确的数据,但添加现有的标签.我已经检查了项目和构建设置,并且根本没有代码签名授权.任何想法如何可以让Xcode停止生成这个密钥?每次我想提交到应用商店时,我都不太喜欢这样做.

解决方法

我面对同样的问题.阅读你的消息后,我调查了一点.

看起来像在构建过程中,.xcent文件是从位于/Developer/Platforms/MacOSX.platform/Entitlements.plist的文件生成的(它也可能位于/Applications/Xcode.app/Contents/Developer/Platforms/ MacOSX.platform / Entitlements.plist).

我编辑了这个文件,并用“com.apple.application-identifier”替换了“application-identifier”.
所以现在.xcent文件只包含:

<?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>com.apple.application-identifier</key>
    <string>33R9UFHX3C.com.mycompany.myapp</string>
</dict>
</plist>

但是,当我构建和上传它时,我仍然面临无效的二进制错误.

编辑:它实际上是有效的. (我有另一个不相关的问题)

相关文章

当我们远离最新的 iOS 16 更新版本时,我们听到了困扰 Apple...
欧版/美版 特别说一下,美版选错了 可能会永久丧失4G,不过只...
一般在接外包的时候, 通常第三方需要安装你的app进行测...
前言为了让更多的人永远记住12月13日,各大厂都在这一天将应...