Xcode 4.1代码签名问题 [英] Xcode 4.1 Code Signing Issue

查看:77
本文介绍了Xcode 4.1代码签名问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I've read through many threads and can't find anything like my issue here. I think that this is a simple fix, but I just can't seem to find the answer. I'm using Xcode 4.1 Gold Master.

基本上,当我存档Mac应用程序时,它会经历所有正常过程。构建成功。但是,当我提交到应用程序商店时,会收到以下消息:

Basically, when I archive my Mac app, it goes through all the normal processes. The build is successful. However, when I submit to the app store, I get the following message back:

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文件:

My app was not ported from iOS and I have never setup entitlements. After many hours of digging, I found that the code sign phase was generating an .xcent file in this format:

<?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文件将其辞职时,该应用程序将通过。

The first key is the one causing the problem. When I remove that and force resign the app with the same .xcent file through the command line, then the app goes through.

我已删除并重新安装了xcode以查看

I've removed and reinstalled xcode to see if that helps...it doesn't.

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

I know this file creation is tied to the provisioning profile. It seems to be getting the right data, but adding that existing tag. I've checked both the project and build settings and there are no code signing entitlements at all. Any idea how I can get Xcode to stop generating this key? I'm not really fond of doing this every time I want to submit to the app store.

推荐答案

我遇到同样的问题。读完您的消息后,我进行了一些调查。

I face the same problem. After reading your message I investigated a little bit.

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

It looks like during the building process the .xcent file is generated from the file located at /Developer/Platforms/MacOSX.platform/Entitlements.plist (it may also be located in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Entitlements.plist).

I编辑了该文件,并用 com.apple.application-identifier替换了 application-identifier。
因此,现在.xcent文件仅包含:

I edited this file and replaced "application-identifier" by "com.apple.application-identifier". So now the .xcent file contains only:

<?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>

但是在构建和上传该文件时,我仍然会遇到无效的二进制错误。

However I still face a invalid binary error when I build and upload it.

编辑:它实际上起作用。 (我还有另一个不相关的问题)

it actually works. (I had another non-related issue)

这篇关于Xcode 4.1代码签名问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