2011-07-13 49 views
13

我已阅读了很多主题,在这里找不到像我的问题。我认为这是一个简单的解决方法,但我似乎无法找到答案。我正在使用Xcode 4.1 Gold Master。Xcode 4.1代码签名问题

基本上,当我存档我的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停止生成此密钥?每次我想要提交到应用商店时,我都不太喜欢这样做。

回答

13

我面临同样的问题。看完你的信息后,我调查了一下。

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

不过,我当我建立并上传仍然面临着无效的二进制错误。

编辑:它实际上工作。 (我有另一个非相关的问题)

+0

我会在下一次构建期间尝试这个尝试!感谢您的建议。 –

+0

好找!再次感谢您的帮助! –

+0

也为我工作。谢谢。 – Guillaume