cocoapods错误总结

1 报错:Pods written in Swift can only be integrated as frameworks; add use_frameworks! to your Podfile or target to opt into using it. The Swift Pods being used are: ReactiveCocoa, ReactiveSwift, and Result

解决:在想应的pod 'ReactiveCocoa'下添加use_frameworks!git

ps:注意use_frameworks!后面的!号github

2 集成cocoapods的时候报错:'xxx' file not found with include; use "quotes" instead

解决:引用路径的问题,更改引用路径。例如:#import <JSONModel.h>,改为#import <JSONModel/JSONModel.h> 就能够了ide

3 集成cocoapods的时候报错:include of non-modular header inside framework module 'XXX': 'XXX' [-Werror,-Wnon-modular-include-in-framework-module]

解决:引用路径的问题,更改引用路径。例如:#import "JSONModel.h",改为#import <JSONModel/JSONModel.h> 就能够了code

4 集成cocoapods的时候报错:include of non-modular header inside framework module 'XXX': 'XXX' [-Werror,-Wnon-modular-include-in-framework-module]

解决:若是第3条解决不了,在pod spec lint后添加--use-libraries。同时在pod trunk push 或者pod repo push 【私有库】的后添加--use-librariesci

--use-libraries表示使用静态库或者是framework,这里主要是解决当咱们依赖一些framework库后校验提示找不到库的时候用到。get

5 集成cocoapods的时候报错:Encountered an unknown error (Unable to find a specification for xxx depended upon by xxx

解决:在集成cocoapods的时候添加私有或者公有或者二者都有的sources。如公有的sources。pod repo push xiaofengCocoapodsRepo --sources=https://github.com/CocoaPods/Specs.gitit

相关文章
相关标签/搜索