# Urgent need help! I can not load Google Maps on iOS version. #5010
Replies: 1 comment
-
@Angrybird1201 please open a ticket for this not a discussion, discussions are not for bug reporting |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am facing an issue in setting up react-native-maps on iOS simulator.
On Android version, the maps works well and I am getting the Geocode with this function.
const getLatLong = async () => { const address = job.street + ', '+ job.city + ', '+ job.state + ' ' + job.zipcode + ', '+ 'USA'; console.log("Address:", address) try { const encodedAddress = encodeURIComponent(address); const response = await axios.get(
https://nominatim.openstreetmap.org/search?q=${encodedAddress}&format=json&limit=1`);I have tried to set maps on iOS version, but have some issue.
If I add GoogleAPI key in AppDelegate.mm file, I can not run my project on iOS simulator with these message on terminal.
➜ Implicit dependency on target 'fmt' in project 'Pods' via options '-framework fmt' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'RCT-Folly' in project 'Pods' via options '-framework folly' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'glog' in project 'Pods' via options '-framework glog' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'React-jsi' in project 'Pods' via options '-framework jsi' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'React-jsinspector' in project 'Pods' via options '-framework jsinspector' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'React-jsiexecutor' in project 'Pods' via options '-framework jsireact' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'libevent' in project 'Pods' via options '-framework libevent' in build sett
This is my AppDelegate.mm file
`#import "AppDelegate.h"
#import <React/RCTBundleURLProvider.h>
#import <GoogleMaps/GoogleMaps.h>
@implementation AppDelegate
(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.moduleName = @"GutterCleaning";
[GMSServices provideAPIKey:@"my API key"]
// You can add your custom initial props in the dictionary below.
// They will be passed down to the ViewController used by React Native.
self.initialProps = @{};
return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
(NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
#else
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
}
@EnD
`
If I remove
[GMSServices provideAPIKey:@"my API key"]
, my app runs.But can not load maps as you can see.
Please let me know why I can not load the maps on iOS version.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions