找不到与应用程序标识符匹配的有效配置文件 [英] A valid provisioning profile matching the application's identifier could not be found

查看:138
本文介绍了找不到与应用程序标识符匹配的有效配置文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题曾经被问过,但是先前问题的答案不能解决我的问题。



我正在尝试构建一个名为(CalculatorBrain的简单Hello World应用程序)(来自斯坦福iTunes U课程)。我可以在Simulator中很好地运行它,但我想在iPhone 4S上运行它。



我可以通过Windows计算机上的iTunes同步iPhone 4S。一直有。想通了,我应该列出这个细节。



无论如何,回到我的Macbook(Mountain Lion)。我正在运行最新的XCode 4.6.2(4H1003),我的iPhone也是最新的6.1.3。



我去了Provisioning Portal在Apple开发人员页面上。我添加了我的4S。我称它为JohnSmith,并给了它手机UDID。



在XCode中,我打开了管理器,设备默认为突出显示。我将密码放入iPhone,然后将其插入Macbook。设备找到我的iPhone。如果我单击Provisioning Profiles并尝试将设备添加到Provisioning Portal,则会收到该团队中已经存在编号的设备。大。我知道那是肯定添加的。到目前为止,所有好消息。



在我的Hello World应用程序中,我的Bundle Identifier的CalculatorBrain-Info.plist是 com.JohnSmith.CalculatorBrain。捆绑包的显示名称为 $ {PRODUCT_NAME},可执行文件的名称为 $ {EXECUTABLE_NAME}。



在导航器中,如果我突出显示我的项目,并且调出构建设置,在代码签名身份下,我得到了以下选项...



不签名代码



自动配置文件选择器
-iPhone开发人员
-iPhone发行版



没有配置配置文件的身份
-iPhone开发人员:John Smith(R ............ K)
-iPhone发行版:约翰·史密斯(Y ............. 5)



其他...



我已经尝试了所有这些方法。我假设我应该使用iPhone开发人员:约翰·史密斯(John Smith),但这是没有身份配置文件的身份。



这是怎么回事?我需要做些什么才能使它起作用?

解决方案

根据您的描述,听起来缺少元素是您需要返回证书,标识符和配置文件工具,为HelloWorld应用程序的AppID生成开发配置文件,然后将该配置文件安装在开发计算机上。从高层次上讲,这由以下步骤组成:


  1. 在Xcode中找到项目的AppID。

  2. 验证您已在证书,标识符和配置文件中设置了该AppID。

  3. 为该AppId,您的开发证书以及一个或多个应用创建开发配置文件更多已注册的测试设备。

  4. 下载并安装Xcode中的配置文件。

  5. 使用此配置文件和链接的代码签名身份将您的项目配置为代码签名

  6. 构建至设备!

