使用Xcode7免费真机调试iOS应用程序

今天在给我的mbp升级xcode 在说明中看到这样一段文字:

Now everyone can run and test their own app on a device—for free. You can run and debug your own creations on a Mac, iPhone, iPad, iPod touch, or Apple Watch without any fees, and no programs to join. All you need to do is enter your free Apple ID into Xcode. You can even use the same Apple ID you already use for the App Store or iTunes. Once you’ve perfected your app the Apple Developer Program can help you get it on the App Store.

这是真的么?百度了一下,是真的。太好了,这下可以剩下99美刀了。
马上试了一下,步骤如下:

1.运行Xcode后,点击菜单中的Preferences…进入Accounts标签
2.左边栏选自己的Apple ID, 右边可以看到

Name iOS MAC
xxx free free

3.按下右边栏中右下角的View Details…按钮打开Details对话框

4.在Details对话框中可以看到:

Signing Identities Action
iOS Development Create
iOS Distribution Create
Mac Development Create
Mac App Distribution Create
Mac Installer Distribution Create
Developer ID Application Create
Developer ID Installer Create

Create表示灰色,不能选择。

5.点击 iOS Development和Mac Development栏对应的Create钮。然后这两个
Create钮就消失了。接着点击右下角的Done按钮。

6.随便打开一个iOS工程。usb连上老婆的iphone6 。

7.Xcode 上的iOS Devce下拉菜单中多出了iphone6,太棒了。

8.选择 iphone6 然后猛击运行。由于第一次调试需要添加Provisioning Profile,xcode弹出一个Issue消息,点击的Issue旁点Fix,一切就都由Xcode搞定了,最终会生成对应App ID的描述文件,这时编译链接项目,运行调试就可以了。

9.发现iphone6中竟然多出了那个APP。断开usb线也可以在iphone上运行,就和其他APP一样。