未安装应用“ XXX” ...因为权利无效 [英] The app XXX was not installed ... because the entitlements are not valid

查看:99
本文介绍了未安装应用“ XXX” ...因为权利无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为一小部分非开发人员测试人员创建内部版本,以便在将其提交到iTunes Connect之前对我的应用程序进行一些Beta测试。我已经阅读分发您的应用进行测试(您可能需要在Apple进行注册才能阅读)以及关于Ad Hoc分发的技术说明TN2250 ,以及无数的博客文章和Stack Overflow文章,但到目前为止都没有成功。



我已采取的步骤:




  • (我正在运行Xcode 3.2 .5。)

  • 我已经在iOS
    供应门户中创建了开发
    供应配置文件,并为所有测试人员提供了
    设备。

  • 我已经下载了此配置文件,并将
    拖到管理器窗口中,
    将其安装到Xcode中,我可以
    看到
    Development> Provisioning Profiles中的ofile


  • 项目和
    项目中,我都将此配置文件设置为 Code
    Signing Identity> Any iOS目标设置

  • 我创建了一个Entitlements.plist
    文件,将属性列表类型设置为
    iPhone Entitlements plist,删除了
    所有行除了可以调试
    ,并将其设置为未选中

  • 我已将代码签名
    权利设置为Entitlements.plist
    (确切的,区分大小写的名称)在
    项目和目标设置中

  • 我已经构建并存档了我的项目

  • 从管理器窗口中,我已经
    选择了我的项目,单击
    共享...,选择与上面使用的相同的
    配置文件,
    将生成的.ipa保存到磁盘

  • 我已压缩.ipa和
    的配置文件到一个zip文件
    中,并通过电子邮件发送给我的测试人员



