
开发过程中遇到的问题
UIApplicationMain
这个作者很懒,什么都没留下…
展开
-
libc++abi.dylib: terminate_handler unexpectedly threw an exception 报错
运行xcode工程时,有时候会遇到”libc++abi.dylib: terminate_handler unexpectedly threw an exception”错误,app莫名其妙就crash掉了 友盟报错 NSScanner: nil string argument Umeng: Read binary image info failed! 其实不是友盟问题,是自原创 2015-07-29 09:58:18 · 1338 阅读 · 0 评论 -
Cocopods在系统更新10.13后报错
好久没升系统 今天升了系统 更新pod里出了提示-bash: /usr/local/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory 需要重新安装一下sudo gem install cocoapods ...原创 2018-03-05 10:33:07 · 317 阅读 · 0 评论 -
创建PCH预编译
XCODE6之前会自动创建pch文件。X6后取消了。pch的作用: 1.存放一些全局的宏(整个项目中都用得上的宏) 2.用来包含一些全部的头文件(整个项目中都用得上的头文件)可能预编译太多导致编译太慢苹果取消了。如何添加pch文件呢Command+N,打开新建文件窗口:ios->other->PCH file,创建一个pch文件 Building Setting中搜索Prefix Hea原创 2016-07-17 19:37:52 · 355 阅读 · 0 评论 -
升级10.11后使用CocoaPod出现bash: pod: command not found 解决办法
根目录下运行 sudo gem install -n /usr/local/bin cocoapods 复制过去即可。原创 2015-12-03 13:53:20 · 652 阅读 · 0 评论 -
常用代码
常用代码原创 2015-08-24 14:21:12 · 389 阅读 · 0 评论 -
MMDrawerController 切换页面时不调用dealloc
开发中发现侧边栏切换时未走dealloc方法。内存飙升。 排查原因发现。controller里有nstimer. 因为 timer=[NSTimer scheduledTimerWithTimeInterval:5 target:self selector:@selector(keepAliveTimer) userInfo:nil repeats:YES]; 这个target:sel原创 2015-10-23 17:19:33 · 677 阅读 · 0 评论 -
IOS9 更新后遇到的问题
1 网络请求问题 今天运行了下以前的项目发现项目要提示: The resource could not be loaded because the App Transport Security policy requires the use of a secure connection. 想到之前听说IOS9 应用改为HTTPS 请求,以前项目都是HTTP请求。不过之前的项目原创 2015-09-29 17:30:16 · 485 阅读 · 0 评论 -
git 出现templates没有找到解决方案
换了台新电脑用 SourceTree 克隆git上的项目的时候, 出现了 warning: templates not found /usr/local/git/share/git-core/templates 警告,导致克隆失败. 在终端输入 sudo mkdir /usr/local/git sudo mkdir /usr/local/git/share s原创 2015-09-27 09:31:24 · 1946 阅读 · 0 评论 -
IOS开发获取手机内照片属性
苹果获取多张照片时运用ALAsset相关方法。 当获取到alasset 对像时可以通过 CLLocation * wgs84Location = [asset valueForProperty:ALAssetPropertyLocation]; 获取到坐标信息 相应的 ALAssetPropertyDate 可以获取到照片的创建时间,此时间是照片在些设备的生成时间 。原创 2015-08-05 14:03:12 · 638 阅读 · 0 评论 -
判断设备是否安装QQ
友盟做三方登录时如果未安装QQ软件。目前会提示去下载,这样会被appstore拒,解决方法是先判断设备是否安装QQ 然后在显示QQ登录 的按钮。 iTools 在QQ应用app里面可以找到 Info.plist 这个文件,里面就有下面的 URL types if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWi原创 2015-08-03 10:41:02 · 538 阅读 · 0 评论