ionic-team / ionic-native-google-maps

Google maps plugin for Ionic Native
Other
221 stars 125 forks source link

Ionic Googlemaps API key for IOS not registered issue #208

Closed schagani closed 5 years ago

schagani commented 5 years ago

I'm submitting a ... (check one with "x")

If you choose 'problem or bug report', please select OS: (check one with "x")

cordova information: (run $> cordova plugin list)

insert the output from the command here
cordova-open-native-settings 1.5.2 "Native settings"
cordova-plugin-camera 4.0.3 "Camera"
cordova-plugin-crosswalk-webview 2.4.0 "Crosswalk WebView Engine"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-geolocation 4.0.1 "Geolocation"
cordova-plugin-googlemaps 2.6.2 "cordova-plugin-googlemaps"
cordova-plugin-inappbrowser 3.0.0 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 4.0.1 "cordova-plugin-ionic-webview"
cordova-plugin-keyboard 1.2.0 "Keyboard"
cordova-plugin-network-information 2.0.1 "Network Information"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-sqlite-storage 3.2.1-dev "Cordova sqlite storage plugin - cordova-sqlite-storage plugin version"
ionic-plugin-keyboard 2.2.1 "Keyboard"

If you use @ionic-native/google-maps, please tell the package.json (only @ionic-native/core and @ionic-native/google-maps are fine mostly)

Current behavior: I am trying to install the plugin and it shows that the plugin has been installed. However, I am unable to see the entry of the plugin in config.xml After running it on IOS, it shows me error saying "The variable GOOGLE-MAPS_IOS_API_KEY is not registered"

Expected behavior: The native google maps should work and to be shown in the screen.

Screen Shot 2019-04-26 at 11 43 04 am
wf9a5m75 commented 5 years ago

https://github.com/mapsplugin/cordova-plugin-googlemaps/blob/master/README.md#api-key-android-and-ios-platforms

wf9a5m75 commented 5 years ago

I think you forgot to execute ionic cordova prepare

Corovino commented 5 years ago

i have a similar few issues

  1. when i try to install cocoapods to use native google maps y get this error :

Screen Shot 2019-04-26 at 4 26 53 PM

  1. and other times . y get de api key error Screen Shot 2019-04-24 at 3 21 47 PM

Now I'm stuck jumping between pods error and api key error,I do not know what to do. Some suggestion thanks

wf9a5m75 commented 5 years ago

Pod error is not similar error at all. The reason of pod error might be that you don't install cocoapod. Try to install/upgrade the latest cocoapod, and also upgrade cordova and ionic cli, then ionic cordova platform remove ios and ionic cordova platform add ios.

wf9a5m75 commented 5 years ago

After trying, even you can't solve the problem, please share your project files on github repository. I will inspect it.

schagani commented 5 years ago

Hi follow following steps to run google maps plugin on my ionic project. The google maps IOS api key error is due to recent changes by plugin. From now on you have to mention api key using preferences tag in config file. Also the key names have been changed. Please refer below link https://github.com/mapsplugin/cordova-plugin-googlemaps/blob/master/README.md#api-key-android-and-ios-platforms

Further more I also updates the Cocoapod using below command gem install cocoapod

After that I build my iOS platform and then inside that buIld iOS project folder I used below command pod update

Regards

wf9a5m75 commented 5 years ago

@schagani Did you solve your problem?

Corovino commented 5 years ago

i have cocoapods installed, but xcode no can't link the pods-debug.xconfig. im stuck and running crazy

schagani commented 5 years ago

@schagani Did you solve your problem?

yes thanks :)

Corovino commented 5 years ago

@schagani how do u solved u bug, u can give me a hand i´m stuck

wf9a5m75 commented 5 years ago

As I said above, After trying, even you can't solve the problem, please share your project files on github repository. I will inspect it..

wf9a5m75 commented 5 years ago

Please include the all files from top, not platforms/ios only.

Corovino commented 5 years ago

sorry, i don´t get it, i include all files and only work whit ios platform

wf9a5m75 commented 5 years ago

Ok, the file structure is storage at least. Please give me the writing access permission to modify your code. I will commit the files to different branch.

Corovino commented 5 years ago

@wf9a5m75 ok check now, i invite u to collaborate

wf9a5m75 commented 5 years ago

I fixed your project, but because you remove me from collaborate, I don't push them.

Corovino commented 5 years ago

@wf9a5m75 what was the problem, until now i couldn't fix that

wf9a5m75 commented 5 years ago

File structure is wrong.

Corovino commented 5 years ago

which file ?

wf9a5m75 commented 5 years ago

First of all, putting Pods at the top is wrong, and also putting contents.xcworkspacedata file at the top is wrong.

wf9a5m75 commented 5 years ago

I'm not your friend or teacher, I don't want to spend my time to teach what's wrong one by one. If you re-add access permission, I can push it, otherwise, I will throw away the files and please try to fix by yourself.

At least this is not this plugin's problem.

gopinathnelluri commented 5 years ago

Add below preferences tags under widget tag in your context.xml and update your api key here with your google maps api key.

<widget ...>
  <preference name="GOOGLE_MAPS_ANDROID_API_KEY" value="***your api key here***" />
  <preference name="GOOGLE_MAPS_IOS_API_KEY" value="***your api key here***" />
</widget>
Screen Shot 2019-06-28 at 2 47 40 PM