Xcode 4.1代码签名问题

Xcode 4.1代码签名问题,xcode,xcode4,code-signing,Xcode,Xcode4,Code Signing,我读了很多文章,在这里找不到任何类似我的问题。我认为这是一个简单的解决办法,但我似乎找不到答案。我使用的是Xcode 4.1 Gold Master 基本上,当我归档我的Mac应用程序时,它会经历所有正常的过程。构建成功。但是,当我提交到应用商店时,我收到了以下消息: Invalid Code Signing Entitlements - Your application bundle's signature contains code signing entitlements that ar

我读了很多文章,在这里找不到任何类似我的问题。我认为这是一个简单的解决办法,但我似乎找不到答案。我使用的是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>

应用程序标识符
My.App.Identifier
com.apple.application-identifier
My.App.Identifier
第一个键是导致问题的键。当我删除它并通过命令行使用相同的.xcent文件强制退出应用程序时,应用程序就会通过

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


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

我也面临同样的问题。看完你的留言后,我做了一点调查

看起来在构建过程中,.xcent文件是从位于/Developer/Platforms/MacOSX.platform/authentications.plist的文件生成的(它也可能位于/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/authentications.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>

com.apple.application-identifier
33R9UFHX3C.com.mycompany.myapp
然而,当我构建并上传它时,我仍然面临一个无效的二进制错误


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

我将在下一次构建时尝试一下!谢谢你的建议。好发现!再次感谢你的帮助!也为我工作。非常感谢。