我正在尝试为我的macbook pro构建菜单栏应用程序,并且需要发出GET请求以从API获取数据。但是,当我尝试导入Alamofire时,我得到了
No such module 'Alamofire'
这是我的podfile,
source 'https://github.com/CocoaPods/Specs.git'
platform :osx, '10.9'
use_frameworks!
target 'WakaMenu' do
pod 'Alamofire', '~> 3.3'
pod 'AlamofireObjectMapper', '~> 3.0'
end
target 'WakaMenuTests' do
end
我正在运行Xcode 7.3,我的项目基础SDK和部署目标是10.11
当我尝试使用平台ios 9.0时,它仍然会显示错误。
答案 0 :(得分:1)
试试这个......
source 'https://github.com/CocoaPods/Specs.git'
platform :osx, '10.12'
use_frameworks!
target 'targetname' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :tag => ‘4.3.0’
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'
end
end
end