ios 如何在不注册 Apple Developer Program 的情况下使用 Xcode 7 在 iPhone/iPad 上运行应用程序?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/30727099/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to run apps on iPhone/iPad using Xcode 7 without enrolling to Apple's Developer Program?
提问by Jayakrishnan M
I have a Macbook with OSX 10.10.3, Xcode 7 beta and an iPhone 4. I haven't enrolled to Apple's Developer Program. I think that since the latest WWDC any developer can run apps on their device. How can I achieve that on a real device in Xcode 7 Beta?
我有一台装有 OSX 10.10.3、Xcode 7 beta 和 iPhone 4 的 Macbook。我还没有注册 Apple 的开发者计划。我认为自从最新的 WWDC 以来,任何开发人员都可以在他们的设备上运行应用程序。如何在 Xcode 7 Beta 的真实设备上实现这一点?
采纳答案by Manoj
Please follow the steps below:
请按照以下步骤操作:
Install Xcode 7.
Give a unique bundle identifier (any unique identifier):
Select a valid team from the "Team" option (you can add an account from Xcode preferences, but there is also an option for adding an account):
Then click on Fix Issue. It will take some time and will be resolved. (If you are getting any error, then there may be some issue with your Apple developer account.)
If you are not getting any kind of error after clicking on Fix Issue, then your set up succeeded:
Now connect your device. Run your code on Xcode 7 by selecting the destination as your connected device name.
安装 Xcode 7。
给出一个唯一的包标识符(任何唯一标识符):
从“团队”选项中选择一个有效的团队(您可以从 Xcode 首选项中添加一个帐户,但也有一个用于添加帐户的选项):
然后点击修复问题。这将需要一些时间并会得到解决。(如果您遇到任何错误,则您的 Apple 开发者帐户可能存在一些问题。)
如果您在点击Fix Issue后没有收到任何类型的错误,则您的设置成功:
现在连接您的设备。通过选择目标作为您连接的设备名称,在 Xcode 7 上运行您的代码。
I have tried it with the Xcode 7 beta version.
我已经用 Xcode 7 beta 版试过了。
回答by RMDeveloper
The following will work on any iOS/OSX version:
以下内容适用于任何 iOS/OSX 版本:
Download and install the Xcode 7 beta.
Open Xcode 7, open preferences->Account and click on add button left side of pop up, choose Add Apple ID and login to your Apple Account.
Plug in your iPhone and select it as the build destination.
We now need to generate a code signing signature for the app. Click on the project on the left, fill in a unique “Bundle Identifier” and click on “Fix Issue” (make sure your name is selected as “team”).
Click the play button in the top left. If there's no build errors the app should now launch on your phone!
下载并安装 Xcode 7 测试版。
打开Xcode 7,打开preferences->Account,然后点击弹出窗口左侧的添加按钮,选择Add Apple ID并登录您的Apple Account。
插入您的 iPhone 并选择它作为构建目标。
我们现在需要为应用程序生成代码签名。单击左侧的项目,填写唯一的“Bundle Identifier”并单击“Fix Issue”(确保您的名字被选为“team”)。
点击左上角的播放按钮。如果没有构建错误,该应用程序现在应该会在您的手机上启动!
回答by Julian E.
The following article from 9to5mac.comoutlines how you are able to run apps on your iPhone without a developer account:
以下来自9to5mac.com 的文章概述了如何在没有开发者帐户的情况下在 iPhone 上运行应用程序:
Apple has changed its policy regarding permissions required to build and run apps on devices. Until now, Apple required users to pay $99/year to become a member of Apple's Developer Program in order to run code on physical iPhone and iPads. As part of the new Developer Program, this is no longer required. Apps can be tested on devices, no purchase necessary.
However, this technically means that developers will be able to release apps outside of the App Store as long as they are open-sourced. Interested users could then open the code in Xcode, compile and run it on their own devices — avoiding the App Store completely.
This is somewhat similar to how Android allows users to sideload apps from unknown sources, although its a bit more complicated as sideloading requires a physical connection and a Mac running Xcode to build the apps. As it's not really meant for this purpose (its main purpose is for developers to test their own software on real hardware), more technical knowledge is needed to actually sideload something than with the Android flow.
It's not really an optimal solution for most developers but some apps could foreseeably be distributed this way. For instance, GBA4iOS is an open-source Game Boy Advance emulator for iPhone and iPad.
With the new policy change, customers can theoretically download the application code from the open-source tree and build it locally. Then, they can use Xcode to run it on their device. Emulators are a good example of something that Apple will not allow in the store but are commonly open-sourced and could be installed through this method. Bouke van der Bijl has written up some good instructions on how to achieve this, if you are interested.
With this change, you really only need to pay for the Developer Program if you want to actually submit to the App Store. To submit apps through iTunes Connect to Apple for review, a paid active membership is still required. Apple says it dropped the fee to allow even more budding developers to join in the iOS world as many people (such as younger candidates and people from less-privileged backgrounds) who were deterred by the $99 subscription fee.
Apple 更改了有关在设备上构建和运行应用程序所需权限的政策。到目前为止,Apple 要求用户每年支付 99 美元才能成为 Apple 开发者计划的成员,才能在实体 iPhone 和 iPad 上运行代码。作为新开发人员计划的一部分,这不再是必需的。应用程序可以在设备上进行测试,无需购买。
但是,这在技术上意味着开发人员将能够在 App Store 之外发布应用程序,只要它们是开源的。然后,感兴趣的用户可以在 Xcode 中打开代码,在自己的设备上编译并运行它——完全避开 App Store。
这有点类似于 Android 允许用户从未知来源旁加载应用程序,尽管它有点复杂,因为旁加载需要物理连接和运行 Xcode 的 Mac 来构建应用程序。由于它并不是真正用于此目的(其主要目的是让开发人员在真实硬件上测试他们自己的软件),与 Android 流程相比,实际侧载某些内容需要更多的技术知识。
对于大多数开发人员来说,这并不是真正的最佳解决方案,但可以预见某些应用程序可以通过这种方式分发。例如,GBA4iOS 是一款适用于 iPhone 和 iPad 的开源 Game Boy Advance 模拟器。
随着新政策的变化,客户理论上可以从开源树中下载应用程序代码并在本地构建。然后,他们可以使用 Xcode 在他们的设备上运行它。模拟器是 Apple 不允许在商店中使用但通常是开源的并且可以通过这种方法安装的一个很好的例子。如果您有兴趣,Bouke van der Bijl 已经写了一些关于如何实现这一点的很好的说明。
有了这个变化,如果你想真正提交到 App Store,你真的只需要为开发者计划付费。要通过 iTunes Connect 将应用程序提交给 Apple 进行审核,仍需要付费的活跃会员资格。苹果表示,它降低了费用,以允许更多崭露头角的开发人员加入 iOS 世界,因为许多人(例如年轻的候选人和来自较低特权背景的人)被 99 美元的订阅费吓倒了。
回答by Markaroonie
If you are like me and have had a play around with xCode 8 and want to run your app on your phone/ipad but don't want to pay $99 for the privilege then here is what helped me.
如果你像我一样玩过 xCode 8,想在你的手机/ipad 上运行你的应用程序,但又不想为这个特权支付 99 美元,那么这对我有帮助。
go to developer.apple.com and click on account on top right and sign in with your apple id. You will be asked to sign an agreement.
转到 developer.apple.com 并单击右上角的帐户并使用您的 Apple ID 登录。您将被要求签署一份协议。
go to Xcode and open preferences->Accounts and click on add (+) button left bottom side of pop up, choose Add Apple ID and login to your Apple Account.
转到Xcode并打开首选项->帐户并单击弹出窗口左下角的添加(+)按钮,选择添加Apple ID并登录到您的Apple帐户。
back in the Accounts screen select your apple ID and on the bottom right click "view details". In the popup under signing identities click on the button create next to iOS Development and then Done
返回帐户屏幕,选择您的 Apple ID,然后在右下角单击“查看详细信息”。在签名身份下的弹出窗口中,单击“iOS 开发”旁边的“创建”按钮,然后单击“完成”
exit out of preferences and plug in your phone to the computer. From the dropdown menus at the top of Xcode go Product->Destination and then select your phone.
退出首选项并将手机插入计算机。从 Xcode 顶部的下拉菜单中选择 Product->Destination,然后选择您的手机。
Now when you run your project it should load to your phone. You may need to go the the settings app on your phone -> General -> Device Management -> approve you as a developer
现在,当您运行项目时,它应该会加载到您的手机中。您可能需要转到手机上的设置应用程序 -> 常规 -> 设备管理 -> 批准您成为开发者