iOS|iOS Xcode不能识别Masonry.h文件

遇到Xcode不能识别Masonry.h文件,进而build失败,报错信息如下:

-[UIButton mas_makeConstraints:]: unrecognized selector sent to instance 0x100584110 Showing All Messages clang: error: no such file or directory: 'Mansory.h'

iOS|iOS Xcode不能识别Masonry.h文件
文章图片

iOS|iOS Xcode不能识别Masonry.h文件
文章图片

【iOS|iOS Xcode不能识别Masonry.h文件】此时工程中没有引用到pod中的Masonry.h文件。重新Pod install后会给出具体的解决方案。

iOS|iOS Xcode不能识别Masonry.h文件
文章图片
[!] Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.[!] The `人脸SDK接入 [Debug]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods-人脸SDK接入/Pods-人脸SDK接入.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the `$(inherited)` flag, or - Remove the build settings from the target.[!] The `人脸SDK接入 [Release]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods-人脸SDK接入/Pods-人脸SDK接入.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the `$(inherited)` flag, or - Remove the build settings from the target.

解决方案是将Other linker flag由-ObjC(先前是为了兼容第三方的C++库而改为-ObjC,现在将用到第三方C++库文件的后缀改为.mm)改为$(inherited)即可。 iOS|iOS Xcode不能识别Masonry.h文件
文章图片

    推荐阅读