您拥有代码签名身份构建配置项提到的内容在很大程度上取决于项目的设置以及开发计算机上可用的Provisioning Profiles。我最近回答了一个与切线相关的问题并访问证书,标识符和配置文件工具。

  • 登录后,选择标识符。

  • 检查在上一节中找到的AppID是否在应用程序标识符列表中。如果是这样,请记下App ID名称并跳至下一部分,否则...

  • 单击右上角的添加(加号)按钮,提供一个名称

  • 滚动到页面底部,然后粘贴您的应用程序副本捆绑包ID字段中上一部分的ID。

  • 单击继续。

  • 请注意, AppID在iOS生态系统中必须唯一-如果您选择的AppID已在使用中,则可能会出现错误。如果是这样,请将您的 Bundle ID更改为唯一的名称-只需确保更新Xcode项目中的 Bundle ID设置,以匹配您所选择的内容即可。



    创建开发配置文件

    现在注册了应用程序ID,现在您可以创建链接您的应用程序ID的开发配置文件,开发证书和测试设备ID。


    1. 在证书,身份,配置文件工具中,导航至配置个人资料。

    2. 单击右上角的添加(加号)按钮。

    3. 在选择类型,然后单击继续。

    4. 从应用ID的下拉列表中选择您的应用ID,然后单击继续。

    5. 选中您的开发证书旁边的框,然后单击继续。

    6. 选中您要授权安装的测试设备旁边的框pp,然后单击继续。

    7. 键入配置文件名称(再次省略特殊字符),然后单击生成。

    下载并安装配置文件



    生成配置文件后,该工具将为您提供链接以能够下载


    1. 通过单击下载链接下载配置文件。

    2. 从您的下载位置中拖动配置文件,并将其放在Xcode Dock图标上,或双击以将其打开。

    配置代码签名身份



    听起来像您已经知道它的位置,但以防万一:


    1. 在项目浏览器(CMD + 1)中,单击项目名称(可能是 CalculatorBrain)。这将显示项目的设置。

    2. 选择[您的项目名称]>构建设置选项卡。

    3. 滚动到代码签名身份项。

    理论上,您想使用自动配置文件选择器选项,该选项会尝试将您的AppID与已安装的配置文件进行匹配,但是您也可以滚动列表,并选择Bundle ID / AppId到iOS证书的特定映射。



    此外,我自己的Xcode似乎并不总是很流行更改新安装的配置文件-尚不清楚这仅仅是我自己的Xcode安装的怪癖,还是Xcode中是否有错误。无论哪种方式,退出并重新启动Xcode似乎都会触发配置文件的重新索引/刷新。



    无论如何,请选择与您的AppId / BundleId和开发人员证书相匹配的选项。

    p>

    假设问题是缺少/不完整/过期的配置文件,那么这应该有助于您启动并运行。如果没有,我们将不得不探究可能会破坏您的代码签名操作的其他潜在设置或证书问题。


    This has been asked before, but the answers to previous questions are not solving my issue.

    I'm trying to build a simple Hello World app called (CalculatorBrain) from Stanford iTunes U courses. I can run it in the Simulator fine, but I'd like to get it on my iPhone 4S.

    I sync my iPhone 4S through iTunes on my Windows machine. Always have. Figured I should list this detail.

    Anyway, back to my Macbook (Mountain Lion). I'm running the most recent XCode 4.6.2 (4H1003) and my iPhone is also the most recent at 6.1.3 I believe.

    I went to the Provisioning Portal at the Apple developer page. I added my 4S. I called it JohnSmith, and gave it the phones UDID.

    In XCode, I opened the Organizer, Devices is highlighted by default. I put the passcode in my iPhone, and plugged it into my Macbook. Devices finds my iPhone. If I click on Provisioning Profiles and try 'Add Device to Provisioning Portal', I get a "A device with number already exists on this team." Great. I know it's added for sure then. All good news so far.

    In my Hello World app, CalculatorBrain-Info.plist my Bundle Identifier is "com.JohnSmith.CalculatorBrain". Bundle display name is "${PRODUCT_NAME}" and executable file is "${EXECUTABLE_NAME}" if that matters.

    In the Navigator, if I highlight my project, and bring up the Build Settings, under Code Signing Identity I get the options...

    Don't Sign Code

    Automatic Profile Selector - iPhone Developer - iPhone Distribution

    Identities without Provisioning Profiles - iPhone Developer: John Smith (R............K) - iPhone Distribution: John Smith (Y.............5)

    Other...

    I've tried all of these. I'm assuming I'm supposed to use the iPhone Developer: John Smith one... but it's saying it's an identity without Provisioning Profiles.

    What's going on here? What do I need to do to get this to work?

    解决方案

    Based on your description, it sounds like the missing element is that you need to go back to the 'Certificates, Identifiers, and Profiles' tool, generate a Development Provisioning Profile for the AppID of your HelloWorld app, then install that profile on your development machine. At a high level, this is composed of the following steps:

    1. Locate the AppID for your project in Xcode.
    2. Verify that you've setup that AppID in 'Certificates, Identifiers, and Profiles'.
    3. Create a Development Provisioning Profile for that AppId, your development certificate, and one or more registered test devices.
    4. Download and Install the Provisioning Profile in Xcode.
    5. Configure your project to Code Sign using this Profile and Linked Code Signing Identity.
    6. Build to device!

    The 'Code Signing Identity' build configuration item you have mentioned is very much dependent on both your project's settings as well as the Provisioning Profiles available on your development machine. I recently answered a tangentially related question 'What are code signing identities?' that may be helpful in seeing what information Code Signing is using and how you can check that you've got your development machine setup to be able to Code Sign your project.

    ...and now, on to more specific HOWTOs to help work through your Code Signing question:

    Locating Project's AppID

    The AppID uniquely defines an application in the iOS ecosystem and is one of the things you first create when starting a new Xcode project. This AppID is what you need to register in the 'Certificates, Identifiers, and Profiles' tool to get started with Provisioning.

    1. In the Project Navigator (CMD+1), click on your project name (likely 'CalculatorBrain'). This will present the project's settings.
    2. Select [Your Project Name] > Summary Tab as shown in the screen clipping from above (MyiOSApplication).
    3. Your iOS AppID is presented in the 'Bundle Identifier' field. Snag a copy of this string, you'll need it next.

    Verify (or Setup) the AppID

    1. Navigate to http://developer.apple.com/ios and access the 'Certificates, Identifiers, and Profiles' tool.
    2. After logging in, select 'Identifiers'.
    3. Check that the AppID you found in the previous section is present in the list of App Identifiers. If so, take note of the App ID Name and skip to the next section, otherwise...
    4. Click the 'Add' (Plus) button in the upper right corner, provide a name for this App ID (can be whatever you want, just so long as it doesn't have special characters.)
    5. Scroll to the bottom of the page, and paste a copy of your App ID from the previous section in the 'Bundle ID' field. under 'Explicit App ID'.
    6. Click 'Continue'.

    Do note that the AppID must be unique across the iOS Ecosystem -- you may get an error if the AppID you've selected is already in use. If so, change your 'Bundle ID' to something unique -- just be sure to update the 'Bundle ID' setting in your Xcode project to match whatever you settle on.

    Creating a Development Provisioning Profile

    Now that the App ID is registered, you are now ready to create a Development Provisioning Profile linking your App ID, Development Certificate, and Test Device ID(s) together.

    1. Within the 'Certificates, Identities, Profiles' tool, navigate to 'Provisioning Profiles'.
    2. Click on the 'Add' (Plus) button in the upper right corner.
    3. Select 'iOS App Development' in the 'Select Type' step and then click 'Continue'.
    4. Select your App ID from the drop down list of App IDs and then click 'Continue'.
    5. Check the box next to your Development Certificate and then click 'Continue'.
    6. Check the box next to the test device(s) you want to authorize to install this app and then click 'Continue'.
    7. Key in a Profile Name (again omitting special characters) then click 'Generate'.

    Download and Install Provisioning Profile

    Once the Provisioning Profile is generated, the tool will provide you with a link to be able to download

    1. Download the Provisioning Profile by clicking on the 'Download' link.
    2. Drag Provisioning Profile from your Download location and drop it on the Xcode Dock Icon or double-click to open it.

    Configure Code Signing Identity

    Sounds like you already know where this is located, but just in case:

    1. In the Project Navigator (CMD+1), click on your project name (likely 'CalculatorBrain'). This will present the project's settings.
    2. Select [Your Project Name] > Build Settings Tab.
    3. Scroll to the 'Code Signing Identity' item.

    In theory you would like to use the 'Automatic Profile Selector' option which will attempt to match your AppID to an installed Provisioning Profile, but you can also scroll through the list and pick a specific mapping of Bundle ID/AppId to iOS Certificate.

    Also, my own Xcode doesn't always seem to catch on to changes to freshly-installed provisioning profiles -- It is unclear if this is just a quirk of my own Xcode install or if there is a bug in Xcode. Either way, quitting and relaunching Xcode seems to trigger a reindex/refresh of profiles.

    Anyway, select the option that matches your AppId/BundleId and your Developer Certificate.

    Assuming the problem was a missing/incomplete/expired Provisioning Profile, then this should help get you up and running. If not, we'll have to dig into other potential settings or certificates issues that could be tripping up your Code Signature operation.

    这篇关于找不到与应用程序标识符匹配的有效配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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