
报错处理
Clement_Gu
代码是个神奇的东西
展开
-
'UICollectionView must be initialized with a non-nil layout parameter' 报错原因及解决
'UICollectionView must be initialized with a non-nil layout parameter'这个报错是因为 CollectionView在创建的时候或者在跳转页面的时候没有指定其UICollectionViewFlowLayout // UICollectionViewFlowLayout *flow = [[UICollect原创 2016-03-09 22:29:05 · 3680 阅读 · 0 评论 -
scrollview里面的页面元素往下掉automaticallyAdjustsScrollViewInsets
在开发中遇到这样一个问题 就是在scrollview里的东西使劲往下拉 然后会掉下去大概一个导航条的高度。而且在scrollview左右拖动的时候还会出现上下漂移的情况。解决这种情况可以设置self.automaticallyAdjustsScrollViewInsets = NO;//默认是YES看一下官方文档:automaticallyAdjustsScrollView原创 2016-07-13 01:29:15 · 584 阅读 · 0 评论 -
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__init(char
这是我在接入芝麻信用的时候碰到的问题 Undefined symbols for architecture x86_64: "std::__1::basic_string, std::__1::allocator >::__init(char const*, unsigned long)", referenced from: CAliSecXURL::enc原创 2016-07-04 00:52:58 · 6230 阅读 · 0 评论 -
xcode setting enable_bitcode
这边我是芝麻信用(第三方不是官方的)对接的时候遇到的问题就是bitcode 要设置成NO 设置的方法是build settings enable bit code 改成NO就可以了 下面转载一个关于bitcode的介绍用Xcode 7 beta 3在真机(iOS 8.3)上运行一下工程,结果发现工程编译不过。看了下问题,报的是以下错误:ld: ‘/Users/**/Fra转载 2016-07-07 15:25:47 · 1004 阅读 · 0 评论 -
dyld: Library not loaded: @rpath
//以下是自定义的framework 在放入工程中出现的问题,原因是动态framework为嵌入 要么改成静态的要么嵌入 看个人所需,另外swift版本的动态framework是在ios8 xcode6 之后才可以用的 所以如果是swift项目的话好像要从8.0开始支持而不是7.0dyld: Library not loaded: @rpath/MySDK.framework/MySD转载 2016-08-23 16:07:16 · 1541 阅读 · 0 评论 -
clang: error: no such file or directory: '/Users...
clang: error: no such file or directory: '/Users/xiaobai/Desktop/Model/3rdPart/JPushSdk/jpush-ios-2.1.9.a'一般多人开发的时候会出现文件缺失的问题,遇到这个问题就根据提示找到对应的地址,然后会发现这个文件名字是红色的,然后把缺失的文件拷贝过来就可以了原创 2016-12-08 14:54:16 · 1557 阅读 · 0 评论 -
viewController页面底部白条问题
因为项目中有拉控件的页面,在页面跳转的时候会出现页面往下掉的情况当时的解决方法是 self.edgesForExtendedLayout =UIRectEdge.None但是这种情况出现了 底部有白条的情况 并且挡住了界面控件换成下面代码可以将底部的白条去掉self.edgesForExtendedLayout =UIRectEdge.Botto原创 2017-01-13 16:37:26 · 2011 阅读 · 0 评论 -
真机6 6s 状态栏及界面字体变大
这种情况的 App 在 iPhone 6上应该也存在相同的问题。在iPhone 6s上状态栏字体变大是因为没有添加 iPhone 6s 需要的 Launch image,所以显示的时候就自动进入Scale Mode 使用iPhone 5s 也就是4寸屏的 Launch Image。解决办法:添加iPhone 6 及 6s需要的 750尺寸的图。iPh转载 2017-06-05 17:42:12 · 471 阅读 · 0 评论 -
ios 键盘导致h5页面变形问题
键盘弹出时影响h5的fixed属性使其失效 解决方法是在弹出键盘的时候将fixed 改成static然后在键盘消失的时候再改回来 下面上一个例子虚拟键盘在点击input和textarea的时候会出现,所以点击input事件是虚拟键盘出现,input失去焦点是虚拟键盘隐藏。所以当虚拟键盘出现时,将fixed定位转化为static,当虚拟键盘隐藏时,将static还原为fixed,就可以解转载 2017-06-14 16:25:16 · 3760 阅读 · 0 评论 -
apple mach-o linker (id) error
apple mach-o linker (id) error 错误处理错误说明:我遇到的情况是将AppDelete放到文件夹里了 然后重新关联了一下就报这个错。xcode 9 swift 4解决方法:1.将文件夹里面的appdelegate 拖出来编译一下再拖回去就可以了。2.查了一些资料,也可以试试 clean一下再编译。3.还有一些资料说是因为product 和 target 中的版本号不一...原创 2018-06-05 15:42:35 · 753 阅读 · 0 评论 -
The volume “Macintosh HD” is out of space Xcode无法提示
Xcode经常出现以上错误并且提示功能失效,以下为处理办法:1、右击Finder点击前往文件夹选项。2、粘贴路径~/Library/Developer/Xcode/DerivedData并前往。3、将文件夹中的所有文件夹删除。4、重启电脑后打开Xcode即可。提示:一般出现这种情况之前写的代码可能无法保存请及时做好拷贝工作。...原创 2018-05-31 17:39:51 · 2149 阅读 · 0 评论 -
JSON text did not start with array or object and option to allow fragments not set
###用AFN解析网页数据报错 原因是afn默认是解析json数据,修改方法如下:AFHTTPSessionManager *manager =[AFHTTPSessionManager manager];manager.responseSerializer = [AFHTTPResponseSerializer serializer];这样就可以解析到网页数据了。 然后将dat...原创 2018-08-30 18:04:14 · 15018 阅读 · 0 评论 -
dyld: Symbol not found: ___NSArray0__ Referenced from: /System/Library/Frameworks/CoreFoundation
dyld: Symbol not found: _NSArray0 Referenced from: /System/Library/Frameworks/CoreFoundation.framework 报类似错误的一般是低版本手机会遇到,解决方案如下: - 先确定在Build Phases -> Link Binary With Libraries 中是否添加了CoreFo...原创 2018-09-08 19:15:16 · 1114 阅读 · 0 评论 -
ios Xcode 10 Multiple commands produce 问题
####Xcode运行已经存在的非10版本的项目 一般会出现以下错误####解决方法File -> Workspace Settings…在Build System: 选择Legacy Build System运行即可原创 2018-10-17 17:23:51 · 1511 阅读 · 0 评论 -
<iOS>关于Xcode上的Other linker flags
Targets选项下有Other linker flags的设置,用来填写XCode的链接器参数,如:-ObjC -all_load -force_load等。还记得我们在学习C程序的时候,从C代码到可执行文件经历的步骤是:源代码 > 预处理器 > 编译器 > 汇编器 > 机器码 > 链接器 > 可执行文件在最后一步需要把.o文件和C语言运行库链接起来,这时候需要用到ld命令。源文件经转载 2016-06-12 14:31:56 · 226 阅读 · 0 评论 -
libc++abi.dylib: terminate_handler unexpectedly threw an exception
libc++abi.dylib: terminate_handler unexpectedly threw an exception这是我改bug的时候遇到的一个问题,我这个问题的原因是 整个app用了两个storyboard 然后跳转的时候用的secondstoryboard 跳到 Mainstoryboard中 出现错误附上源码// resView = sel原创 2016-06-03 15:54:53 · 548 阅读 · 0 评论 -
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.x
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.x我这边的错误是在svn上把一个文件删除了 然后在Xcode 里面运行的时候报的错 只要把删除的文件从Xcode里面删除就可以了原创 2016-06-07 16:32:47 · 337 阅读 · 0 评论 -
-[__NSArrayI removeObjectAtIndex:]: unrecognized selector sent to instance 0x7fcc60626ca0'原因及解决
//报错信息Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayI removeObjectAtIndex:]: unrecognized selector sent to instance 0x7fcc60626ca0'//原因1.把不可变数组NSArray原创 2016-03-10 12:54:11 · 2643 阅读 · 0 评论 -
App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure.
pp 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. 原因及解决方法1.原因是xcode的安全协议不支持h原创 2016-03-22 16:25:30 · 502 阅读 · 0 评论 -
This application is modifying the autolayout engine from a background thread 原因
This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes. This will cause an exception in a future release.1.翻译下就是 应用程序的原创 2016-03-22 17:01:09 · 541 阅读 · 0 评论 -
gitBox 出现Couldn’t communicate with a helper application.
我的错误是因为 太乱了里面的项目太多 导致错乱了 我用的是gitosc解决方法:xcrun git config --global user.email 自己的gitosc邮箱号xcrun git config --global user.name "自己的gitosc名字"然后在工程文件中commit项目 系统会提示你 输入账号 (邮箱号) 密码(gitosc密码原创 2016-03-28 17:03:57 · 855 阅读 · 0 评论 -
kCFStreamErrorDomainSSL, -9802
kCFStreamErrorDomainSSL, -9802我是微博授权时get页面时候碰到的 其实就是http安全问题 在info.plist 里面openassource 添加NSAppTransportSecurity NSAllowsArbitraryLoads 就好了原创 2016-04-27 16:58:57 · 1539 阅读 · 0 评论 -
Error Domain=NSCocoaErrorDomain Code=3840
最近iOS开发中,客户端需要使用http POST去进行请求服务器。需要发送的是XML格式的,当然接收的也是XML。我们准备使用的是AFNetworking来实现。关于AFnetworking的使用以及Cocoapods包管理,请参考我的其他几篇博客:《iOS项目开发实战——使用AFNetworking进行HttpGet请求》,《查看进行AFNetworking请求时的头部信息》,《iOS包管转载 2016-04-28 01:14:10 · 1512 阅读 · 0 评论 -
Manual Reference Counting AutoMatic Reference Counting 混编
工程文件->build phases - >compile Source - >(mrc 的 .m文件)后面compiler Flags 双击 写上 -fno-obj-arc原创 2016-04-17 14:43:28 · 334 阅读 · 0 评论 -
Undefined symbols for architecture x86_64: "_sqlite3_close", referenced from:
It looks like libsqlite3.tbd is the new libsqlite3.dylib. I added it and everything worked.Go to the Build Phases tab. Expand the "Link Binary with Libraries" section. Click on the + icon. Sea转载 2016-05-03 14:22:49 · 845 阅读 · 0 评论 -
CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 9.3'
在真机测试的时候往往会突然出现这样一个错误,code signing is required for product type 'Application' in SDK 'iOS 7.0' ,就是说代码签名证书不对劲。解决方案,1.选择工程->Build Settings -> Code Signing -> Code Signing Identity -> Debug转载 2016-05-03 14:25:39 · 875 阅读 · 0 评论 -
linker command failed with exit code 1 (use -v to see invocation)
看了网上的一堆解决方法,没用 后来试了一下clean 就好了 这使用于svn代码没改更新的时候出错原创 2016-05-27 10:49:52 · 218 阅读 · 0 评论 -
Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has be
http://bbs.yusian.com/thread-10352-1-1.html 原文地址问题分析:iOS8在调用系统相机拍照时,会有一两秒的停顿,然后再弹出UIImagePickConroller,IOS7是没有这个问题的,在百度找了无数遍都没能解决这个问题,有说要将imagePickController设置为全局变量,有说要延时0.5秒再presentViewContro转载 2016-04-20 16:54:19 · 427 阅读 · 0 评论 -
no such file or directory: Prefix.pch' PCH全局化问题
在路径$(RSCROOT)/工程名/Prefix.pch中我写的是这个路径 但是实际 存在的路径是/工程文件名/other/Catergory/Prefix.pch //所以应该写实际在文件夹中路径 就可以了 或者把文件拖到你写的文件路径下参见网上解决方法Hi, it's simple to fix. Just look at the error. Go to原创 2016-05-06 10:52:19 · 612 阅读 · 0 评论 -
The operation couldn’t be completed. (LaunchServicesError error 0.)
每次运行都会报这错误,但是只要clear下工程就可以运行。或者reset模拟器就可以了。原因:点击工程文件 Bundle Identifier 被你不小心改掉了解决方法:如果是本地创建练习的文件 只要自己新建一个类似的文件然后把他复制过来就可以了 一般后面有四个杠 ----原创 2016-04-25 01:10:15 · 260 阅读 · 0 评论 -
ios oc swift混编导致打包过大问题 avoid SwiftSupport folder
####SwiftSupport 导致包过大 在OC swift混编后打包由于SwiftSupport支持文件会导致混编后的打的包文件会偏大。####解决方法Build Setting -> User-Defined -> EMBEDDED_CONTENT_CONTAINS_SWIFT 设置为NO#####相关链接avoid SwiftSupport folder i...原创 2018-10-31 20:23:55 · 5368 阅读 · 1 评论