我是否需要制作临时配置文件来在 iPhone 上调试我的应用程序?
我想我只是对调试在真实设备上的工作方式感到困惑 - 这是如何进行的? 我一直在阅读有关创建分发配置文件的 Apple 文档,但我没有找到任何用于通过 Xcode 简单调试在我的设备上运行的应用程序的信息。 有人能指出我正确的方向吗?
编辑(2009 年 2 月 19 日): 关于是否需要创建临时配置文件来调试我的应用程序,我得到了相互矛盾的答案。 如果我不需要创建临时配置文件,除了为自己准备开发配置文件和证书之外,我还需要做什么来调试我的应用程序?
编辑(2009 年 2 月 20 日): 此链接,iPhone 开发指南:准备设备进行开发,似乎说您确实需要开发配置文件来在设备上进行调试。 在我的上一次编辑中,我提到对于是否需要创建临时配置文件,我得到了相互矛盾的答案。 答案并不冲突,我只是不明白临时配置文件和开发配置文件之间的区别。
I think I'm just cloudy on how debugging works on a real device - is that how to go about it? I've been reading through Apple's docs on creating provisioning profiles for distribution, but I'm not finding any information for simply debugging my app, which is running on my device, through Xcode. Can someone point me in the right direction?
Edit (2/19/09):
I'm getting conflicting answers on whether or not I need to create an ad-hoc provisioning profile to debug my app. If I don't need to create an ad-hoc provisioning profile, what else do I have to do to debug my app, other than having my development provisioning profile and certificate for myself?
Edit (2/20/09):
This link, iPhone Development Guide: Preparing Devices for Development, seems to say that you do need a development provisioning profile for debugging on a device. In my last edit, I mentioned that I was getting conflicting answers on whether or not I need to create an ad-hoc provisioning profile. The answers are not conflicting, I just didn't understand the difference between an ad-hoc provisioning profile and a development provisioning profile.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
每当您编写要安装在 iPhone 上的软件时,您都需要两件事:密钥和配置文件。 密钥标识了应用程序的开发者; 它保留在您的计算机上,用于对您构建的应用程序进行签名。 该配置文件标识允许哪些设备运行由给定密钥签名的应用程序; 它需要安装到设备上。
分发密钥基本上是每个公司一个,并且仅在您构建要在开发团队外部分发的应用程序版本时使用。 (App Store 版本必须使用分发密钥进行签名。)开发密钥旨在为每个开发人员提供一个,但仅在主动开发应用程序时使用。
(如果你是个人开发者,当然,你只有一个开发者密钥和一个分发密钥。在我的机器上,我设置了钥匙串,要求分发密钥的密码,所以即使有人偷了我的笔记本电脑,他们也可以不要发布危及用户安全的我的应用程序之一的更新。开发人员密钥只能在我的个人手机上安装软件,因此没有密码。)
当您在自己的个人设备上进行测试并通过 Xcode 安装时,您可以使用该密钥。需要开发配置文件和开发密钥。 该开发配置文件应安装到 Xcode 中,然后 Xcode 会将其安装到您的手机上。
当您分发给少数其他人时(例如,为了 Beta 测试,或者您编写了专门针对特定客户的应用程序),您需要一个临时配置文件和分发密钥。 您需要将临时配置文件与应用程序一起发送给用户。 然后,用户可以将配置文件和应用程序放入 iTunes 中并同步手机进行安装。
当您通过 App Store 进行分发时,您需要 App Store 配置文件和分发密钥。 以这种方式进行的构建不能在您控制的任何设备上运行,但 Apple 的提交工具要求它们使用此配置文件进行构建。
因此,回答您的问题:您需要配置您的设备,但它必须是开发配置文件,而不是临时配置文件。
Any time you're writing software to be installed on an iPhone, you need two things: a key and a provisioning profile. The key identifies the person who developed the application; it stays on your computer and is used to sign the apps you build. The profile identifies which devices are allowed to run applications signed by a given key; it needs to be installed onto the device.
Distribution keys are basically one per company, and are only meant to be used when you are building a version of an app that's intended to be distributed outside your development team. (App Store builds must be signed with a distribution key.) Development keys are intended to be one per developer, but are only meant to be used when actively developing an app.
(If you are an individual developer, of course, you have only one developer key and one distribution key. On my machine, I've set up Keychain to require a password for the distribution key, so even if somebody steals my laptop they can't release an update to one of my apps that compromises user security. The developer key, which can only install software onto my personal phone, is not passworded.)
When you're testing on your own personal device and installing through Xcode, you need a development provisioning profile and a development key. This development profile should be installed into Xcode, which will then install it onto your phone.
When you're distributing to a small number of others (for example, for beta testing, or if you wrote an app that's specialized for a specific customer), you need an ad-hoc profile and a distribution key. You'll need to send the ad-hoc profile to the user along with the app. The user can then drop both the profile and app into iTunes and sync their phone to install.
When you're distributing through the App Store, you need an App Store profile and a distribution key. Builds made in this way cannot be run on any device you control, but Apple's submission tools require them to be built using this profile.
So to answer your question: You need to provision your device, but it has to be a development provisioning profile, not an ad-hoc profile.
不,您不需要临时配置文件来调试应用程序,您只需要设备上自己的开发配置文件和证书。
No, you don't need an Ad Hoc provisioning profile to debug an app, you only need a development provisioning profile and certificate for yourself on your device.
是的,您需要配置设备。 IIRC你需要使用Apple的在线工具,然后使用Xcode配置它,之后你就可以在设备上调试它了。
有关详细信息,请参阅此博客上的第一篇文章。
You need to provision the device, yes. IIRC you need to use Apple's online tool, and then provision it using Xcode, after which you will be able to debug it on the device.
See the first post on this blog for more.