测试人员有:




  • 解压缩我发送的文件

  • 仅通过拖动$ b尝试安装$ b .ipa到iTunes并进行同步

  • 尝试通过首先将
    的.mobileprofile拖动到iTunes并进行
    同步



  • 无论哪种情况,在同步结束时,他们都会看到一个对话框,其中显示 [未安装应用[我的应用名称] >其设备和设备名称],因为授权无效。



    可能还需要注意的是,我能够分发较早版本的去年秋天,同一测试人员使用了相同的应用程序,没有任何问题,也没有权利列表。除了升级Xcode,我不确定发生了什么变化。



    任何人都可以提供任何见解或看到我在做什么错吗?



    [我也已在Apple开发人员论坛上发布了此文件,并将在此处重新发布任何解决方案。]

    解决方案

    *。ipa文件应该已经包含了配置文件。如果使用zip实用程序,则可以从Windows机器上轻松看到。该文件只是一个具有不同扩展名的zip存档。



    设备是否位于该应用程序的正确iOS版本上?



    设置>中的设备上一般>配置文件,您会看到已安装的所有配置文件的列表,这些配置文件已消除了该问题。添加新设备时,每个创建的新证书都会获得多份副本。删除所有配置文件并检查是否添加了最新的配置文件并没有什么坏处。



    进行构建时,在构建结果中右键单击并选择以脚本文本文件的形式打开这些最新结果,然后搜索 CodeSign ,这将为您显示该步骤的输出,您应该清楚地看到使用哪个配置文件。您还可以搜索Entitlements.plist,检查使用的路径,然后查看该文件。



    您说已删除所有行。我没有可以调试的条目,但是我有
    application-identifier keychain-access-group 听起来与代码签名有关。这是您可以尝试的文件的纯文本版本;

     <?xml version = 1.0 encoding = UTF -8?> 
    <!DOCTYPE plist公用-// Apple // DTD PLIST 1.0 // EN http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
    < plist version = 1.0>
    < dict>
    <!---必需的权利(在大多数情况下不应更改)--->
    < key>应用程序标识符< / key>
    < string> $(AppIdentifierPrefix)$(CFBundleIdentifier)< / string>
    < key> keychain-access-groups< / key>
    < array>
    < string> $(AppIdentifierPrefix)$(CFBundleIdentifier)< / string>
    < / array>

    <!---下面的自定义权利--->


    < / dict>
    < / plist>

    如果其中任何一个出现错误,这些都是Apple在准备发行版本时建议的步骤;


    1. 选择目标并打开构建设置检查器。确认您是分发配置中的

    2. 删除代码签名身份:iOS分发:COMPANYNAME

    3. 在 Xcode构建菜单中,选择清理所有目标。

    4. 使用Finder删除Xcode项目中的任何现有构建目录。

    5. 重新启动Xcode并打开您的项目。

    6. 在目标构建设置检查器中重新输入代码签名身份iOS发行版:COMPANYNAME。

    7. 重建您的项目。

    希望其中一些有助于或引发麻烦!时刻。


    I'm trying to create a build for a small group of non-developer testers to do some beta testing on my App before I submit it to iTunes Connect. I have read the Developer's Guide on "Distributing Your App for Testing (you may need to be registered with Apple to read this) as well as Technical Note TN2250 on Ad Hoc distribution, and innumerable blog posts and Stack Overflow articles, but with no success thus far.

    Steps I've taken:

    • (I'm running Xcode 3.2.5.)
    • I've created a Development Provisioning Profile in the iOS Provisioning Portal, and included the devices for all the testers.
    • I have downloaded this profile and installed it into Xcode by dragging it to the Organizer window, and I can see the profile under Development>Provisioning Profiles
    • I've set this profile as the "Code Signing Identity>Any iOS" in both the project and target settings
    • I've created an Entitlements.plist file, set the property list type to "iPhone Entitlements plist", deleted all rows except the "Can be debugged", and set that to unchecked
    • I've set the "Code Signing Entitlements" to Entitlements.plist (the exact, case-sensitive name) in both the project and target settings
    • I've "Build and Archive"'d my project
    • From the Organizer window, I've selected my project & clicked "Share...", selected the same provisioning profile used above and saved the resulting .ipa to disk
    • I've compressed the .ipa and the provisioning profile to a zip file and e-mailed it to my testers

    The testers have:

    • Unzipped the file I sent
    • Tried installing by just dragging the .ipa to iTunes and syncing
    • Tried installing by first dragging the .mobileprofile to iTunes and syncing

    In either case, at the end of syncing, they get the dialog reading "The app [my app name] was not installed on the [their device and device name] because the entitlements are not valid."

    It may be worth also noting that I was able to distribute an earlier version of this same App to the same testers last Autumn without any problems and without an entitlements list. I'm not sure what has changed, other than upgrading Xcode.

    Can anyone provide any insight or see what I'm doing wrong?

    [I have also posted this on Apple's Developer forums and will re-post any solutions here.]

    解决方案

    The *.ipa file should already contain the provisioning profile. You can see that easily from a Windows machine if you use a zip utility. The file is just a zip archive with a different extension.

    Are the devices on the correct version of iOS for the application?

    On the devices in Setting > General > Profiles you can see a list of any provisioning profiles that are installed to eliminate that as an issue. You get multiple copies with every new certificate created when you add new devices. It doesn't hurt to remove all the profiles and check that your latest one gets added.

    When you do your build, in the Build Results right click and select Open These Latest Results as Transcript Text File then search for CodeSign which will show you the output for that step and you should clearly see which profile was used. You can also search for Entitlements.plist check the path used and then look at that file.

    You say you deleted all the rows. I don't have a Can be debugged entry but I do have application-identifier and keychain-access-group which sound quite code signing related. Here's the plain text version of the file which you could try;

    <?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>
        <!--- Required entitlements (in most cases shouldn't be changed) --->
        <key>application-identifier</key>
        <string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string>
        <key>keychain-access-groups</key>
        <array>
            <string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string>
        </array>
    
        <!--- Custom entitlements below --->
    
    
    </dict>
    </plist>
    

    If any of that appears wrong these are the steps Apple suggest in preparing a distribution build;

    1. Select the Target and open the Build Settings Inspector. Confirm you are in the Distribution Configuration.
    2. Delete the Code Signing Identity: iOS Distribution : COMPANYNAME
    3. In the Xcode Build Menu, select Clean all Targets.
    4. Delete any existing build directories in your Xcode project using Finder.
    5. Re-launch Xcode and open your Project.
    6. Re-enter the code-signing identity iOS Distribution : COMPANYNAME in the Target Build Settings Inspector.
    7. Rebuild your Project.

    Hope some of that helps or sparks an ah-ha! moment.

    这篇关于未安装应用“ XXX” ...因为权利无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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