美文网首页iOS证书问题
Xcode报错问题总结

Xcode报错问题总结

作者: 梧雨北辰 | 来源:发表于2017-07-17 10:14 被阅读177次
    1. InValid Device State
    屏幕快照 2016-09-19 下午2.14.34.png

    原因:同时安装了Xcode7和Xcode8等多个版本,在交替使用的时候会出现上诉错误提示。
    解决:关闭所有Xcode版本和模拟器,重新选择一个Xcode版本打开选择xcode版本的命令:sudo xcode-select -s /Applications/Xcode7.app

    2. The operation couldn’t be completed (LaunchServicesError error 0)
    2635FC3E-FC20-49DD-A110-F17D0347EECE.jpg

    原因:由于某些原因资源文件的加载方式发生变化,从而产生了编译缓存的问题
    解决:执行clean操作command +shift+k,清空编译错误数据,然后再Build

    3. Could not find Developer Disk Image

    原因是当前的xcode版本不支持真机的系统,
    解决1:更新xcode版本
    解决2:下载对应真机的系统配置包,将其拷贝到下面路径下
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport

    4. App installation failed. This application’s application-identifier entitlement does not match that of the installed application. These values must match for an upgrade to be allowed
    屏幕快照 2015-12-03 下午4.35.52.png

    原因:更换了provision文件,iPhone上已经装了包标识符一样的 App
    解决:删掉手机上app,重新运行

    5. Could not launch “DDDecorate"
    25E5AD54-4653-4901-A013-D4EEE84B7ED2.png

    原因:未设置证书信任
    解决:设置 -> 通用 -> 描述文件 -> “你的AppleID” 选择信任

    6. 报错:The identity used to sign the executable is no longer valid
    5F5C9DEB-4DC3-4A4B-BD43-D972EE6148AC.png

    原因:证书失效了。
    解决:证书失效了,去开发者中心重新生成一个。

    7. An App ID with Identifier ‘ XXXX' is not available. Please enter a different string.
    屏幕快照 2016-06-06 下午5.30.27.png

    原因:发生在真机运行时,Bundle Identifier重复
    解决:修改Bundle Identifier后重新运行

    8. “(null)” is of a model that is not supported by this version of Xcode. Please use a different device.

    原因:xcode连接真机失败
    解决:关闭Xcode,再重启运行

    9. Verify the Developer App certificate for your account is trusted on your device. Open Settings on Xxxxxxxxx and navigate to General -> Device Management, then select your Developer App certificate to trust it.
    屏幕快照 2017-01-07 下午4.47.40.png

    原因:使用自己的开发者账号进行真机测试时,没有设置证书信任
    解决:打开手机设置->通用->描述文件与设备管理,看到自己的开发者账号,点击选择信任。

    10. iPhone is busy:Processing symbols files Xcode will continue when iPhone is finished.
    屏幕快照 2017-07-04 上午10.36.32.png

    原因:Xcode正在处理符号文件,Xcode每次第一次连接真机新设备会进行这步操作。
    解决:不需要解决,只要等待Xcode处理结束。

    11. PCH was compiled with module cache path '/Users/XXX/Library/Developer/Xcode/DerivedData/ModuleCache/2LXVKO3BWVSZF', but the path is currently'/Users/XXX/Library/Developer/Xcode/DerivedData/ModuleCache/2LXVKO3BWVSZF'
    屏幕快照 2017-07-17 上午9.13.11.png

    原因:预编译头文件Pch路径出了问题,可能是变更了文件的路径
    解决:复制报错的路径例:/Users/XXX/Library/Developer/Xcode/DerivedData,删除该文件下的文件即删除编译缓存,然后重新打开项目运行

    12. Unable to capture view hierarchy.
    13BD3C4A-36CA-4828-87E5-60D90A78F5BB.png

    原因:未知,可能是代码中调用的某些第三方类库使得ViewHierarchy不能使用
    解决:这里提供一种可替代方案,使用第三方工具Reveal类显示视图层级,可以搜一下用法

    相关文章

      网友评论

        本文标题:Xcode报错问题总结

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