No such module当我尝试构建项目时,我正在寻找Pods.如果我删除期望这个Pod的代码,另一个'没有这样的模块'会出现另一个Pod,这意味着每个Pod都必须受到影响.当我输入时,pod install我收到以下消息:
[!] The X target overrides the `EMBEDDED_CONTENT_CONTAINS_SWIFT` build setting defined in `X’. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `X` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `X'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
我为我的应用程序的调试和发布版本以及两个测试获得了这些,所以总共有12条消息.
我已经设置Always …
我遇到了一个全新项目的问题.RestKit和Facebook SDK都会出现此问题.奇怪的是SwiftyJSON工作得很好.我创建了一个全新的swift项目和一个Podfile:
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
target 'test-fb-swift4' do
    pod "FBSDKCoreKit"
    pod 'SwiftyJSON', '~> 2.1'
    pod 'RestKit', :inhibit_warnings => true
end
target 'test-fb-swift4Tests' do
end
创建该文件后,我运行pod install并使用test-fb-swift4.xcworkspace文件重新打开xcode.
现在我的控制器里面放了一个导入RestKit,我得到错误没有这样的模块'RestKit'.我已经尝试了许多不同的方法来格式化Podfile,甚至是非常简单的版本,例如:
source 'https://github.com/CocoaPods/Specs.git'
pod 'RestKit'
我尝试添加和删除use_frameworks,有和没有目标.有和没有:inhibit_warnings.
我正在运行CocoaPods 0.36.4并尝试了最新的rc构建,同样的交易.另一个项目的Objective-C版本运行正常.这是我使用Swift的第一个项目,我坚持这个问题.