如何使用设备代替模拟器

发布于 2024-11-30 07:28:26 字数 119 浏览 1 评论 0原文

我是 iPhone 开发新手,想在我的 iPhone 上测试我的应用程序。我已经支付了 100 美元,但找不到任何方法来练习如何做到这一点。有一些参考资料,但它们适用于 xcode 3。

任何帮助将不胜感激。

I am a new with iphone development and want to test my application on my iphone . I have paid $100 but can not find any way to workout how to do that . There are some references around but they are for xcode 3.

Any help would be much appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

眼波传意 2024-12-07 07:28:26

首先,您必须在 Mac 上设置开发人员证书/密钥。请参阅开发者门户,其中有有关如何进行此设置的详细说明

获得证书后,插入设备,然后在 XCode 中按 cmd + shift + 2 - 加载管理器。选择设备窗格,单击您的设备,然后单击“用于开发”按钮。它会要求您输入开发帐户的用户名/密码,然后它将启用您的设备进行开发。启用后,您只需在 Xcode 主窗口的左上角选择它作为构建目标即可。

First you have to get your developer certificate/keys set up on your mac. See the developer portal where there are detailed instructions on how to get this set up.

Once you have your certificate, plug in your device, and press cmd + shift + 2 in XCode - to load up the organizer. Select the devices pane, click on your device, and click the 'use for development' button. It will ask you to put your username/password in for your dev account, and then it will enable your device for development. After it has been enabled, you simply select it as the target to build to in the top-left of the main Xcode window.

挥剑断情 2024-12-07 07:28:26

我知道这个问题已经得到了解答,但我在尝试将 XCode4 直接安装到我的设备上时费了不少功夫。如果您尝试将多台机器安装到同一设备上,天堂会帮助您。

我最好的建议是,让 XCode4 为您完成所有工作。尝试手动配置证书只会导致您的计算机或设备崩溃。

如果您遇到困难,或者只完成一半,请按照以下步骤操作。

  1. 从钥匙串中删除所有证书。您可以保留 Apple Dev 证书,但其他所有内容都必须保留。
  2. 将您的项目设置为“无代码签名”。如果您使用过任何旧的配置文件,您不希望您的项目查看任何内容。
  3. 在管理器中,删除其中的所有配置文件。适用于 XCode4 以及您的设备。
  4. 我通常会关闭我的项目,但这可能是一个可选步骤。
  5. 在 Apple 开发者门户中删除您的开发者证书。它会抱怨,但太糟糕了。
  6. 请勿删除网站上的任何配置文件。稍后你会需要这些。它们应该已经全部配置到您的设备和测试团队。他们很好。
  7. 打开 Organizer,在 Provisioning Profiles 下应该有 Import 按钮和复选框,让 XCode4 为您完成工作。使用该按钮让 XCode 进行全部设置。
  8. 它应该告诉您,您没有开发人员证书并自动请求一个,让 XCode 请求它。它可能会在某个时候提示您输入开发人员凭据。
  9. 这将需要几秒钟的时间,但它应该会提取与您的帐户关联的所有配置文件,在您的钥匙串中创建开发人员证书,如果您的设备已插入,则将最新的配置文件复制到您的设备。
  10. 打开您的项目,为您的构建选择 iPhone Developer。如果它是空白的,无论如何选择它,它应该与正确的运行配置文件关联。
  11. 使用所选设备运行您的构建,您应该可以开始了。

当我在正常的 Xcode 和 beta 版本之间工作时,我经历了一次糟糕的尝试和错误才能让这些工作正常工作。我不希望我最大的敌人出现代码签名问题。希望这对您和其他遇到问题的人有用。祝你好运!

I know this question has been answered already, but I have had a lot of hair pulling trying to get XCode4 to install directly to my device. Heaven help you if you are trying to get multiple machines to install to the same device.

My best advice, let XCode4 do all the work for you. Trying to manually configure your certificates will only lead you to bashing your computer or device to smithereens.

If you get stuck, or only get half of it working, follow these steps.

  1. Delete all of your certificates from Keychain. You can leave the Apple Dev certificate, but everything else must go.
  2. Set your project to No Code Signing for everything. If you have any old provisioning profiles you've used, you don't want your project looking at anything.
  3. In Organizer, delete any provisioning profiles you have there. For XCode4 as well as your device.
  4. I usually close my project, but this could be an option step.
  5. Delete your developer certificate in the Apple Developer Portal. It will complain, but too bad.
  6. DO NOT DELETE ANY PROVISIONING PROFILES ON THE WEBSITE. You'll need these later. They should all be configured already to your devices and testing team. They are fine.
  7. Open Organizer and under Provisioning Profiles there should be the Import button and check box to let XCode4 do the work for you. Use that button to let XCode set it all up.
  8. It should tell you that you don't have a developer certificate and auto request one, let XCode request it. It will probably prompt you for your developer credentials at some point.
  9. It will take a few seconds, but it should pull in any Provisioning Profiles associated with your account, create the developer certificate in your keychain, and if your device is plugged in, copy the most current provisioning profile to your device.
  10. Open your project, select iPhone Developer for your build. If it is blank, select it anyway, it should associate with the correct profile for running.
  11. Run your build with your device selected and you should be good to go.

I had a terrible run of trial and error to get these working as I was working between the normal Xcode and the beta build. I don't wish code signing issues on my worst enemy. Hopefully this will work for you and anyone else that runs into issues with it. Good luck!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文