I am using Xcode 7.1 and the deployment target is iOS 9.1. The app is \"AreaCalculator\" and it was written in Swift. I did following to set up the framework and import the map:
Add this line in AppDelegate.m
#import "GoogleMaps/GoogleMaps.h"
For react native make sure you are importing from above to #if DEBUG mode.
Put librarries above #if DEBUG
#import "AppDelegate.h"
#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import "RNSplashScreen.h" // here
#import <GoogleMaps/GoogleMaps.h>
#if DEBUG
#import <FlipperKit/FlipperClient.h>
#import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h>
#import <FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.h>
#import <FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h>
#import <SKIOSNetworkPlugin/SKIOSNetworkAdapter.h>
#import <FlipperKitReactPlugin/FlipperKitReactPlugin.h>```
Found here -> https://github.com/react-native-community/react-native-maps/issues/3453#issuecomment-665475820
I have solved the problem by "import GoogleMaps" in the AppDelegate.swift.
....
#add this line
import GoogleMaps
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GMSServices.provideAPIKey("YOUR-API-KEY")
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}