# Google maps doesn't work only on ios devices

**URL:** <https://forum.ionicframework.com/t/google-maps-doesnt-work-only-on-ios-devices/239305>\
**Category:** Capacitor\
**Created:** [January 25, 2024, 8:32am UTC](https://forum.ionicframework.com/t/google-maps-doesnt-work-only-on-ios-devices/239305 "2024-01-25T08:32:17Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![konstantina-b](https://avatars.discourse-cdn.com/v4/letter/k/ebca7d/32.png) [@konstantina-b](https://forum.ionicframework.com/u/konstantina-b)\
**Post date:** [January 25, 2024, 8:32am UTC](https://forum.ionicframework.com/t/google-maps-doesnt-work-only-on-ios-devices/239305/1 "2024-01-25T08:32:17Z")

</div>

Hello,  
I have an ionic angular project and I added google maps on it. When I run it on the web, the page of the map works correctly. I build it for android and also worked correctly. But when I build it for iOS the page with the map doesn’t work. So is there something i have to add on the info.plist? or anywhere else? because for android i added the api key and on AndroidManifest.xml to work.  
Until now i added on the info.plist the following code for the location:

NSLocationUsageDescription  
(Privacy - Allow current location to be used?)  
NSLocationWhenInUseUsageDescription  
(Privacy - Allow current location to be used?)

in the documentation only this is refer to google maps plugin…  
Do you have any idea why this is happening?

Also I forget to mention that I’m trying my ios app on a simulator on the xcode, not on a phisical device. Can this be the reson why it doesn’t work?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![EinfachHans](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/einfachhans/32/130917_2.png) [@EinfachHans](https://forum.ionicframework.com/u/EinfachHans)\
**Post date:** [January 25, 2024, 8:53am UTC](https://forum.ionicframework.com/t/google-maps-doesnt-work-only-on-ios-devices/239305/2 "2024-01-25T08:53:28Z")

</div>

What do you mean when you say “the page with the map doesn’t work”?

---

<div class="post-metadata">

**Author:** ![konstantina-b](https://avatars.discourse-cdn.com/v4/letter/k/ebca7d/32.png) [@konstantina-b](https://forum.ionicframework.com/u/konstantina-b)\
**Post date:** [January 25, 2024, 9:06am UTC](https://forum.ionicframework.com/t/google-maps-doesnt-work-only-on-ios-devices/239305/3 "2024-01-25T09:06:05Z")

</div>

Thank you for your reply, i mean that when I navigate to my page called “stores” I have a button that opens a new page with the map of this store.

Here you can see my app on broeser that show the map correctly:

 ![image](https://global.discourse-cdn.com/ionicframework/original/3X/7/b/7b1b7a21d13a484ec4e30926c204823f5e330f1d.jpeg)

And here is the iOS app that doesn’t show the map:

 ![image](https://global.discourse-cdn.com/ionicframework/original/3X/a/9/a9b3a3efe3b148f31ca89fba0d56ec547174947c.png)

I have no errors in my code so I don’t know why this is happening…

---

<div class="post-metadata">

**Author:** ![EinfachHans](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/einfachhans/32/130917_2.png) [@EinfachHans](https://forum.ionicframework.com/u/EinfachHans)\
**Post date:** [January 25, 2024, 9:08am UTC](https://forum.ionicframework.com/t/google-maps-doesnt-work-only-on-ios-devices/239305/4 "2024-01-25T09:08:13Z")

</div>

1. Any informative logs in the console?
2. Do you have a silicon mac?

---

<div class="post-metadata">

**Author:** ![konstantina-b](https://avatars.discourse-cdn.com/v4/letter/k/ebca7d/32.png) [@konstantina-b](https://forum.ionicframework.com/u/konstantina-b)\
**Post date:** [January 25, 2024, 9:21am UTC](https://forum.ionicframework.com/t/google-maps-doesnt-work-only-on-ios-devices/239305/5 "2024-01-25T09:21:17Z")

</div>

1. I have this information in the console, but as i said in android it worked despite those error and warnings…  

2. I don’t know what thsi exaclty means. I have rent an online mac mini M2 -2023 just to build my app for ios.

---

<div class="post-metadata">

**Author:** ![EinfachHans](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/einfachhans/32/130917_2.png) [@EinfachHans](https://forum.ionicframework.com/u/EinfachHans)\
**Post date:** [January 25, 2024, 9:28am UTC](https://forum.ionicframework.com/t/google-maps-doesnt-work-only-on-ios-devices/239305/6 "2024-01-25T09:28:20Z")

</div>

Are you using Cordova or Capacitor?

---

<div class="post-metadata">

**Author:** ![konstantina-b](https://avatars.discourse-cdn.com/v4/letter/k/ebca7d/32.png) [@konstantina-b](https://forum.ionicframework.com/u/konstantina-b)\
**Post date:** [January 25, 2024, 9:36am UTC](https://forum.ionicframework.com/t/google-maps-doesnt-work-only-on-ios-devices/239305/7 "2024-01-25T09:36:48Z")

</div>

I’m using capacitor. Actually, I’m trying to update an old app that used cordova. But I thought that capacitor is better and i wanted to cahnge to capacitor.

---

<div class="post-metadata">

**Author:** ![EinfachHans](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/einfachhans/32/130917_2.png) [@EinfachHans](https://forum.ionicframework.com/u/EinfachHans)\
**Post date:** [January 25, 2024, 9:49am UTC](https://forum.ionicframework.com/t/google-maps-doesnt-work-only-on-ios-devices/239305/8 "2024-01-25T09:49:11Z")

</div>

Good decision. I’m asking because of the Cordova related logs in the console.

So, when you have a mac mini from 2023, it’s most likely a silicon one. The google maps docs says the following:

> The main Google Maps SDK now supports running on simulators on Apple Silicon Macs, but make sure you have the latest version of [Google-Maps-iOS-Utils](https://github.com/googlemaps/google-maps-ios-utils) installed.

See [here](https://capacitorjs.com/docs/apis/google-maps#ios) - Maybe you need to install that?

---

<div class="post-metadata">

**Author:** ![konstantina-b](https://avatars.discourse-cdn.com/v4/letter/k/ebca7d/32.png) [@konstantina-b](https://forum.ionicframework.com/u/konstantina-b)\
**Post date:** [January 25, 2024, 1:46pm UTC](https://forum.ionicframework.com/t/google-maps-doesnt-work-only-on-ios-devices/239305/9 "2024-01-25T13:46:32Z")

</div>

I’ve tried some solutions I found and now it works for one or two times and then again the same white screen…  
I tried:

1. Remove the fullscreen = true from my map.page.html

\<ion-content [fullscreen]=“true”\>  
\<capacitor-google-map #map\>

1. Updated the plugin  
npm update @capacitor/google-maps

3.I did the solution yopu provided to me in the previous comment.  
Actually i had to do these commands:

cd ios/App  
pod update Google-Maps-iOS-Utils

1. I tried and this [Ionic Google Maps not showing for iOS-Devices with Angular - Stack Overflow](https://stackoverflow.com/questions/72354396/ionic-google-maps-not-showing-for-ios-devices-with-angular)

But still I only see it to work one time or tow and then i have these output from the XCode:  
⚡ [log] - true  
⚡ To Native → Geolocation getCurrentPosition 127845221  
⚡ TO JS {“coords”:{“longitude”:-122.406417,“altitude”:0,“speed”:-1,“accuracy”:5,“latitude”:37.785834000000001,“altitudeAccuracy”:-1,“heading”:-1},“timestamp”:1706190273489}

⚡ To Native → CapacitorGoogleMaps create 127845222  
⚡ TO JS undefined  
2024-01-25 13:44:39.834 App[35814/0x206034240] [lvl=3] +[GMSx\_CCTClearcutUploader crashIfNecessary] Multiple instances of CCTClearcutUploader were instantiated. Multiple uploaders function correctly but have an adverse affect on battery performance due to lock contention.  
⚡ To Native → CapacitorGoogleMaps addMarker 127845223  
⚡ TO JS {“id”:“-3567961341877997120”}

container\_create\_or\_lookup\_app\_group\_path\_by\_app\_group\_identifier: client is not entitled  
container\_create\_or\_lookup\_app\_group\_path\_by\_app\_group\_identifier: client is not entitled

Also I upload my new code on testflight to test this with my iPad but it doesn;t work at all…

---

<div class="post-metadata">

**Author:** ![konstantina-b](https://avatars.discourse-cdn.com/v4/letter/k/ebca7d/32.png) [@konstantina-b](https://forum.ionicframework.com/u/konstantina-b)\
**Post date:** [January 26, 2024, 2:19pm UTC](https://forum.ionicframework.com/t/google-maps-doesnt-work-only-on-ios-devices/239305/10 "2024-01-26T14:19:10Z")

</div>

I solved my problem. I decided not to use the google-maps plugin because it doesn’t work on iOS as I saw to many open topics. Instead i used this script

`<script src="http://maps.google.com/maps/api/js?key=AIzaSyBNDwNF6Kp2oQ8ZDbJjBcDj7PBcqeIIFYs"></script>`

on my index.html and Ι adapted my code on map.page.ts  
And finally the map worked on iOS devices.

---

<div class="post-metadata">

**Author:** ![Hills90210](https://avatars.discourse-cdn.com/v4/letter/h/57b2e6/32.png) [@Hills90210](https://forum.ionicframework.com/u/Hills90210)\
**Post date:** [January 26, 2024, 3:18pm UTC](https://forum.ionicframework.com/t/google-maps-doesnt-work-only-on-ios-devices/239305/11 "2024-01-26T15:18:06Z")

</div>

There’s a better solution that is better and easier to use than capacitor google maps: [Official Angular Google Maps Component](https://github.com/angular/components/blob/a6e95f1cf1a63387e73a0253a7ed22f9d2f31248/src/google-maps/README.md). 🙂 Also supports ALL google maps methods.

---

<div class="post-metadata">

**Author:** ![tashiritzy](https://avatars.discourse-cdn.com/v4/letter/t/7ab992/32.png) [@tashiritzy](https://forum.ionicframework.com/u/tashiritzy)\
**Post date:** [December 30, 2024, 6:39am UTC](https://forum.ionicframework.com/t/google-maps-doesnt-work-only-on-ios-devices/239305/12 "2024-12-30T06:39:19Z")

</div>

I was struggling for days. Using a Mac M1 and Ionic React.  
The issue that map did not appear on IOS for me all along was the height and width of the capacitor-google-map element. It had to be 100% and on top of that i had a border which also contributes to the issue.
