您的当前位置:首页正文

iOS 错误‘集中营’

来源:华拓网

该篇用于记录平时开发遇到的错误!!!


16-07-29

针对请求源是HTTP !!!

1>、原因

2>、解决办法

1、在Info.plist中添加 App Transport Security Settings 类型 Dictionary ,并在App Transport Security Settings 下添加 Allow Arbitrary Loads 类型Boolean, 值设为 YES。

2、或者在plist source code添加:

<key>NSAppTransportSecurity<key>

<dict>

     <key>NSAllowsArbitraryLoads</key>

     <true/>

</dict>

二、SVN 报错 :An unknown Subversion error occurred. (code = 155037)

1>、原因

这是因为在 SVN 更新时意外中断引起的。

2>、解决办法

1、如果本地没有更改,只是单纯获取svn的项目,则另起一个文件夹,重新checkout。

2、如果是本地有更改,则复制到新的文件夹,重新update。


16-08-18

一、Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle (loaded)' with name 'ViewController''

大概的意思是:由于捕获到 'NSInternalInconsistencyException' 异常导致应用终止,原因是:不能在包中加载名称是ViewController的。。。(翻译水平有限)

1>、解决办法

利用谷歌在 stackoverflow 找到解决方案,见图 : 16-08-18(01)

16-08-18(01)

a、选中 Xcode 菜单栏中的 product ,点击 Clean;

b、点击项目,选中 Target ---> General ---> Main Interface

*取消选中 Main

*再次选中 Main.storyboard

不知道你的情况是否与我相同····good luck~


16-08-26

一、Undefined symbols for architecture i386:

"_sqlite3_backup_finish", referenced from:.....

解决方法:

是点击工程,在 targets 界面中找到 Build Phases,根据提示信息 “XXX” 来判断缺少什么文件,一般如果缺少自定义的文件,XXX 会是缺少的类名,那么就在 Complie Sources 中加入该文件。如果缺少类库,则在 Link Binary With Libraries加入该类库

而上面问题是因为少在Link Binary With Libraries中加入 libsqlite3.dylib,添加后就可以编译通过。


16-09-19

一、Initializing 'AppDelegate *__strong' with an expression of incompatible type 'id'。。。

使用ARC时,获取全局的AppDelegate会有上面的警告。

解决方法: 强制转换

AppDelegate*app  = (AppDelegate*) [UIApplicationsharedApplication].delegate;


16-10-12

最近上传应用审核时,出现: Error ITMS-90168: “The binary you uploaded was invalid.” 错误。花了大概两天的时间解决,简直是日了狗了!!!

cd ~/.itmstransporter

rm update_check*

mv softwaresupport softwaresupport.bak

cd UploadTokens

rm*.token

再吐槽一下:f***k the dog....


16-10-15

command line tool 错误:

xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist, use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools (or see `man xcode-select`)

百度到的答案:

终端执行sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer命令,然后再输入一次系统的密码,完成。

xcrun: error: active developer path。。。

2016-11-01

ERROR ITMS-90086: "Missing 64-bit support. iOS apps submitted to the App Store ....

2016-11-01

原因:Archive 时设备是选择真机(iPhone 5),改成 “Generic iOS Device”后就 OK 了。