-
Notifications
You must be signed in to change notification settings - Fork 276
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
Background Geolocation does not work under iOS #444
Comments
This is not the Mauron85 version. Mauron85 is a fork from over 3 years ago of my original open source project. |
So I need now to install the latest using |
iOS is free. Android requires purchase.
You can try Android free in DEBUG builds.
On Tue, Aug 22, 2017 at 1:51 PM Hamza L ***@***.***> wrote:
So I need now to install the latest using cordova plugin add
cordova-background-geolocation-lt ? Even purchase the license to make it
work ?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#444 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAA6l68VgU5QSPsq7vnJZpgzyQt6ALf8ks5saxU6gaJpZM4O-6nf>
.
--
Snet form Gmail Mobile
|
As you can see, responses to issues is quite rapid here. You'll be lucky to get any response at all from Mauron85. |
I see you re-posted your issue over at Mauron85. You'll get no help there. You're on your own. "You get what you pay for" |
Well, I can't afford paying 300$ as I am currently a student and I'll be using the plugin for my capstone project |
If it just for a project and you're not actually submitting to play-store, you can run the Android version in DEBUG builds. iOS is free |
I know, but I am required to submit it to the playStore and let people use it and also collect their feedback about it. Not sure, if there exists a special discount for students |
I've installed the plugin in iOS after removing the mauron85 version and it didn't worked at all, here is the code :
When I go to the background even that blue bar does not show up, am I doing something wrong? |
Logs. |
When the app goes to the background I don't receive any logs, which means that possibly the plugin does not fire when being on the background |
Why would you use See |
I'll change it now to |
The blue bar isn't supposed to show. |
changed it to |
You'll get no logs without setting |
Where should I set it ? |
Did you read the docs for |
I've done the following:
|
Yes I did. |
Then the plugin is not installed.
|
cordova-background-geolocation-lt 2.8.2 "BackgroundGeolocation" |
As you can see, it's already installed... |
Seems that |
That would be your problem. |
Weird, I've placed the following |
I've done some changes to be like the following : It seems that it fired. Here is what I got : CDVPlugin class CDVBackgroundGeolocation (pluginName: BackgroundGeolocation) does not exist. |
I didn't found I'll re-install the plugin |
It's Cordova's responsibility to place those files into the XCode project. Sometimes it fails. You probably uninstalled Mauron85 version after installing mine. The two plugins have identically named ios files |
Now, it works fine only on foreground. I get this : ℹ️-[LocationDAO purge:] 1 When going to the background, I get the following and stop updating the location ℹ️-[LocationDAO purge:] 1 ╔═══════════════════════════════════════════════════════════ |
Background & Terminated are two completely different states. Are you terminating the app? |
Not at all, only going to the background (for example opening Google maps, etc...) |
Receiving the following : 🔴-[TSGeofenceManager stopMonitoringGeofences] Also, I am getting a notification "Stopped on terminate" |
Your app is being terminated, either by you or the OS. That's not the plugin's fault. If you don't want tracking to cease when user or OS terminates your app, configure |
I've solved it by accessing to the app settings and checked "Always" to enable background tracking even if the app is in the background. |
You do not need to use Whichever plugin requests location first, that's the authorization request which will be show to the user. This plugin has its own
When an iOS app is in the background without locations-services on, your app is suspended. If you're hoping to do a
This plugin requires my |
Good then, I guess that I need to remove However, for the It says that :
As of my understanding, it'll fetch each 15minutes, but I am willing to execute my function each 10 seconds. It's either my understanding is wrong or it's not possible to execute the function in background each 10 seconds when working with iOS |
Yes, as I said above: "this plugin has its own getCurrentPosition method"
Your understanding is wrong. As I said above: "When an iOS app is in the background without locations-services on, your app is suspended. If you're hoping to do a setInterval with Javascript while your app is in the background and the device is stationary, that's not going to happen." |
Read the plugin's Philosophy of Operation |
Got it, basically. As of my understanding background fetch will happen only when the device is moving, getting a new user location and not in stationary. |
Background fetch has nothing to do with geolocation or whether the device
is moving.
Please read the docs.
|
I am using Ionic framework to develop my app, I've followed the documentation, everything works fine on Android; however on iOS it shows the blue bar that says that the app is tracking the current location on the background (only for the first 40 seconds), then that blue bar disappears and the app stop tracking the current location.
Your Environment
cordova -v
): 7.0.1cordova platform ls
): ios 4.4.0Expected Behavior
It should track the user current location in iOS even if the app goes to the background.
Actual Behavior
When going to the background, it shows the blue bar that says that the app is taking the current location on the background (only for the first 40 seconds), then that blue bar disappears and stop tracking the current location.
On the other hand, I have the same code working perfectly on Android devices, so I guess that there is an issue with the iOS.
Steps to Reproduce
Just follow the documentation on the following link : https://ionicframework.com/docs/native/background-geolocation/
Then run the app under iOS
Context
Track drivers location and update the database of the current driver location each 10 seconds.
The text was updated successfully, but these errors were encountered: