-
-
Notifications
You must be signed in to change notification settings - Fork 76
iOS getCurrentLocation returns nothing after a few seconds #176
Comments
@DimitarTodorov curious what could be causing this...I haven't experienced it but using it in the background may cause a problem? |
@jlooper that is my impression. I am running the app now. When I open the app again from the background, you can see the So the console now looks like:
|
Do you have the If possible, provide a sample app (https://play.nativescript.org/ works great for this) so we can review the code. |
@lini the playground doesn't allow me to add typescript files, which is what the background delegate is coded in. Instead, I created a basic project and uploaded it as its own repo: https://github.com/RaisinBread42/nativescript-vue-background-geolocation, the instructions for running is in the README.md |
@RaisinBread42 |
Hi Any solution? the location service in iOS doesn't run. |
Any progress with this issue @zbranzov ? |
A few years ago I started developing a gps tracker in Cordova. A huge problem was geolocation updates in the background behaving unpredictable. Unfortunately it seems this is still an issue in 2019. I will monitor this issue and hope that a solution will be found (y) |
@zbranzov hi, so I have enabled iosAllowsBackgroundLocationUpdates this property, but seems didn't detect locations in background. can you please help? |
Please, provide the following version numbers that your issue occurs with:
What I am trying to do is to send geolocation information via https to a server. This info will be sent when the app is pushed in the background. I've followed the sample app https://github.com/NativeScript/sample-ios-background-execution for implementing a background delegate.
However, after running the command
tns run ios --bundle --emulator
, and press the home button to push the app into the background, the getCurrentLocation function returns nothing after a few seconds.Here's an example of my console:
I don't know what could be causing this? Could it be due to the geolocation module calling a native API, which is returning nothing?
Update
I included a check to see if the app has permission (Ie
geolocation.isEnabled()
), and it always returns true, I then callgetCurrentLocation
. Same result.The text was updated successfully, but these errors were encountered: