【问题标题】:why does xcode try to convert googlemap cocoapods frameworks?为什么 xcode 会尝试转换 googlemap cocoapods 框架?
【发布时间】:2017-02-23 23:55:48
【问题描述】:

我正在尝试使用 xcode 8 和谷歌地图 cocoapods 创建一个新项目。我读过他们的框架是 swift 3.0,但是每当我在项目上安装框架并打开 .xcworspace 文件时,xcode 会自动提示转换为 3.0 或 2.3。该项目是在swift 3.0中新建的项目。

我正在运行 cocoapods 1.0.1。再次感谢大家的回复。

podfile 的内容:

# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'

target 'googleMaps' do
  use_frameworks!

  pod 'GoogleMaps'
  pod 'GooglePlaces'

  target 'googleMapsTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'googleMapsUITests' do
    inherit! :search_paths
    # Pods for testing
  end

end

【问题讨论】:

  • 你能给我们看看你的 podfile 的内容吗?

标签: swift xcode google-maps cocoapods


【解决方案1】:

我认为您需要将 cocoapods 更新到预版本 1.1.0.rc.3

在终端上运行此命令

sudo gem install cocoapods --pre

然后创建一个新项目并为 GoogleMaps 安装 pod。我的工作正常,Xcode 从不要求转换为 2.3。

在终端上运行pod --version 将返回此

Rajan-Maheshwari354:~ rajan$ pod --version
1.1.0.rc.3

如果这不起作用,请尝试pod update

【讨论】:

  • 我这样做了,也更新了我的 repo:pod repo update。我认为两者的结合有所帮助。最后一个允许我更新到最新的 Alamofire,这也导致了一堆错误。
  • cocoapods 存储库是通过新安装更新还是必须一直手动完成?
  • 每次更新 cocoapods 时最好至少运行一次命令。我记得我没有更新 repo 部分,虽然工作正常。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2018-02-12
  • 2021-12-24
  • 1970-01-01
  • 2021-02-04
  • 1970-01-01
  • 1970-01-01
  • 2021-11-30
相关资源
最近更新 更多