构建iPhone应用程序时代码符号错误 [英] Code Sign Error When Building iPhone Application

查看:129
本文介绍了构建iPhone应用程序时代码符号错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是iPhone开发的新手。我刚刚在Apple注册了iPhone开发者计划。当我尝试构建时,我收到错误:

I am new to iPhone development. I just registered with Apple for the iPhone Developer Program. When I try to build, I am receiving an error:


代码签名错误:找不到与应用程序标识符匹配的有效供应配置文件

Code Sign error: a valid provisioning profile matching the application’s identifier could not be found

我不确定有什么问题。我试过浏览互联网,但我感到困惑。任何人都可以帮助我做我应该做的事情吗?

I'm not sure what is wrong. I tried browsing the Internet but I get confused. Can anyone help me with what I should do?

推荐答案

起初这似乎是一个复杂的过程,但当你'时它非常简单已经过了好几次。

At first it seems a complex process, but it's pretty straightforward when you've been through it a few times.

简而言之,这个过程是这样的:

In a nutshell the process is this:

(我是假设您已将iPhone / iPod touch设置为测试设备)

(I'm assuming you've set up your iPhone/iPod touch as a test device)

通过iPhone Developer Portal

Via the iPhone Developer Portal


  1. 创建一个App ID
    (给你的应用程序一个名字,这仅供网站参考,与你自己构建的应用程序无关)
    输入一个字符串来标识它,比如com.yourcompany.appname
    (这很重要,应该和Xcode里面的.plist文件一样)
    点击并保存

  1. Create an App ID (give your application a name, this is just for reference on the website and nothing to do with your own build of your application) enter a string to identify it, like com.yourcompany.appname (this is important and should be the same as in your .plist file inside Xcode) Click and Save this

转到配置
有两个配置文件你需要
a)开发 - 所以你可以在测试设备上安装你的应用程序(即你的iPhone / iPod)触摸)
b)发行 - 如果你愿意的话通过App Store销售应用程序

Go to Provisioning There are 2 provisioning profiles you'll need a) development - so you can install your application on a test device (i.e. your iPhone / iPod touch) b) distribution - if you want to sell the application via the App Store

您可以通过从下拉列表中选择上一步创建的App ID并单击Save $ b $来创建配置文件。 b片刻(通常,虽然可能更长),证书可供下载。将其下载到Mac并将其放到Xcode图标上。有时开发配置文件对我不起作用,我直接将其放入Xcode中显示我连接设备的管理器窗口。

You can create the profiles by selecting your App ID, created in the previous step, from the drop down list and clicking Save In a few moments (usually, though it can be longer) the certificate is available for download. Download this to your Mac and drop it onto the Xcode icon. Sometimes the development profile doesn't work for me like this and I drop it directly into the Organiser window in Xcode that shows my connected device.

此外,如果你在团队帐户,团队管理员需要编辑开发配置文件,并添加修改您的证书权限。

Besides, if you are in a team account, team admin need to edit Development Provisioning Profiles, and add modify your certificates privilege.

在Xcode里面'编辑项目设置'您可以选择要编码的证书。通常用于调试我签署开发证书。按照Apple网站上的说明操作并克隆发布配置文件并将其称为发布,并使用您的分发配置文件对其进行签名。 (您无法在选择了分发配置文件的情况下将应用加载到手机上)

In Xcode inside 'Edit Project Settings' you can select the certificate you wish to code sign with. Usually for debug I sign with the development certificate. Follow the instructions on the apple site and clone the release profile and call it something like release and sign this with your distribution profile. (You won't be able to load the app onto your phone with the distribution profile selected)

确保选择目标设备作为设备而不是模拟器在为App Store构建时!

Make sure you select the target device as Device and not Simulator when building for the App Store!

希望有所帮助,如果我跳过了一些小的内容,请记住这么道歉步骤。

Hope that helps, it's from memory so apologies if I've skipped some small steps.

这篇关于构建iPhone应用程序时代码符号错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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