首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Alamofire不能在podfile而不是ios中使用osx

Alamofire不能在podfile而不是ios中使用osx
EN

Stack Overflow用户
提问于 2016-04-26 23:08:08
回答 1查看 1.6K关注 0票数 1

我正在尝试为我的macbook pro构建一个菜单栏应用程序,需要发出GET请求才能从API获取数据。但是,当我尝试导入Alamofire时,我得到了No such module 'Alamofire'

这是我的播客文件,

代码语言:javascript
复制
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时,它仍然显示错误。

EN

回答 1

Stack Overflow用户

发布于 2017-02-08 00:13:21

试试这个。

代码语言:javascript
复制
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
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36868858

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档