-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Navigation: Channel communication fails on iOS when integrating Turn-by-Turn navigation into a larger app #211
Comments
Hi @yehuda-noiman, To help us reproduce it, could you provide more details about the app context that’s causing the problem? If possible, sharing a partial implementation of your application that demonstrates the issue would be very helpful. You can add a breakpoint at this line and verify that |
hi we are using many plugins and packages (ill send here the pubspec) our pubspec.yaml
it might be something to do with pigeon... |
and as per where you told me to put a break point i already checked and it only fails at the messages.g.dart when using the channel to send the message to the dart side, meaning the issue is not there. |
This issue is indeed unusual, and I have not been able to reproduce it so far. I noticed that you are using the following package:
As both In your original issue you were using version I would like to see if communication works without I tried to reproduce the issue without luck yet. The messaging channel is initialized when
Internally, this method is triggered during navigation session initialization through initializeNavigationSession (which you should call on navigation initialization).
Could you make sure that this Turn-by-Turn events (NavEvents) can be listened only with after navigation session initialized, so for this reason the messaging channel should have been initialized when navInfo events are listened and processed. Reason why message channel is not properly initialized is still open. As a workaround it is possible to (re)initialize the api without calling if (Platform.isIOS) {
(GoogleMapsNavigationPlatform.instance as GoogleMapsNavigationIOS)
.ensureSessionAPISetUp();
} |
HI, about iOS issue - Flutter version 3.24.3, stable channel from messages.g.swift func onNavInfo(navInfo navInfoArg: NavInfoDto, |
Environment details
OS type and version: iOS iOS 16.7.10 but reproduced at any IOS we tried
Library version and other environment information:
Flutter version: 3.22.1 • channel stable
google_navigation_flutter version: 0.3.0
Device model: (IPhone 8 plus, iPhone 12 Pro Max, more IOS devices)
Steps to reproduce
Integrate the google_navigation_flutter plugin into a large existing Flutter app.
Implement the Turn-by-Turn navigation feature using code from the example app.
Run the app on an iOS device or simulator.
Attempt to start Turn-by-Turn navigation.
Observe that the app fails due to channel communication issues.
Expected behavior
The Turn-by-Turn navigation should start and function as expected, just like it does in the example app provided by the google_navigation_flutter plugin.
Actual behavior
When attempting to start Turn-by-Turn navigation in the larger app, the app fails on channel communication. Specifically, the response in the onNavInfo function is nil, leading to a failure in the completion handler.
from messages.g.swift
/// Turn-by-Turn navigation events.
Note: The comment // The code goes here and the response is nil indicates where the response is unexpectedly nil.
Note2: The simulator works it's just that we don't get any events on the dart side
Additional Information:
The Turn-by-Turn navigation works as expected when using the example app provided by the plugin.
The issue only occurs when integrating the same code into a larger app.
There might be a discrepancy in how the message channels are set up or how the binary messenger communicates in a larger app context.
Please let me know if you'd like to add anything else or need further assistance!
The text was updated successfully, but these errors were encountered: