27

I am trying to install the Google maps SDK and I am running through this error when running:

Undefined symbols for architecture x86_64:
  "_CBAdvertisementDataManufacturerDataKey", referenced from:
      -[GMSx_PEBeaconScanner centralManager:didDiscoverPeripheral:advertisementData:RSSI:] in GoogleMaps(PEBeaconScanner.o)
  "_CBAdvertisementDataServiceDataKey", referenced from:
      -[GMSx_PEBeaconScanner centralManager:didDiscoverPeripheral:advertisementData:RSSI:] in GoogleMaps(PEBeaconScanner.o)
  "_CBCentralManagerScanOptionAllowDuplicatesKey", referenced from:
      -[GMSx_PEBeaconScanner scanIfAppropriate] in GoogleMaps(PEBeaconScanner.o)
  "_OBJC_CLASS_$_CBCentralManager", referenced from:
      objc-class-ref in GoogleMaps(PEBeaconScanner.o)
  "_OBJC_CLASS_$_CBUUID", referenced from:
      objc-class-ref in GoogleMaps(PEBeacon.o)
      objc-class-ref in GoogleMaps(PEBeaconScanner.o)
  "_vImageBoxConvolve_Planar8", referenced from:
      (anonymous namespace)::CreateBlurredImage(CGImage*, double, double) in GoogleMaps(GLWaterGroup.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
rmaddy
  • 314,917
  • 42
  • 532
  • 579
STo
  • 267
  • 1
  • 3
  • 4

8 Answers8

46

I noticed the following changes when I upgraded an app that was using the older Google maps SDK that had been installed manually:

  • Need to link to CoreBluetooth.framework and Accelerate.framework in Build Phases -> Link Bundle with Libraries.
  • The -all_load flag under "Other Linker Flags" will cause "duplicate symbol" errors. (Use -ObjC instead.)

If you use the CocoaPods method of installation (per their current instructions), it should take of the required frameworks but it'll still get messed up by -all_load.

colink
  • 591
  • 3
  • 5
11

make sure following are included

GoogleMaps SDK framework and bundle

GoogleMaps (with .framework extension) is present at your root directory (where your .xcodeproj is)

GoogleMaps (with .bundle extension) is referenced in your xcode project

Following Frameworks

Accelerate.framework

AVFoundation.framework

CoreBluetooth.framework

CoreData.framework

CoreGraphics.framework

CoreLocation.framework

CoreText.framework

GLKit.framework

ImageIO.framework

libc++.dylib

libicucore.dylib

libz.dylib

OpenGLES.framework

QuartzCore.framework

Security.framework

SystemConfiguration.framework

Build Settings

Architecture value in your project settings includes armv7.

Other Linker Flags has -ObjC , if not present add it

Waseem Lateef
  • 151
  • 1
  • 6
  • what if I can't use the -ObjC flag? I need it for google maps but it causes conflicts with parse framework. any help? Using -force_load causes symbol duplicates... – SKYnine Nov 11 '15 at 19:43
  • This answer fixed my issue with https://github.com/mapsplugin/cordova-plugin-googlemaps cordova plugin which uses google maps IOS sdk 2.0.1 (at the time of writing). – Norman Breau Oct 18 '16 at 20:21
9
**_vImageBoxConvolve_Planar8, referenced from: (anonymous namespace)::CreateBlurredImage(CGImage*, double, double) in GoogleMaps(GLWaterGroup.o)**

This required "Accelerate.framework". So, please add it.

Steps:
1)Build Phases -> Link Bundle with Libraries.
2)Click "+",
3)Select "Accelerate.framework". Finish.

===================================

Others errors required "CoreBluetooth.framework. So, please add it also in similar way.
ArunDhwaj IIITH
  • 3,833
  • 1
  • 24
  • 14
5

It looks like Google's API needs CoreBluetooth for Beacon location. Link against CoreBluetooth.framework in your build phases and everything should be fine.

enter image description here

EDIT: Make sure to install GoogleMaps through those instructions to avoid any issue: https://developers.google.com/maps/documentation/ios/start

Quentin Hayot
  • 7,786
  • 6
  • 45
  • 62
  • 2
    Thank you Quentin. I just did that and unfortunately it sent another error: Undefined symbols for architecture x86_64: "_vImageBoxConvolve_Planar8", referenced from: (anonymous namespace)::CreateBlurredImage(CGImage*, double, double) in GoogleMaps(GLWaterGroup.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) – STo Jun 08 '15 at 15:24
  • You should follow those instructions to make sure that everything you need is installed: https://developers.google.com/maps/documentation/ios/start – Quentin Hayot Jun 08 '15 at 15:29
  • 1
    Yeah those instructions suck IMO, nowhere does it mention CoreBluetooth there. – funkybro Jun 09 '15 at 18:53
  • 3
    So it looks like _vImageBoxConvolve_Planar8 is available in Accelerate.framework. I added that to my project, and the problem went away, now it complains GoogleMaps.framework defines 706 duplicate symbols :( – funkybro Jun 09 '15 at 18:58
  • That's why you should undo everything and install it through Cocoapods. It will take care of every dependencies. – Quentin Hayot Jun 10 '15 at 07:15
  • I added `CoreBluetooth` & `Accelerate` and everything worked fine (I'm using Pods too). – Tspoon Oct 20 '15 at 11:17
  • 1
    I have the same problem than funkybro, I now have 706 duplicates. can't use cocoa pods (cause it mess everything up, or -ObjC flag... – SKYnine Nov 11 '15 at 19:45
2

I am having same problem, in my case I am having 2 reference of GoogleMap.framework, I deleted old framework reference and problem get solved :)

  • Click on project
  • In Build Phases -> Link Binary With Libraries -> Check any duplicate reference is present for GoogleMaps.framework
  • If yes then delete one, which you not added.
Neha
  • 666
  • 1
  • 10
  • 17
2
**_vImageBoxConvolve_Planar8, referenced from: (anonymous namespace)::CreateBlurredImage(CGImage*, double, double) in GoogleMaps(GLWaterGroup.o)**

This required "Accelerate.framework". So, please add it.

Steps:
1)Build Phases -> Link Bundle with Libraries.
2)Click "+",
3)Select "Accelerate.framework". Finish.
ArunDhwaj IIITH
  • 3,833
  • 1
  • 24
  • 14
0

Removing -all_load flag from (Targets->Build Settings->Other linker flag) resolved my issue while using cocoa pods.

Ali
  • 525
  • 12
  • 24
0

If anyone is experiencing this today, Linking CoreLocation.framework binary in Build Settings did the trick for me

mmr118
  • 496
  • 4
  • 14