应用程序未能协同设计验证。签名是无效的,含有禁止使用的权利,或者未与分发签署

问题描述 投票:6回答:1

我试图推iOS应用程序到iTunes连接,但是当我尝试验证它在Xcode我得到这个错误:

Application failed codesign verification. The signature was invalid, contains disallowed entitlements, or it was not signed with an iPhone Distribution Certificate

我见过的有关同一个问题的问题加载,但这些并没有为我工作。我效仿苹果Technical Note TN2250的每一个步骤。我检查,在一个分布图中选择了发布构建设置(与通配符和应用自定义一个尝试)和模式是正确的。为了确保应用程序与轮廓上签字,我用的是codesign -d -vvvv MyApp.app命令,得到如下:

Executable=/Users/myuser/Library/Developer/Xcode/Archives/2012-09-17/myapp 17-09-12 09.27.xcarchive/Products/Applications/MyApp.app/MyApp
Identifier=com.example.MyApp
...
Authority=iPhone Distribution: My Company
Authority=Apple Worldwide Developer Relations Certification Authority
Authority=Apple Root CA
...

我检查的权利,这是我没有修改,与security cms -D -i MyApp.app/embedded.mobileprovision,得到这个:

<?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>ApplicationIdentifierPrefix</key>
    <array>
        <string>PR3F1X</string>
    </array>
    <key>CreationDate</key>
    <date>2012-09-17T07:20:35Z</date>
    <key>DeveloperCertificates</key>
    <array>
        <data>
                ...
        </data>
    </array>
    <key>Entitlements</key>
    <dict>
        <key>application-identifier</key>
        <string>PR3F1X.com.example.MyApp</string>
        <key>get-task-allow</key>
        <false/>
        <key>keychain-access-groups</key>
        <array>
            <string>PR3F1X.*</string>
        </array>
    </dict>
    <key>ExpirationDate</key>
    <date>2013-09-16T07:20:35Z</date>
    <key>Name</key>
    <string>PROFILE NAME</string>
    <key>TeamIdentifier</key>
    <array>
        <string>PR3F1X</string>
    </array>
    <key>TimeToLive</key>
    <integer>364</integer>
    <key>UUID</key>
    <string>...</string>
    <key>Version</key>
    <integer>1</integer>
</dict>
</plist>

这个应用程序的捆绑ID看起来像com.example.MyApp,我想上的情况下可能是问题,但改变了他们并没有这样做。在那之后,我撤销我的证书,拿到了新鲜mobileprovision概况和在整个过程中去再次,没有成功。

我使用该软件的Xcode 4.3.2与Mac OS X 10.7.4

我看不出是哪里的问题,我想的东西。

EDIT 1:不修改所述包ID需要我改变一些其他手动设置?

编辑2:我只是从零开始做了一个示例应用程序,使用相同的证书签署,一切都进行顺利,如此看来,这个问题是在配置中。我想看到这两个项目的设置之间的差异,但只有那些显着的将是第一个是仅限iPad,它使用一对夫妇的PhoneGap插件。

ios xcode itunesconnect code-signing
1个回答
0
投票

我有同样的问题。你必须检查你的应用程序的签名,看到How do I check the entitlements on my Application's Signature有以下几点:

codesign -d --entitlements - /path/to/MyGreatApp.app

这是OK,我不知道你有什么错误,如果你喜欢的东西:

Executable=/path/to/MyGreatApp.app/MyGreatApp
??qq?<?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>ABC123DE45.com.appleseedinc.mygreatapp</string>
        <key>get-task-allow</key>
        <false/>
        <key>keychain-access-groups</key>
        <array>
            <string>ABC123DE45.com.appleseedinc.mygreatapp</string>
        </array>
    </dict>
</plist>

但如果你只得到:

Executable=/path/to/MyGreatApp.app/MyGreatApp

那么,这是一个问题。也许,你的代码codesign工具辞职过程中损坏的权利。

我做了下面的步骤来解决它:

  1. 档案Xcode的任何应用程序。
  2. 选择“分发...'->”另存为企业特设部署”作为AppName.ipa
  3. 解压AppName.ipa
  4. 创建应用程序的签名文件的权利:协同设计-d --entitlements:enterprise.plist有效载荷/ PathToApp.app /
  5. 转至上传的应用程序所在的文件夹。
  6. 创建配置简介权利文件: 安全CMS -D -i /path/to/the.app/embedded.mobileprovision> provision_entitlements.plist
  7. 打开provision_entitlements.plist和enterprise.plist。修改enterprise.plist的设置,它应该等于provision_entitlements.plist->应享权利属性。保存更改。
  8. 当辞职的应用参数--entitlements enterprise.plist加入到协同设计工具。 codesign -fs "iPhone Distribution: My Company" APP_DIRECTORY --entitlements enterprise.plist
© www.soinside.com 2019 - 2024. All rights reserved.