我正在通过cocoapods在我的新swift项目中集成Almofire
。成功安装Alamofire pod后,我无法在swift文件中导入它。 Xcode显示以下错误。
没有这样的模块' Alamofire'
以下是我的Podfile
以供参考
source 'https://github.com/CocoaPods/Specs.git'
# Uncomment this line to define a global platform for your project
platform :ios, '9.0'
# Uncomment this line if you're using Swift
use_frameworks!
target 'CoreDataSample' do
pod 'Alamofire', '~> '3.4'
end
target 'CoreDataSampleUITests' do
end
我已经在github上的Almofire中提到了以下问题
还尝试了以下内容
任何建议都会受到赞赏。
答案 0 :(得分:0)
# Uncomment this line to define a global platform for your project
platform :ios, '9.0'
target 'demoAlamofire' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for demoAlamofire
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire'
target 'demoAlamofireTests' do
inherit! :search_paths
# Pods for testing
end
target 'demoAlamofireUITests' do
inherit! :search_paths
# Pods for testing
end
end
我希望这会对你有所帮助。