Xcode 4.1代码签名问题

Sco*_*ell 13 xcode code-signing xcode4

我已阅读了许多主题,但在这里找不到类似我的问题.我认为这是一个简单的修复,但我似乎无法找到答案.我正在使用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.
Run Code Online (Sandbox Code Playgroud)

我的应用程序未从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>
Run Code Online (Sandbox Code Playgroud)

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

我删除并重新安装了xcode以查看是否有帮助......它没有.

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

Tho*_*mas 13

我面临同样的问题.看完你的留言后我调查了一下.

看起来在构建过程中,.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>
Run Code Online (Sandbox Code Playgroud)

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

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