将iphone应用程序从xcode部署到iphone

时间:2020-11-28 20:52:02

I am doing a school project and I am required to deploy an iphone app to my phone. I have some really noob questions to ask. I have tried to read some solutions from this website but I dont understand! like from these questions: iPhone app minus app store and How can I deploy an iphone application from xcode to real iPhone device.

我正在做一个学校项目,我需要将iphone应用程序部署到我的手机上。我有一些非常棒的问题要问。我试图从这个网站上阅读一些解决方案,但我不明白!喜欢这些问题:iPhone应用程序减去应用程序商店以及如何将iphone应用程序从xcode部署到真正的iPhone设备。

Can anyone here give me an easier way to understand please?

这里有人能给我一个更容易理解的方法吗?

3 个解决方案

#1


32  

Easy:

简单:

  • Sign up for an iOS Developer account. This includes signing up for an Apple ID, enrolling as an Apple developer, then opting that dev account into the Developer Program. That link walks you through the process.
  • 注册iOS开发者帐户。这包括注册Apple ID,注册为Apple开发人员,然后选择开发者帐户加入开发者计划。该链接将引导您完成整个过程。
  • Hook up your device to your machine and look at it in the Xcode organizer (Window > Organizer).
  • 将设备连接到您的设备并在Xcode管理器(窗口>管理器)中查看它。
  • Tell Xcode your want to use it for development.
  • 告诉Xcode你想用它来开发。

I believe Xcode will now help you out more than it used to. If it doesn't, then Apple has step-by-step instructions. In short, you need to:

我相信Xcode现在可以为您提供比以往更多的帮助。如果没有,那么Apple有逐步说明。简而言之,您需要:

  • Use Keychain Access to generate a CSR (certificate signing request)
  • 使用Keychain Access生成CSR(证书签名请求)
  • Submit that to Apple via the dev portal
  • 通过开发门户网站将其提交给Apple
  • Download the resulting development signing certificate and install it along with Apple's intermediate certificate in your keychain by double-clicking on the files.
  • 下载生成的开发签名证书,并通过双击文件将其与Apple的中间证书一起安装在钥匙串中。
  • You then need to create a provisioning profile.
  • 然后,您需要创建配置文件。
  • Add your device ID to it.
  • 将设备ID添加到其中。
  • Download it and stick it on your device, e.g., by dragging it to your device in iTunes.
  • 下载并将其粘贴在您的设备上,例如,将其拖到iTunes中的设备上。

Then, you can build and run your app on the device. It's a pain to explain, but pretty easy to feel your way through once you get started.

然后,您可以在设备上构建和运行您的应用程序。解释起来很痛苦,但一旦开始就很容易感觉到你的方式。

#2


6  

My fuller answer with pictures is available here.

我可以在这里找到更全面的图片答案。

With Xcode 7 for an iOS 9 target device there is now free provisioning. You don't have to sign up for the Apple Developer Program in order to test an app on a real device.

使用适用于iOS 9目标设备的Xcode 7,现在可以免费配置。您无需注册Apple Developer Program即可在真实设备上测试应用程序。

Summary from the Apple docs:

Apple文档摘要:

If you don’t join the Apple Developer Program, you can still build and run your app on your devices using free provisioning....

如果您没有加入Apple开发者计划,您仍然可以使用免费配置在您的设备上构建和运行您的应用程序....

  1. In Xcode, add your Apple ID to Accounts preferences
  2. 在Xcode中,将Apple ID添加到“帐户”偏好设置
  3. In the project navigator, select the project and your target to display the project editor.
  4. 在项目导航器中,选择项目和目标以显示项目编辑器。
  5. Click General and choose your name from the Team pop-up menu.
  6. 单击“常规”,然后从“团队”弹出菜单中选择您的姓名。
  7. Connect the device to your Mac and choose your device from the Scheme toolbar menu.
  8. 将设备连接到Mac,然后从“方案”工具栏菜单中选择您的设备。
  9. Below the Team pop-up menu, click Fix Issue.
  10. 在“团队”弹出菜单下方,单击“修复问题”。
  11. Click the Run button.
  12. 单击“运行”按钮。

When you run your app on a device, you will also have to trust the developer first. On your device go to Settings > General > Profile > developer account name > Trust.

当您在设备上运行应用程序时,您还必须首先信任开发人员。在您的设备上,转到设置>常规>配置文件>开发者帐户名称>信任。

Related articles:

相关文章:

#3


1  

This SO question here gives detailed steps of how to do what Jeremy suggests.

这个问题在这里给出了如何做杰里米建议的详细步骤。

How can I deploy an iPhone application from Xcode to a real iPhone device?

如何将Xcode中的iPhone应用程序部署到真正的iPhone设备?

Take note that /Developer was moved to /Applications/Xcode.app/Contents/Developer in Xcode 4.3.

请注意/ Developer已移至Xcode 4.3中的/Applications/Xcode.app/Contents/Developer。

And, this SO question says what to do if you get an [sed: RE error : Illegal byte sequence].

并且,这个SO问题说明如果你得到[sed:RE错误:非法字节序列]该怎么办。

