iOS 笔记(1)
2015-09-01 14:27
309 查看
由于之前公司的项目是从外包手里接回来搞了一段时间,准备开新的工程,重构项目;下面记录一些重构中遇到的问题,让自己加深印象、也希望对另外的朋友有帮助~说的不对的地方请指正~谢谢!
1、xcode6中去除了pch文件,如果需要用到pch文件需要自己创建一个、然后设置pch文件的路径
第一步:创建PCH文件
![](http://img.blog.csdn.net/20150901142759059?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
第二步:在项目build setting中设置 pch文件路径
![](http://img.blog.csdn.net/20150901143117771?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
这里是pch 文件的路径。如果提示找不到pch文件的话 就查看地址对不对
2、即成支付宝SDK的时候提示说 'openssl/asn1.h' file not found
我是这样解决的,在build setting -> header search paths 里面有木有设置alipay的SDK路径
![](http://img.blog.csdn.net/20150901143705335?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
$(SRCROOT) :表示的当前目录
3、新开的项目是ARC的,导入一些地方库的时候经常出现 'autorelease' is unavailable: not available in automatic reference counting mode 这个问题是因为导入的问题是非ARC文件、这时候我们需要混编模式。
在build phases -> Compile Sources 里面找到报错的文件 ,把Compiler Falg 设置为-fno-objc-arc 就OK了。
4、已项目还支持了32位的iOS系统,所以换到64位的时候会出现很多的***警告看的都很不爽~~
我们可以直接通过设置 target -> build settting -> other warning flags 为 -Wno-shorten-64-to-32 来关闭工程中的类型警告
![](http://img.blog.csdn.net/20150901152809003?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
5、因为新项目对项目本来的文件做了整理,所以出现了The Copy Bundle Resources build phase contains this target's Info.plist file 这样一个***的警告。在苹果技术问答是说这样解决的。
在target -> build phases ->copy bundle resources 把info.plist文件引用移除
The INFOPLIST_FILE build setting specifies the name of the
setting and copies the referenced
you should not add it to your Copy Bundle Resources build phase or make it a target member.
To resolve this warning, select your
1, then click the Remove (–) button to delete it from the phase
1、xcode6中去除了pch文件,如果需要用到pch文件需要自己创建一个、然后设置pch文件的路径
第一步:创建PCH文件
第二步:在项目build setting中设置 pch文件路径
这里是pch 文件的路径。如果提示找不到pch文件的话 就查看地址对不对
2、即成支付宝SDK的时候提示说 'openssl/asn1.h' file not found
我是这样解决的,在build setting -> header search paths 里面有木有设置alipay的SDK路径
$(SRCROOT) :表示的当前目录
3、新开的项目是ARC的,导入一些地方库的时候经常出现 'autorelease' is unavailable: not available in automatic reference counting mode 这个问题是因为导入的问题是非ARC文件、这时候我们需要混编模式。
在build phases -> Compile Sources 里面找到报错的文件 ,把Compiler Falg 设置为-fno-objc-arc 就OK了。
4、已项目还支持了32位的iOS系统,所以换到64位的时候会出现很多的***警告看的都很不爽~~
我们可以直接通过设置 target -> build settting -> other warning flags 为 -Wno-shorten-64-to-32 来关闭工程中的类型警告
5、因为新项目对项目本来的文件做了整理,所以出现了The Copy Bundle Resources build phase contains this target's Info.plist file 这样一个***的警告。在苹果技术问答是说这样解决的。
在target -> build phases ->copy bundle resources 把info.plist文件引用移除
The INFOPLIST_FILE build setting specifies the name of the
Info.plistassociated with your target. When building a target, Xcode reads this build
setting and copies the referenced
Info.plistinto your application bundle. Because Xcode automatically processes the
Info.plist,
you should not add it to your Copy Bundle Resources build phase or make it a target member.
To resolve this warning, select your
Info.plistfrom the Copy Bundle Resource build phase as shown in Figure
1, then click the Remove (–) button to delete it from the phase
相关文章推荐
- IOS 下字体 PC 上
- Mac下使用CornerstoneSVN版本管理中iOS静态库被忽略问题解决
- iOS电脑安装Pods
- iOS学习总结之导航控制器
- ios tableviewcell 设置为禁止点击
- iOS中scrollview是否要回弹
- iOS 让自己代码更好看的一些小技巧
- ios textView 输入时,输入框里面的文字上下浮动Bug
- iOS开发~CocoaPods使用详细说明
- IOS常用开发第三方库整理
- 集成支付宝 报错:rsa_private read error : private key is NULL
- ios 支付宝总结
- ios 时间戳转换成时间
- 个人对runtime的理解
- iOS 简单理解协议代理的执行原理
- IOS8下的数据搜索
- 71.iOS 错误堆栈查找崩溃原因的方法---根据崩溃信息,找到对应的崩溃代码
- tableView中需要点击一次才能跳转的问题
- iOS使用AVCaptureSession自定义相机
- iOS8新特性