关于真机调试遇到的问题汇总

内容有的是从网上查到的,有的是自己遇到的,后期还会继续补充。

1、While reading /Users/zhangxue/Desktop/ios开发-svn/shineTour_V2.3.1/YFShineTour/YFShineTour/Resources/Images/PartTreeViewController/fristLevelBg_3.png pngcrush caught libpng error:

Read Error

Command /Applications/Xcode.app/Contents/Developer/usr/bin/copypng emitted errors but did not return a nonzero exit code to indicate failure

原因及相应原因的解决方案:

原因1. 是提示的png并不是ps导出的png,而是手动修改jpeg后缀名为png,在模拟器上不会报错,但在真机,不  识别这种所谓  的“png”图片。(随便批下美工)

原因2:这是因为png图片的问题,png图片在存储的时候有一个NOT INTERLACED/INTERLACED(无交错/交错)的选项,因为设计师在切图的时候的存储错误,图片在XCode中就会报这个错误,但是还是会编译成功并运行,请设计师将图片重新按无交错存储就行了。

2、The certificate used to sign "APP名" has either expired or has been revoked.

解决方案:

打开“钥匙串访问”->我的证书:删除相关的证书

真机运行,fix出现的错误,又提示错误Thisapplication'sapplication-identifierentitlementdoesnotmatchthatofthe installedapplication

意思是iPhone上已经装了包标识符一样的 App,删掉再运行- -!!

安装成功!但是在手机上打开会提示:

不受信任的开发者您的设备管理设置不允许在此台iPhone上使用开发者"XXX"的应用您可以在"设置"中允许使用这些应用

打开手机设置-通用-拉到最下面的“描述文件”-信任应用

3、This error happens when you have set Distribution Provisioning profile in code signing. Change it to Developer Provisioning Profile, then it will work. Worked for me for Xcode SDK 4.5.

解决方案:把你的code sign由Distribution改成Developer.就这么简单。

补充:iphone5s的时候会出现:process launch failed: security。

这时候,应该app其实已经安装成功了,你只需要在iphone上启动app,然后点击信任就可以了。

4、(null): Could not find file: /Users/zhaoyonghong/Library/Developer/Xcode/DerivedData/OurMarry-byrhodnsokwjlhgdaryxysvtverq/Build/Products/Debug-iphoneos/OurMarry.app/icon@2x.png

解决方案:改Build Setting中改一下项目名字就好了.   原因:项目名不同造成的。

5、Phone may be running a version of iOS that is not supported by this version of Xcode. 

解决方案:把Xcode升级就可以了。

6、Code Signing Error(如下所示)

Code Signing Error: XXXX has conflicting provisioning settings. XXXX is automatically signed, but provisioning profile YYYY has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor, or switch to manual signing in the project editor.

Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 12.0'

Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 12.0'

其中XXXX是项目名称,YYYY是一串字符

这是Xcode10更新之后出的错

解决方案:

打开 项目名.xcodeproj文件(右键,显示包内容),找到project.pbxproj文件,打开这个文件(右键-打开方式-文本编辑),搜索(Command+f)YYYY(错误原因里面显示的一串字符),删掉YYYY(注意:这个数字在引号之间,只需要删除YYYY就行了,不要删除引号),然后重新选下证书就OK了。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 1. Phone may be running a version of iOS that is not supp...
    赵永洪阅读 574评论 0 0
  • 发现 关注 消息 iOS 第三方库、插件、知名博客总结 作者大灰狼的小绵羊哥哥关注 2017.06.26 09:4...
    肇东周阅读 12,305评论 4 61
  • 我将登上你的船 走过光滑的木头,波漾金光的浆 向着你这个捧心的女人 从此只记起如何食鱼取水 从天涯驶向天涯 从远方...
    周幼安阅读 434评论 0 4
  • URL分发器(路由配置文件) 在settings的配置文件中,设置了顶层的urls的分发器 URL配置(URLco...
    Spareribs阅读 3,817评论 0 3
  • 今天一天过得充实快乐,长沙到郑州三个半小时的时间把《专业主义》剩下部分看完,《父母的觉醒》看1-30页,第一次觉得...
    姚常春阅读 335评论 1 1