RE error: illegal byte sequence on Mac OS X

RE错误:Mac OS X上的非法字节序列

But in XCode-5.1/MacOS-10.9, this still didn't work - I lost the devices tab in XCode-Organizer after editing the plist file!

但是在XCode-5.1 / MacOS-10.9中,这仍然不起作用 - 在编辑plist文件后,我在XCode-Organizer中丢失了设备选项卡!

#1


32  

Easy:

简单:

  • Sign up for an iOS Developer account. This includes signing up for an Apple ID, enrolling as an Apple developer, then opting that dev account into the Developer Program. That link walks you through the process.
  • 注册iOS开发者帐户。这包括注册Apple ID,注册为Apple开发人员,然后选择开发者帐户加入开发者计划。该链接将引导您完成整个过程。
  • Hook up your device to your machine and look at it in the Xcode organizer (Window > Organizer).
  • 将设备连接到您的设备并在Xcode管理器(窗口>管理器)中查看它。
  • Tell Xcode your want to use it for development.
  • 告诉Xcode你想用它来开发。

I believe Xcode will now help you out more than it used to. If it doesn't, then Apple has step-by-step instructions. In short, you need to:

我相信Xcode现在可以为您提供比以往更多的帮助。如果没有,那么Apple有逐步说明。简而言之,您需要:

  • Use Keychain Access to generate a CSR (certificate signing request)
  • 使用Keychain Access生成CSR(证书签名请求)
  • Submit that to Apple via the dev portal
  • 通过开发门户网站将其提交给Apple
  • Download the resulting development signing certificate and install it along with Apple's intermediate certificate in your keychain by double-clicking on the files.
  • 下载生成的开发签名证书,并通过双击文件将其与Apple的中间证书一起安装在钥匙串中。
  • You then need to create a provisioning profile.
  • 然后,您需要创建配置文件。
  • Add your device ID to it.
  • 将设备ID添加到其中。
  • Download it and stick it on your device, e.g., by dragging it to your device in iTunes.
  • 下载并将其粘贴在您的设备上,例如,将其拖到iTunes中的设备上。

Then, you can build and run your app on the device. It's a pain to explain, but pretty easy to feel your way through once you get started.

然后,您可以在设备上构建和运行您的应用程序。解释起来很痛苦,但一旦开始就很容易感觉到你的方式。

#2


6  

My fuller answer with pictures is available here.

我可以在这里找到更全面的图片答案。

With Xcode 7 for an iOS 9 target device there is now free provisioning. You don't have to sign up for the Apple Developer Program in order to test an app on a real device.

使用适用于iOS 9目标设备的Xcode 7,现在可以免费配置。您无需注册Apple Developer Program即可在真实设备上测试应用程序。

Summary from the Apple docs:

Apple文档摘要:

If you don’t join the Apple Developer Program, you can still build and run your app on your devices using free provisioning....

如果您没有加入Apple开发者计划,您仍然可以使用免费配置在您的设备上构建和运行您的应用程序....

  1. In Xcode, add your Apple ID to Accounts preferences
  2. 在Xcode中,将Apple ID添加到“帐户”偏好设置
  3. In the project navigator, select the project and your target to display the project editor.
  4. 在项目导航器中,选择项目和目标以显示项目编辑器。
  5. Click General and choose your name from the Team pop-up menu.
  6. 单击“常规”,然后从“团队”弹出菜单中选择您的姓名。
  7. Connect the device to your Mac and choose your device from the Scheme toolbar menu.
  8. 将设备连接到Mac,然后从“方案”工具栏菜单中选择您的设备。
  9. Below the Team pop-up menu, click Fix Issue.
  10. 在“团队”弹出菜单下方,单击“修复问题”。
  11. Click the Run button.
  12. 单击“运行”按钮。

When you run your app on a device, you will also have to trust the developer first. On your device go to Settings > General > Profile > developer account name > Trust.

当您在设备上运行应用程序时,您还必须首先信任开发人员。在您的设备上,转到设置>常规>配置文件>开发者帐户名称>信任。

Related articles:

相关文章:

#3


1  

This SO question here gives detailed steps of how to do what Jeremy suggests.

这个问题在这里给出了如何做杰里米建议的详细步骤。

How can I deploy an iPhone application from Xcode to a real iPhone device?

如何将Xcode中的iPhone应用程序部署到真正的iPhone设备?

Take note that /Developer was moved to /Applications/Xcode.app/Contents/Developer in Xcode 4.3.

请注意/ Developer已移至Xcode 4.3中的/Applications/Xcode.app/Contents/Developer。

And, this SO question says what to do if you get an [sed: RE error : Illegal byte sequence].

并且,这个SO问题说明如果你得到[sed:RE错误:非法字节序列]该怎么办。

RE error: illegal byte sequence on Mac OS X

RE错误:Mac OS X上的非法字节序列

But in XCode-5.1/MacOS-10.9, this still didn't work - I lost the devices tab in XCode-Organizer after editing the plist file!

但是在XCode-5.1 / MacOS-10.9中,这仍然不起作用 - 在编辑plist文件后,我在XCode-Organizer中丢失了设备选项卡!