【发布时间】:2017-10-18 17:58:40
【问题描述】:
当我在测试中编译时,我总是得到这个结果“没有这样的模块'RealmSwift'”。
我在 podfile 中有以下内容。
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
# ignore all warnings from all pods
inhibit_all_warnings!
target 'App' do
use_frameworks!
pod 'RealmSwift'
pod 'Fabric', '~> 1.6.3'
pod 'Answers', '~> 1.3.5'
pod 'DropDown', '~> 2'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.0' # or '3.0'
end
end
end
我试过了,结果还是一样。
pod --version
pod cache clean Realm
pod cache clean RealmSwift
pod deintegrate || rm -rf Pods
pod install --verbose
rm -rf ~/Library/Developer/Xcode/DerivedData
我还删除了我项目的“Pods”文件夹,文件“Podfile.lock”和“App.xcworkspace”,然后我运行pod install。
我正在使用 Xcode 8.3.3 和 Swift 3
【问题讨论】:
-
在 Xcode 中构建时,您还看到了哪些其他错误(如果有)?无法找到模块通常表示模块(或它所依赖的东西)构建失败。
-
我添加了截图。
标签: unit-testing realm cocoapods integration-testing