我正在尝试为我的macbook pro构建一个菜单栏应用程序,需要发出GET请求才能从API获取数据。但是,当我尝试导入Alamofire时,我得到了No such module 'Alamofire'
这是我的播客文件,
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
当我尝试只使用platform ios 9.0时,它仍然显示错误。
发布于 2017-02-08 00:13:21
试试这个。
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
endhttps://stackoverflow.com/questions/36868858
复制相似问题