Category Archives: 错误分析(iOS)

NSError 错误code对照

NSError codes in the Cocoa error domain.

enum {
NSFileNoSuchFileError = 4,
NSFileLockingError = 255,
NSFileReadUnknownError = 256,
NSFileReadNoPermissionError = 257,
NSFileReadInvalidFileNameError = 258,
NSFileReadCorruptFileError = 259,
NSFileReadNoSuchFileError = 260,
NSFileReadInapplicableStringEncodingError = 261,
NSFileReadUnsupportedSchemeError = 262,
NSFileReadTooLargeError = 263,
NSFileReadUnknownStringEncodingError = 264,
NSFileWriteUnknownError = 512,
NSFileWriteNoPermissionError = 513,
NSFileWriteInvalidFileNameError = 514,
NSFileWriteInapplicableStringEncodingError = 517,
NSFileWriteUnsupportedSchemeError = 518,
NSFileWriteOutOfSpaceError = 640,
NSFileWriteVolumeReadOnlyError = 642m
NSKeyValueValidationError = 1024,
NSFormattingError = 2048,
NSUserCancelledError = 3072,[……]

继续阅读

canOpenURL: failed for URL: “mqq://sdk”

1
2
3
4
5
6
7
8
9
10
11
12
13
-canOpenURL: failed for URL: "wtloginmqq2://qzapp" - error: "(null)"
2015-09-13 15:51:10.903[2948:1118021] -canOpenURL: failed for URL: "mqqopensdkapiV3://qzapp" - error: "(null)"
2015-09-13 15:51:10.904[2948:1118021] -canOpenURL: failed for URL: "mqqwpa://qzapp" - error: "(null)"
2015-09-13 15:51:10.905[2948:1118021] -canOpenURL: failed for URL: "mqqopensdkapiV2://qzapp" - error: "This app is not allowed to query for scheme mqqopensdkapiV2"
2015-09-13 15:51:10.906[2948:1118021] -canOpenURL: failed for URL: "mqqOpensdkSSoLogin://qqapp" - error: "This app is not allowed to query for scheme mqqOpensdkSSoLogin"
2015-09-13 15:51:10.906[2948:1118021] -canOpenURL: failed for URL: "mqq://qqapp" - error: "This app is not allowed to query for scheme mqq"
2015-09-13 15:51:10.907[2948:1118021] -canOpenURL: failed for URL: "mqzoneopensdkapiV2://qzapp" - error: "This app is not allowed to query for scheme mqzoneopensdkapiV2"
2015-09-13 15:51:10.908[2948:1118021] -canOpenURL: failed for URL: "mqzoneopensdkapi19://qzapp" - error: "This app is not allowed to query for scheme mqzoneopensdkapi19"
2015-09-13 15:51:10.909[2948:1118021] -canOpenURL: failed for URL: "mqzoneopensdkapi://qzapp" - error: "This app is not allowed to query for scheme mqzoneopensdkapi"
2015-09-13 15:51:10.910[2948:1118021] -canOpenURL: failed for URL: "mqzoneopensdk://qzapp" - error: "This app is not allowed to query for scheme mqzoneopensdk"
2015-09-13 15:51:10.911[2948:1118021] -canOpenURL: failed for URL: "mqzone://qzapp" - error: "This app is not allowed to query for scheme mqzone"
2015-09-13 15:51:10.911[2948:1118021] -canOpenURL: failed for URL: "wtloginmqq2://qzapp" - error: "(null)"
2015-09-13 15:51:10.912[2948:1118021] -canOpenURL: failed for URL: "mqqopensdkapiV3://qzapp" - error: "(null)"

[……]

继续阅读

升级Xcode7后所要更改的配置

iOS9 一发布便升级,隔天调试程序时已经不能使用Xcode 6.4,果断升级,升级之后先报了一个错,bitcode,以为要升级所用sdk,但是还是2个月前的版本,搜到这篇文章,给需要的小伙伴们,之所以不喜欢用转载,万一有天原博主删除文章,我便也找不到原文,还请谅解;正文如下:

1,默认使用HTTPS请求

如果在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.

修改方法是要么使服务器支持https访问,要么关闭https的使用。第一种方法对于个人开发者来说代价还是比较大的,因此推荐使用后面一种方法,具体的做法是:在工程的Info.plist文件里添加NSAppTransportSecurity字典类型的,添加一个元素:key为NSAllowsArbitraryLoads,值为YES。[……]

继续阅读