iOS troubles, way to get background location data?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
iOS troubles, way to get background location data?
Posted here because I don't get replies in the iOS deployment board and this seems like a basic understanding of Livecode that I'm missing.
My app requires background updates from location services, but I cannot figure out how to do that. The app is suspended and killed after a few minutes if the standard info.plist is used, however I notice that within the info file you can add "Required background modes - App registers for location updates" and "Application does not run in the background". If I adjust either of these and resign by using codesign, the signature is not a problem but Xcode returns the error "App installation failed - The application could not be verified."
I've tried all the suggestions on stackoverflow without success, and I would like to ask here if anyone knows a way around this, or even a better way of going about getting background location data without running into these verification issues. It is really stumping me after days of searching around.
Sean
My app requires background updates from location services, but I cannot figure out how to do that. The app is suspended and killed after a few minutes if the standard info.plist is used, however I notice that within the info file you can add "Required background modes - App registers for location updates" and "Application does not run in the background". If I adjust either of these and resign by using codesign, the signature is not a problem but Xcode returns the error "App installation failed - The application could not be verified."
I've tried all the suggestions on stackoverflow without success, and I would like to ask here if anyone knows a way around this, or even a better way of going about getting background location data without running into these verification issues. It is really stumping me after days of searching around.
Sean
Re: iOS troubles, way to get background location data?
I would also like to know of this functionality. Have you had any responses regarding this ?
Could anyone here please assist in a way to keep receiving the gps co-ords whilst the iPad is in standby or the app is minimised ?
Thanks
Cheers
Kevvy
Could anyone here please assist in a way to keep receiving the gps co-ords whilst the iPad is in standby or the app is minimised ?
Thanks
Cheers
Kevvy
Re: iOS troubles, way to get background location data?
On Android too would be great, if anyone knows how
Re: iOS troubles, way to get background location data?
Hi All,
Currently we do not support the backgrounding of application on any of our mobile platforms and unfortunately cannot support any workarounds that are suggested. There are a few underlying technicalities holding back backgrounding support but we are aware that the backgrounding of applications is a huge want for our users so it is something we are actively looking into.
Kind Regards,
Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
-
Currently we do not support the backgrounding of application on any of our mobile platforms and unfortunately cannot support any workarounds that are suggested. There are a few underlying technicalities holding back backgrounding support but we are aware that the backgrounding of applications is a huge want for our users so it is something we are actively looking into.
Kind Regards,
Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
-
Re: iOS troubles, way to get background location data?
Neil, thanks for the reply.
If that is not possible, can you or someone else let me know if co-ordinate tracking is possible when a data connection is not present?
i.e. on iPad I'm using mobileStartTrackingSensor and mobileCurrentLocation, and location services will not be initiated until I activate wifi (and thus establish a data connection). As far as I understood these could still work without a data connection, but I don't see any reference to this in the documentation here: http://lessons.runrev.com/m/4069/l/3037 ... al-compass
If that is not possible, can you or someone else let me know if co-ordinate tracking is possible when a data connection is not present?
i.e. on iPad I'm using mobileStartTrackingSensor and mobileCurrentLocation, and location services will not be initiated until I activate wifi (and thus establish a data connection). As far as I understood these could still work without a data connection, but I don't see any reference to this in the documentation here: http://lessons.runrev.com/m/4069/l/3037 ... al-compass
Re: iOS troubles, way to get background location data?
Hi Scoperzor,
As far as I'm aware, Wifi only iPads do not have a GPS chip present and rely on Wifi connectivity for approximate location tracking. This could be why location services require a wifi connection on your iPad.
iPads with Cellular capabilities do have a GPS chip so this will be used for location tracking on these models.
Kind Regards,
Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
-
As far as I'm aware, Wifi only iPads do not have a GPS chip present and rely on Wifi connectivity for approximate location tracking. This could be why location services require a wifi connection on your iPad.
iPads with Cellular capabilities do have a GPS chip so this will be used for location tracking on these models.
Kind Regards,
Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
-
Re: iOS troubles, way to get background location data?
The iPad I'm testing on is a Wifi + 3G model, it just doesn't have a sim in it. It seems the problem does not occur every time - when I open the app and run the location tracking commands, about 10% of the time it will activate the location tracking (location icon appears at the top of the iPad). However most of the time it does not work. It is strange to me that it is temperamental.
Here is the initial code (part of it) to check the sensors etc:
I checked mobileCanTrackLocation, and it always returns true.
And here is the code getting the co-ordinates:
Here is the initial code (part of it) to check the sensors etc:
Code: Select all
if the environment is "mobile" then
mobileStartTrackingSensor "location",false
if mobileCanTrackLocation() is "false" then
put mobileCurrentLocation() into theiPadLocation
if theiPadLocation is empty then
And here is the code getting the co-ordinates:
Code: Select all
if the environment is "mobile" then
mobileStartTrackingSensor "location",false
put mobileCurrentLocation() into theiPadLocation
put theiPadLocation["latitude"] into iPadLat
put theiPadLocation["longitude"] into iPadLon
Re: iOS troubles, way to get background location data?
Update: I included the trackingError message and it has returned:
trackingError "location","The operation couldn't be completed. (kCLErrorDomain error 0.)"
Any help on this?
Update 2: The location tracking works when Wifi (and with no connection to any network with internet) is enabled, but not when Wifi disabled. There is no sim card in the device, could that have any effect on things?
trackingError "location","The operation couldn't be completed. (kCLErrorDomain error 0.)"
Any help on this?
Update 2: The location tracking works when Wifi (and with no connection to any network with internet) is enabled, but not when Wifi disabled. There is no sim card in the device, could that have any effect on things?
Re: iOS troubles, way to get background location data?
Hi Scoperzor,
This could be a bug as I don't believe this has been reported before-
Could you give the following lesson a go to see how you get on and see if location services is a bit more reliable for you-
http://lessons.runrev.com/m/4069/l/3037 ... al-compass
Another suggestion, from a quick internet search is to try the following-
1) go to settings and reset your location services
2) reset your network settings
Keep us posted on how you get on.
Kind Regards,
Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
-
This could be a bug as I don't believe this has been reported before-
Could you give the following lesson a go to see how you get on and see if location services is a bit more reliable for you-
http://lessons.runrev.com/m/4069/l/3037 ... al-compass
Another suggestion, from a quick internet search is to try the following-
1) go to settings and reset your location services
2) reset your network settings
Keep us posted on how you get on.
Kind Regards,
Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
-
Re: iOS troubles, way to get background location data?
Just guessing, but devices without GPS have to use network connections to get approximate locations. Without wifi they can't do that. So the behavior seems consist to me.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: iOS troubles, way to get background location data?
I found some information which, if correct, will have helped me answer my questions:
I have been testing indoors, without a sim, when in fact I need to be outdoors if I don't have a sim or wifi enabled. That explains why it was only recording location data when I switched the wifi back on.
... from https://discussions.apple.com/thread/1726921The GPS does work without a SIM card installed. GPS apps from the app store that display location as latitude/longitude/altitude will work without the SIM (although it will take longer to do the localization, and it will only work out in the open, since without the SIm the GPS must function without the assistance of the cell towers.
I have been testing indoors, without a sim, when in fact I need to be outdoors if I don't have a sim or wifi enabled. That explains why it was only recording location data when I switched the wifi back on.