background_locator_fixed
background_locator_fixed copied to clipboard
[ios] Call back is not working in release mode
The application is working as expected in debug mode no issues are found.
But when the ios app is running on release mode, The callback is not calling from the native side. Even the example app is not working in release mode.
also facing same issue on android.
[ERROR:flutter/shell/common/shell.cc(93)] Dart Error: Dart_LookupLibrary: library 'package:my_test_app/location_callback_handler.dart' not found.
also facing same issue on android.
[ERROR:flutter/shell/common/shell.cc(93)] Dart Error: Dart_LookupLibrary: library 'package:my_test_app/location_callback_handler.dart' not found.
In Android, does same.
Also facing same issue.
I'm forced to downgrade the Flutter version to 3.0.x to make it work. This is a temporary solution now but I am looking for a permanent solution. If someone finds a solution, please share it quickly. Thank you
Hi, I don't know how to make this is working So I made my own plug-in currently only in iOS available, also still in development mode But working fine for iOS
https://github.com/Faisalkc4u/bg_location_fetch
I think we need to do like this: https://github.com/firebase/flutterfire/issues/9446#issuecomment-1240554285 but i am not sure where to add this annotation. anyone have idea ?
this makes me crazy ...T_T I developed all the function with this plugin and now I can't release it
having same issue callback_handler not found
another solution:
on your method that starts background_locater (the one that starts the Isolate), please add this annotation
@pragma('vm:entry-point')
any updates on releasing a fix for this issue?
Please we need an update for this issue :)
another solution: on your method that starts background_locater (the one that starts the Isolate), please add this annotation
@pragma('vm:entry-point')
is that in the function when i call BackgroundLocator.registerLocationUpdate() ?
~~Just tested adding @pragma('vm:entry-point')
on Flutter 3.3.7 it
did not seem to make a difference, same error of:
VERBOSE-2:shell.cc(93)] Dart Error: Dart_LookupLibrary: library 'package:hero/helpers/background-location.dart' not found.
~~
I think I am adding the @pragma('vm:entry-point')
at the wrong place...
For anyone who also runs into this issue (Please note that @pragma('vm:entry-point')
works as expected):
I used my own custom callback function, meaning that @pragma('vm:entry-point')
obviously needs to be added above that function, and not above the LocationCallbackHandler
's callback function as provided by the example.
For clarification
await BackgroundLocator.registerLocationUpdate(
LocationCallbackHandler.callback,
initCallback: YOUR_CALLBACK_FUNCTION
...
...
...
WhereverYOUR_CALLBACK_FUNCTION
is defined, it should have @pragma('vm:entry-point')
above it
This has been fixed in the new version 2.0.6