无法整合 Google 个地方 API

Can't Integrate Google Places API

我正在尝试使用 GooglePlaces iOS API;但是,每次我按照说明通过 CocoaPods 安装它时,我总是会收到链接器命令错误。我已经尝试了大约一百万次这些步骤,但在构建后总是会出现该错误。此外,我正在使用文档推荐的工作区文件,并且我相信我已正确执行所有步骤。有人可以帮我吗?

Xcode 版本:8.3.2 (8E2002)

Pod 文件内容:

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

Xcode 错误:

ld: 未找到 GoogleMapsBase 框架

clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)

谢谢!

首先,我使用此 link Deintegrating and Removing Cocoapods from your project 从您的项目中分离 Cocoapods 然后使用 pod init 我再次创建 pod 文件这是 podfile 更新的内容

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

target 'MoodSwings' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for MoodSwings
  pod 'FBSDKCoreKit'
  pod 'FBSDKLoginKit'
  pod 'GooglePlaces'
  pod 'GooglePlacePicker'
  pod 'GoogleMaps'

  target 'MoodSwingsTests' do
    inherit! :search_paths
  end

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

end

之后,我删除了 Build Setting -> Framework Search Path 中的所有配置,您的项目终于成功了!

这是回购 Github repo