我正在尝试使用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:error:linker命令因出口代码1失败(使用-V查看调用)
谢谢!
首先,我使用此链接从您的项目中取消cocoapods从您的项目中取消cocoapods并从您的项目中删除Cocoapods之后使用pod init
我再次创建Pod File,这是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
中的所有配置,您的项目最终有效!
这是repo github repo