Xcode运行报错总结

1.Xcode7使用NSURLSession发送HTTP请求的问题

Application Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.

貌似Xcode7禁用了明码的HTTP请求,应该在info.plist里添加什么字段。

解决办法:

编辑info.plist,加入如下设置:

添加App Transport Security Settings字典类型的,添加一个元素:key为 Allow Arbitrary Loads,值为YES。


2.Xcode6的项目在Xcode7中运行:

如果在Xcode 9之前使用的时http请求,那么在XCode 9上编译的App是不能联网的,会提示如下错误:

App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app‘s Info.plist file.

解决办法:

需要在info.plist,加入如下设置

添加App Transport Security Settings字典类型的,添加一个元素:key为 Allow Arbitrary Loads,值为YES。


3.真机测试(更换了apple id)

No matching provisioning profiles found: No provisioning profiles with a valid signing identity (i.e. certificate and private key pair) matching the bundle identifier “YCTechnology” were found.

修改一下Bundle Identifier 名


4.真机测试

The certificate used to sign "总从" has either expired or has been revoked. An updated certificate is required to sign and install the application

在钥匙串中把自己过期的证书删掉

A valid provisioning profile for this executable was not found.


5,上传

No matching provisioning profile found: Your build settings specify a provisioning profile with the UUID “72dedb08-1222-48b0-8603-03d5854815f4”, however, no such provisioning profile was found.

在Xcode中当你在更新了你得证书而再重新编译你的程序,真机调试会出现“Your build settings specify a provisioning profile with the UUID‘XXX’, however, no such provisioning profile was found.  Xcode can resolve this issue by downloading a new provisioning profile from the Member Center.”。

解决办法:

1.关闭项目,找到项目文件XXXX.xcodeproj,在文件上点击右键,选择“显示包内容”(Show Package Contents)。会新打开一个Finder。

2.在新打开的Finder中找到project.pbxproj,并且打开,找到你所有包含报错的UUID‘XXX’的行,删除。

3.保存,重新启动项目,再编译,就OK了。


6.关于解决TheOperationCouldn'tbeCompleted

问题描述:当运行Xcode6时,编译代码成功,但是登陆模拟器失败,显示错误:The Operation couldn't be completed.(LaunchServicesError error 0.)

解决办法:第1种方法.点击当前的模拟器,点击IOS Simulator->Reset Content and Settings...->Reset,然后会重置模拟器,再编译代码可登录模拟器成功

第2种方法.点击Xcode->Product->Clean

第3种方法.将模拟器上的当前运行的app删除,再重新加载(长按模拟器的屏幕,点击当前报错的app 删除)

第4种方法.在info.plist文件中修改bundle的版本号


7.A valid provisioning profile for this executable was not found.

把id更换一下

8.ERROR ITMS-90474: "Invalid Bundle. iPad Multitasking support requires these orientations: 'UIInterfaceOrientationPortrait,UIInterfaceOrientationPortraitUpsideDown,UIInterfaceOrientationLandscapeLeft,UIInterfaceOrientationLandscapeRight'. Found 'UIInterfaceOrientationPortrait' in bundle 'xudongxiang'."

ERROR ITMS-90474: "Invalid Bundle. iPad Multitasking support requires these orientations: 'UIInterfaceOrientationPortrait,UIInterfaceOrientationPortraitUpsideDown,UIInterfaceOrientationLandscapeLeft,UIInterfaceOrientationLandscapeRight'. Found 'UIInterfaceOrientationPortrait' in bundle 'xudongxiang’.

这是由于提交app适配ios9的ipad的分屏导致的

general-> Deployment Info -> Requires full screen (勾选)


8.Xcode failed to resolve the issue. Check your code signing settings; ensure you have a matching signing certificate and provisioning profile installed; and try again.

解决方法 : 如果你的appleID 是免费的账号 那么 我很遗憾的告诉你, 一个账号 只能配3台设备做真机调试 哈哈 不用 99 美刀的 就将就着吧

多准备几个免费的appleID 就可以了,我也是日了狗了 老子就用免费的

还有就是你可以试试把证书删了重新生成 看看是不是能把哪台给干掉(这个我没试过 猜的)

Xcode failed to resolve the issue.Check your code signing settings;ensure you............


9. 1.自己的旧项目没有使用ARC,但是引入的第三方库却是使用了ARC的。

2.自己的新项目使用了ARC,但是引入的第三方库或者以前写的代码却没有使用ARC。

1.对于第一个情况,给采用了ARC的源文件,添加-fobjc-arc选项

2.对于第二种情况,添加-fno-objc-arc


10.linker command failed with exit code 1

1.项目中引入了多个相同的文件。

删除一个就ok!

2.”Build Settings”->”Enable Bitcode”设置为NO

3.Build settings->Linking->Other Linker Flags

将此属性修改成-all_load 或者 -ObjC


11.ios 8.1版本(报一下错误)

dyld: Library not loaded: /usr/lib/libnetwork.dylib

Referenced from: /private/var/mobile/Containers/Bundle/Application/AC0BE04B-C0C8-4176-A1BE-429F46692039/习传.app/习传

Reason: image not found

解决办法:导入libnetwork.tbd框架  后面状态status改为:optinal


12.process launch failed: failed to get the task for process 1225

原因:

证书问题,project和targets的证书都必须是开发证书,ADHOC的证书会出现此问题。

解决方案:

project和targets的证书使用开发证书

其他:

failed to get the task for process XXX

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,然后点击信任就可以了。


13.Could not find a storyboard named 'MainStoryBoard' in bundle NSBundle

解决办法:删除Support File的Info.plist中的main storyBoard file base name属性即可。


14._crc32", referenced from:

解决办法:导入库 libz.tbd

15:This application's application-identifier entitlement does not match that of the installed application. These values must match for an upgrade to be allowed.

删除手机上的app,重新运行


关注微信公众号“应讯”

Xcode运行报错总结_第1张图片

你可能感兴趣的:(Xcode运行报错总结)