我在將Realm集成到我的項目中很困難。 其實,我遵循官方文檔的指導原則,儘管這對我沒有幫助。領域安裝XCode 8.1
當我試圖導入RealmSwift時,我得到了「沒有這樣的模塊」。
import RealmSwift
在框架中Realm.framework是紅色的。
這裏是我的Podfile
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
target 'RealmTest' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for RealmTest
pod 'RealmSwift'
target 'RealmTestTests' do
inherit! :search_paths
# Pods for testing
end
target 'RealmTestUITests' do
inherit! :search_paths
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '2.3' # or '3.0'
# Pods for testing
end
end
end
end
你可以嘗試移動' 「目標」RealmTest'do'部分的Podfile的post_install'部分,然後再次從終端運行'pod install'? – AustinZ
@AustinZ也沒有幫助 –
你可以建立和運行你的proyect?這可能解決這個問題。第一次編譯該項目時,即使它已正確安裝,也會出現此錯誤。 – Orlando