Xcode 出现的某些问题
1. "_SCNetworkReachabilityGetFlags", referenced from:
这个问题的解决方法加入 SystemConfiguration.framework
2. "_OBJC_CLASS_$_WKWebView", referenced from:
在项目配置中添加系统类库:WebKit.framework
3. implicit declaration of function
include the AudioToolbox.framework in your project
4. Invalid bitcode version (Producer: '802.0.38.0_0' Reader: '800.0.42.1_0')
该问题是由于本地Xcode版本和推送SDK打包环境不一致产生的,建议:
推送SDK基于Xcode 8编译,请检查本地Xcode版本,升级到Xcode 后再尝试打包;
或
Enable Bitcode设置为NO。
5. 问题:编译出错duplicate symbol _OBJC_CLASS_$_ XXX in
原因:导入头文件的时候误导入.m文件
解决办法:通过搜索.m文件查出 在哪个类中导入了 换成.h文件即可。
6. e.app: resource fork, Finder information, or similar detritus not allowed
Command /usr/bin/codesign failed with exit code 1
这个问题很坑爹。可以看这篇文章 http://blog.csdn.net/laizile/article/details/53067813。我的问题解决是从 https://stackoverflow.com/questions/39652867/code-sign-error-in-macos-sierra-xcode-8-3-3-resource-fork-finder-information 这里找到的。具体方法:
Solution 3: Inspired by Mark McCorkle's Answer
In terminal, goto project's root directory and execute one by one command
find . -type f -name '*.jpeg' -exec xattr -c {} \;
find . -type f -name '*.jpg' -exec xattr -c {} \;
find . -type f -name '*.png' -exec xattr -c {} \;
find . -type f -name '*.json' -exec xattr -c {} \;
Clean Xcode and Re Build. Done.
7.0 Unsupported compiler 'com.apple.compilers.llvmgcc42' selected for architecture 'armv7'
解决方法:
Change your compiler for C/C++/ObjectiveC Go to Build Settings->Build OPtions->compiler for C/C++/ObjectiveC; select Default(Apple LLVM8.0)
8.0 cannot use "@throw" with objective-c exceptions disabled
解决:build Settings 里 enable objective-c exceptions 设置为 yes
9.0 Undefined symbols for architecture arm64:
"_SecPolicyCreateSSL", referenced from:
-[AFSecurityPolicy evaluateServerTrust:forDomain:] in AFSecurityPolicy.o
方法: 项目添加 Security.framework 和 libxml2.tbd
其他倒入af引起的问题 试试添加:libz.dylib SystemConfiguration.framework MobileCoreAServices.framework CFNetwork.framework