-
Notifications
You must be signed in to change notification settings - Fork 94
Map not showing on iOS but on Android #16
Comments
Turns out, the issue is only on simulator. The map works fine on real device. Even on simulator, disabling "useCurrentLocation" would makes it work like mentioned in this comment fysoul17#43 (comment) |
I will later test on the Simulator with |
No problem! It's only a matter of time to find the solution ;) |
@gtu-myowin I tried to reproduce it using the example project. Please clone this repository and confirm the issue this way. All I did was running the example project in the iPhone 13 Pro Max Simulator. On launch you have to give permission for location services. Does it ask you for permissions? The linked comment fysoul17#43 (comment) was addressed and fixed by #8, it should not happen anymore. So does the map load just slow or does it not load after all? I suspect this to be rather a network issue, but I am not sure. It is really crucial that you clone this project and test the case on the example project to rule out any extern circumstances like other packages, etc. Thanks! |
@martin-braun Thank you for your fast replies. This is exactly why I chose your version of this package. Sorry for late reply because I didn't get new notifications for new replies. I have cloned and try to run it on simulator and emulator but I got following errors on both and the app won't run. |
@gtu-myowin You are very much welcome my friend. :) Regarding the issue: Have you done the preparation steps described in the README of the example project? Without it you will have missing files. You have to supply your own Google Maps API keys in the project by copying the Don't mind the "Android embedding v2" message, it should be a false message resulting in the fact that the |
Yes, I did add my own android & iOS key in keys.dart which was renamed from keys.dart.example. I do not mind the embedding error but the app won't run. I think it is because of version |
@gtu-myowin Did you also create the
I have trouble to get that, because things work on my end with No matter which version you launch (15 or 16), is the map loading in the iPhone Simulator, please? |
Sorry, I didn't realized that there were two more .example file there. Now I can run the app but
Yes, it did asked me for location permission and I have allowed while using the app. I have tried with and without 1.1.1.1 VPN as well. I got no log in both vscode and xcode. I am not sure what was wrong. It's ok! I can still use the version 15 and I think you should wait for another similar issue because this could be specific to my device or network. |
@gtu-myowin Thank you for testing. Can you share the output of the console? The Google Maps API might report some issues here we can learn about. Thanks in advance. |
As I mentioned I got no log in both vscode and xcode as well. Not even a warning message. |
@gtu-myowin When I debug from VSCode and tap on "Load Google Map" I get this in the Debug Console of VSCode:
By saying "no log" you mean there is no more output after |
By no log I mean, when loading the map. But since you are talking about full log, here is the xcode log
And here is the vscode log. The simulator looks like this on both vscode and xcode when loading the map |
@gtu-myowin Thanks. You see, this is why sharing logs is so important. And indeed, those Xcode logs are really what was necessary to track down the issue.
This is really the coffin here. The try {
permissionGranted = await location.requestPermission();
if (permissionGranted == LocationPlatformInterface.PermissionStatus.granted) {
currentPosition = await Geolocator.getCurrentPosition(
desiredAccuracy: desiredAccuracy ?? LocationAccuracy.best
); // crash, but no exception
} else {
currentPosition = null;
}
} catch (e) {
print(e);
currentPosition = null;
} I searched for the message to find out that the issue has been reported at Baseflow/flutter-geolocator#190 and I you can fix this issue by selecting a location in your Simulator: I just switched it to I contacted the author of |
Hi @martin-braun, thank you for your researches. I really appreciate it! I tried enabling custom location in Simualtor and yes, the loading indicator disappear but the map is still like in this https://github.com/martin-braun/google_maps_place_picker_mb/issues/16#issuecomment-1108123614. It's blank! I think you can just add it in read me section so that people would know it is because of the simulator. |
@gtu-myowin And I thank you for helping to investigate this issue, even when it has low priority. You say the example works on version Then you could slowly add the changes I made towards
I'm really baffled and despite this being lower priority, I would really be interested to understand why you have such issues.
Later, I will definitely update the README.md, especially since it breaks anywhere when no location is set in the Simulator. |
All I can do now, since my hands are tied and I cannot reproduce any further issues regarding this. After all this is a Simulator-only issue at best. Thank you. |
Describe the bug
The map picker isn't show on iOS. It only shows circular progress indicator. No error was shown in "Debug Console" either. It is working fine on Android and I see no issue so far.
To Reproduce
Screenshots
Simulator Screen Shot - iPhone 13 Pro Max - 2022-04-13 at 23 25 18
Flutter Doctor -v
[✓] Flutter (Channel stable, 2.10.4, on macOS 12.3.1 21E258 darwin-x64, locale en-US)
• Flutter version 2.10.4 at /Users/name/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision c860cba910 (3 weeks ago), 2022-03-25 00:23:12 -0500
• Engine revision 57d3bac3dd
• Dart version 2.16.2
• DevTools version 2.9.2
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/name/Library/Android/sdk
• Platform android-32, build-tools 31.0.0
• ANDROID_HOME = /Users/name/Library/Android/sdk
• ANDROID_SDK_ROOT = /Users/name/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.3.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.11.2
[✓] Android Studio (version 2021.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
[✓] VS Code (version 1.66.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.38.1
[✓] Connected device (1 available)
• iPhone 13 Pro Max (mobile) • A5BDFA37-0233-4A71-9EC8-EBE70276CE35 • ios • com.apple.CoreSimulator.SimRuntime.iOS-15-4 (simulator)
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
The text was updated successfully, but these errors were encountered: