IOS开发错误总结-警告篇
2015-05-18 00:00
260 查看
摘要: 在开发过程中遇到的种种警告提示,当然不去理他也不会影响程序运行,但是做为有追求的程序员,当然建议是能把这些警告也去处理掉,本文章列出的警告仅做参考,供入门级菜鸟学习之用,大神请略过。
警告篇
自己开发过程中遇到的警告,会持续更新,也希望大家多提意见
一、Missing file xxx
如果你在finder中删除了工程里面的文件,xcode上会出现一个警告,Missing file xxx, 有个警告在那恨事不自在.上网着了下,发现了如下解决方法:
1.打开terminal, cd 到刚才你删除的文件的文件夹,就是xcode提示你missing的文件夹
2.执行 svn delete missFileName
二、LLVM GCC Warning
4.3默认使用的是ARC编译,不是原来的GCC编译,所以你编译老程序的话,改回GCC编译看行不行
具体改 :选中 project->build setting->build options->complier for c/objective-c/c++ -> LLVM GCC 4.2
三、declaration of will not be visible outside of this function
解决方法:Add
四、Application failed code sign verification
解决办法:Target设置----->build------>Validate Built Product选项去掉就可以了
五、ld: warning: directory not found for option ' '
解决方法 :
选择项目名称----->Targets----->Build Settings----->Search Paths----->Library Search Paths
删除对应路径
六、Unable to extract entitlements from application
Application failed codesign verification. The signature was invalid, contains disallowed entitlements, or it was not signed with an iPhone Distribution Certificate.
Unable to extract entitlements from application: (null)
解决方法
Your problem may due to an invalid setting for the Build Variants build setting. Valid settings are normal, profile, and debug. For submission to the app store, this setting should be normal.
Here’s how to fix this:
First update the Project build settings:
Click on Project ->
-> Build Settings
Search for “build variants”
Click on the arrow icon next to Build Variants in the search results to expand the section
Remove any existing entries and replace them with
normal
Next update the Target build settings:
Click on Targets ->
-> Build Settings
Search for “build variants”
Click on the arrow icon next to Build Variants in the search results to expand the section
Remove any existing entries and replace them with
normal
原文:
警告篇
自己开发过程中遇到的警告,会持续更新,也希望大家多提意见
一、Missing file xxx
如果你在finder中删除了工程里面的文件,xcode上会出现一个警告,Missing file xxx, 有个警告在那恨事不自在.上网着了下,发现了如下解决方法:
1.打开terminal, cd 到刚才你删除的文件的文件夹,就是xcode提示你missing的文件夹
2.执行 svn delete missFileName
二、LLVM GCC Warning
4.3默认使用的是ARC编译,不是原来的GCC编译,所以你编译老程序的话,改回GCC编译看行不行
具体改 :选中 project->build setting->build options->complier for c/objective-c/c++ -> LLVM GCC 4.2
三、declaration of will not be visible outside of this function
+ (Reachability*) reachabilityWithAddress: (const struct sockaddr_in*) hostAddress;(这里报的)
解决方法:Add
#import <netinet/in.h>in Reachability.h to get away with this
四、Application failed code sign verification
解决办法:Target设置----->build------>Validate Built Product选项去掉就可以了
五、ld: warning: directory not found for option ' '
ld: warning: directory not found for option '-L/Users/frenck/Downloads/apz/../Google Analytics SDK/Library'
解决方法 :
选择项目名称----->Targets----->Build Settings----->Search Paths----->Library Search Paths
删除对应路径
六、Unable to extract entitlements from application
出错信息
iPhone/iPod Touch: application executable is missing a required architecture. At least one of the following architecture(s) must be present: armv6Application failed codesign verification. The signature was invalid, contains disallowed entitlements, or it was not signed with an iPhone Distribution Certificate.
Unable to extract entitlements from application: (null)
解决方法
Your problem may due to an invalid setting for the Build Variants build setting. Valid settings are normal, profile, and debug. For submission to the app store, this setting should be normal.
Here’s how to fix this:
First update the Project build settings:
Click on Project ->
<your project>
-> Build Settings
Search for “build variants”
Click on the arrow icon next to Build Variants in the search results to expand the section
Remove any existing entries and replace them with
normal
Next update the Target build settings:
Click on Targets ->
<your project>
-> Build Settings
Search for “build variants”
Click on the arrow icon next to Build Variants in the search results to expand the section
Remove any existing entries and replace them with
normal
原文:
相关文章推荐
- [IOS 开发] 开发错误总结-警告篇
- iOS开发 常见的错误与警告
- iOS开发异常错误总结之——wait_fences: failed to receive reply: 10004003
- iOS开发异常错误总结之——wait_fences: failed to receive reply: 10004003
- iOS开发中出现( linker command failed with exit code 1)错误的总结
- iOS开发异常错误总结之——wait_fences: failed to receive reply: 10004003
- [置顶] React Native开发错误警告处理总结(持续更新)
- ios开发常遇错误总结之xcode7+ios9上下黑边的问题
- iphone开发错误总结-警告篇
- iOS开发OC基础:Xcode中常见英文总结,OC常见英文错误
- iOS 开发过程中常出现的一些错误总结
- ios开发 - Xcode升级后的警告、错误的解决办法
- ios开发中遇到的错误总结
- iOS开发常遇错误之Xcode编译Undefined symbols for architecture xxx 错误总结
- ios开发总会遇到的N大错误总结
- iOS开发OC基础:Xcode中常见英文总结,OC常见英文错误
- iOS开发异常错误总结
- ios开发常遇错误总结之Xcode路径问题
- IOS开发过程常见警告解决方案归纳总结