Framework not found GoogleMaps sdk in iOS

2020-02-03 10:24发布

I want to use google map to existing(not a new one) iPhone project.Now i am using Google map ios sdk and i successfully added google map framework to my project.But i got error like this

ld: framework not found GoogleMaps
clang: error: linker command failed with exit code 1 (use -v to see invocation)

How to solve this issue.I am using xcode4.5 and google map iOS sdk version is 1.5. When i am creating new project with google map iOS sdk then no error getting for me.Error only for existing iOS Project.Please help me.

12条回答
别忘想泡老子
2楼-- · 2020-02-03 11:07

my problem was fixed by adding in:

build settings

Framework Search Paths

clickable and add the following lines:

"${PODS_ROOT}/GoogleMaps/Base/Frameworks"

"${PODS_ROOT}/GoogleMaps/Maps/Frameworks"

查看更多
smile是对你的礼貌
3楼-- · 2020-02-03 11:08

I solved my issue

You need to do this

  1. Click on your project (targets)
  2. Click on Build Settings
  3. Under Framework search paths (set your framework path)

Following information for getting framework search paths

  1. Right click on your framework folder (for ex: GoogleMaps.framework)
  2. select Get info
  3. copy the path from General->where and paste this path in your framework search path (path should contain in single line)

Good luck

查看更多
够拽才男人
4楼-- · 2020-02-03 11:08

Follow the steps :

  • Download GoogleMaps-iOS-1.1.0.zip from their site
  • Unzip the file. You now have a GoogleMaps-iOS-1.1.0 folder
  • In that folder you have a GoogleMaps.framework folder.
  • Copy or move the GoogleMaps.framework folder to inside your project folder (in Finder).
  • Drag the GoogleMaps.framework folder onto your Frameworks group in Xcode.
  • In the options sheet, uncheck "Copy items into destination group's folder". Make sure your target is checked in "Add to targets". Click OK.
  • (Note that you can also do this the other way, by not copying it into your project folder and checking "Copy items into destination group's folder". Xcode will copy the folder itself.)

  • Import using #import "GoogleMaps/GoogleMaps.h". The angle bracket usually work too, but in this case it should use quotes.

From : <GoogleMaps/GoogleMaps.h> file not found Google Maps SDK for iOS

查看更多
兄弟一词,经得起流年.
5楼-- · 2020-02-03 11:08

I've been struggling with this issue for hours; I'm using CocoaPods, Swift and Xcode 6.1.1. I followed all the steps for including GoogleMaps in my project carefully, tried many different things like removing symbolic links in the downloaded package or manually linking the binaries in build phases or trying #include "GoogleMaps.h", #include "GoogleMaps/GoogleMaps.h" and "#include <GoogleMaps/GoogleMaps.h> in my bridge file, none of that worked... Finally used CocoaPods instead of including the framework myself and it worked! Hope it helps someone out there:

In the Podfile:

pod 'Google-Maps-iOS-SDK', '~> 1.9.2'

And in your Bridge file:

#import "GoogleMaps.h"

查看更多
We Are One
6楼-- · 2020-02-03 11:11

Maybe it'll be useful for anybody, next steps helped me: 1. Delete "Headers" and "GoogleMaps" folders manually (from the Finder). 2. Run 'pod install' 3. Re-build the project in Xcode.

查看更多
霸刀☆藐视天下
7楼-- · 2020-02-03 11:13

In my case, I forgot that I need to open the workspace file with pods, not the project.

查看更多
登录 后发表回答