libPods谷歌地图iOS,安装

时间:2017-12-07 23:22:35

标签: ios xcode google-maps frameworks cocoapods

我在Podfile中有这段代码

source 'https://github.com/CocoaPods/Specs.git'
target 'Kine' do
pod 'GoogleMaps'
pod 'GooglePlaces'
end

我想在终端中安装

cd /Users/-----
pod Install

我收到此错误

[!]在目标上自动分配版本11.0的平台ios,因为没有指定平台。请在Podfile中为此目标指定一个平台。请参阅https://guides.cocoapods.org/syntax/podfile.html#platform

在网站上我看到了iOS 10.6,但是当我在iOS 8.0或9.0或10中更改目标时,我在Xcode中没有iOS 10.6它再次无效并收到相同的错误

和libPods.a缺少(红色)

1 个答案:

答案 0 :(得分:0)

请按照以下步骤操作:

  1. 打开终端
  2. type
  3.   

    sudo gem install cocoapods

    1. 在项目根目录中创建Podfile
    2. 打开Podfile
    3. 类型
    4. platform :ios, '10.0'
      
      use_frameworks!
      
      target 'Kine' do
      
          pod 'GoogleMaps'
          pod 'GooglePlaces'
      end
      
      1. 打开终端转到:cd / Users / path / to / project / root
      2. 键入 pod安装,然后按Enter
      3. 使用Finder
      4. 转到您的项目根目录
      5. 打开文件Kine.xcworkspace
      6. 运行您的项目
相关问题