添加头文件目录 Header Search Paths对应系统或者第三方库的头文件;#include <> User Header Search Paths 对应用户自己代码的头文件;#include “” 添加静态库依赖 设置证书签名 https://stackoverflow.com/questions/34346436/xcode-7-2-no-matching-provisioning-profiles-found 清除缓存 点击xcode偏好设置->Locations->Derived Data,点击箭头定位到目标文件夹,将此文件夹清空并清空回收站,再重新编译即可。 有时候这个错误可以通过清理缓存解决: Command /usr/bin/codesign failed with exit code 1 编译静态库 http://blog.csdn.net/weidfyr/article/details/50590693 如果用模拟器版本静态库去链接真机版本,可能会出现的错误: file was built for archive which is not the architecture being linked (arm64) 解决办法:静态库编译成真机版本 Add preprocessor macro to a target in xcode(添加预处理宏) Select project file Select the target you want Go to Build Settings Search for ‘preprocessor’ Add your preprocessor macro either for Debug, Release, or both.

Continue reading


构建 command + R 清理工程 command + shift + K 当前工程根目录的环境变量(.xcworkspace文件所在目录) $(SRCROOT) 头文件搜索路径 Always Search User Paths 是否优先使用User Header Search Paths Header Search Paths 编译器的头文件目录 User Header Search Paths 自己工程的头文件目录 修改编译输出目录 Build Settings -> Build Locations -> Build Products Path 修改后需要重启xcode才会生效。 参考:http://blog.csdn.net/tintinr/article/details/50936313 iOS 静态库制作(Xcode9.0) http://blog.csdn.net/wanna_dance/article/details/78687676 查看SDK版本号 命令: $> xcodebuild -showsdks 输出结果: $> OS X SDKs: OS X 10.8 -sdk macosx10.8 OS X 10.9 -sdk macosx10.9 iOS SDKs: iOS 6.

Continue reading

Author's picture

Neil Wang


To Be Marvelous