0

I've built a React Native extension which uses the Google Maps iOS SDK (v1.10.4) to create a UI component. I have separated this into it's own static library project now so that I can update React Native freely without having to worry about my map view being affected.

The folder structure for this app now looks like this (I've loaded the Google Maps iOS SDK the old way as per this question GoogleMaps without CocoaPods):

Project Structure

The PPGoogleMaps project will compile when I hit run from within that project, but when I try to include in in my React Native app I get this error:

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

I've previously seen this when I forgot to include Accelerate.framework and CoreBluetooth.framework but since those frameworks are included I cannot see what's wrong.

The libPPGoogleMaps.a file is included in the Build Phases like so:

Build Phases

And the location of my package is included in the header search paths (and headers from the package can be included in the main React project where needed without problem).

Is there anything that I have missed out here or is there something fundamentally wrong with what I am trying to do?

Community
  • 1
  • 1
edcs
  • 3,847
  • 2
  • 33
  • 56

2 Answers2

2

You must to link GoogleMaps.framework and other related libraries and frameworks also.

arturdev
  • 10,884
  • 2
  • 39
  • 67
0

I agree with arturdev. The full list of frameworks I have in my React Native Google Map are as follows:

  • AVFoundation.framework
  • CoreData.framework
  • CoreLocation.framework
  • CoreText.framework
  • GLKit.framework
  • ImageIO.framework
  • OpenGLES.framework
  • QuartzCore.framework
  • SystemConfiguration.framework
  • Accelerate.framework
  • GoogleMaps.framework
  • libc++.tbd
  • libicucore.tbd
  • libz.tbd

From what I have seen, the only extra framework needed in a React Native project compared to a regular ios app is Accelerate.framework.

Jeff Diederiks
  • 1,315
  • 13
  • 20