-
Notifications
You must be signed in to change notification settings - Fork 33
Closed
Labels
priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
In testing with the example app on an iOS simulator with a custom location, I am unable to consistently get the app to initialize its user location. Using this with one of the default locations in Simulator is working as intended, however.
I think I have a fix for this as well, but I'm curious if others are able to recreate this issue.
Environment details
- Flutter version 3.24.3, stable channel
- macOS 14.6.1 23G93 darwin-arm64, locale en-US
- google_navigation_flutter: ^0.3.0
Steps to reproduce
- Add a
.env/development.env
file withMAPS_API_KEY=[[YOUR_API_KEY]]
Default Location (Working)
- On Apple Simulator, go to Features -> Location -> Apple
- Run example app using
--dart-define-from-file .env/development.env
- This works as intended, showing the correct location (in this case, Apple's headquarters).

Custom Location -- FAILING
- On Apple Simulator, go to Features -> Location -> Custom Location and input latitude -33.852, longitude 151.211 (using this example).
- Run example app using
--dart-define-from-file .env/development.env
- The app will attempt to load user location, but fails and defaults to MIT.
- You cannot add any waypoints or start navigation.


Custom Location -- FIX
- Add the following lines to your Info.plist file
info.plist
...
<key>NSAppTransportSecurity</key> <dict>
<key>NSAllowsArbitraryLoads</key><true/> </dict>
...
- Run the app with the same settings as Failing Test.
- The app will now load Sydney as originally intended.

Metadata
Metadata
Assignees
Labels
priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.