Xcode7真机调试

作者: 熊妹妹 | 来源:发表于2016-05-11 14:07 被阅读176次

    p.p1 {margin: 0.0px 0.0px 0.0px 60.0px; font: 12.0px 'PingFang SC'; color: #586e75}p.p2 {margin: 0.0px 0.0px 0.0px 60.0px; font: 12.0px Courier; color: #586e75; min-height: 14.0px}p.p3 {margin: 0.0px 0.0px 0.0px 88.8px; text-indent: -28.9px; font: 12.0px Courier; color: #586e75}p.p4 {margin: 0.0px 0.0px 0.0px 60.0px; font: 12.0px Courier; color: #586e75}p.p5 {margin: 0.0px 0.0px 0.0px 60.0px; text-indent: -50.5px; font: 12.0px 'PingFang SC'; color: #268bd2}p.p6 {margin: 0.0px 0.0px 0.0px 96.0px; text-indent: -36.0px; font: 12.0px Courier; color: #586e75}p.p7 {margin: 0.0px 0.0px 0.0px 96.0px; text-indent: -36.0px; font: 12.0px 'PingFang SC'; color: #586e75}p.p8 {margin: 0.0px 0.0px 0.0px 60.0px; font: 12.0px Courier; color: #2aa198}span.s1 {font: 12.0px Courier}span.s2 {color: #b58900}span.s3 {font: 12.0px 'PingFang SC'}span.s4 {font: 12.0px Courier; color: #b58900}span.s5 {color: #586e75}span.s6 {font: 12.0px 'PingFang SC'; color: #586e75}span.s7 {font: 12.0px Courier; color: #2aa198}span.Apple-tab-span {white-space:pre}

    Xcode7可以让app直接运行到设备上而不需要开发者证书。具体操作如下:

    • 填写自己的Apple ID

    首先需要有一个Apple ID,没有就自己去申请一个。然后填写到偏好设置的账户中。菜单栏选择xcode –> preferences (快捷键 command + ,)选择Accounts,在左下角"+"添加自己的Apple ID,下方蓝色选中部分会出现 free free的字样则代表成功。

    • Indentity设置

    选择你要调试的target进入General,设置Indentity的Bundle ID和Team。Bundle ID填写一个没有使用过的,Team选择你的Apple ID。链接设备后Team下面会有一个Warning,点击Fix Issue等待Xcode处理即可。

    • 调试

    选择你调试的设备,Run即可。

    可能会遇到的问题
    1. Build到设备上却打不开。

    需要在手机上设置一下:设置 -> 通用 -> 设备管理 -> 开发商应用选择你的Apple ID -> 点击信任即可。

    1. Error: An App ID with identifier "*" is not avaliable. Please enter a different string.

    这个Bundle ID必须是唯一的,重复了。修改你的Bundle ID了。

    1. Devices后提示(unavailable)

      缺少SDK的版本。一般手机SDK的版本较高,Xcode不支持会出现。可以更新Xcode,或者直接下载一份。

    2. 提示Could not launch “TargetName” process launch failed: Security

      和问题1一样,信任证书即可。

    3. 证书一直显示revoke,到keychain查看证书显示“此证书的签发者无效”

      可能是Apple Worldwide Developer Relations Certification Authority Intermediate Certificate证书过期,重新下载一个双击安装即可https://developer.apple.com/certificationauthority/AppleWWDRCA.cer

    相关文章

      网友评论

        本文标题:Xcode7真机调试

        本文链接:https://www.haomeiwen.com/subject/grhurttx.html