How to emulate location while app isn't running - ios

I'm building an iOS 8 app that features GeoFencing. I need to test this and I know that I can emulate the location in Xcode using the preconfigured locations or providing a GPX file. However, as this app needs to act based on region monitoring when it's killed (swiped up in multitasking by user), how can I test it without getting in my car and driving around?
Thanks!

Related

is it possible to run Scan Beacon when app is Killed

Hello I'm new developer so i need some help Now. I was Bullied app doing Brodcast and Scan Beacon i used flutter_beacon 0.3.0
and for Brodcast i use beacon_broadcast 0.2.1 its working good for Advertising and Scan event when app is Background,but when app is kill or i remove app from list Running applications the Scan and Brodcast not Working
Now My Question is How to running code scan and Brodcast when app is killed or Finished ???
Yes, it is absolutely possible to resume beacon scanning on both Android and iOS after an app is killed. But the specifics of how you do this are different between iOS and Android. Further, the use of non-native development frameworks like FlutterBeacon make things more complicated as the documentation is not as complete for this use case.
While I am not an expert on FlutterBeacon, I am the lead developer on the underlying Android Beacon Library which it uses under the hood. I am also very familiar with how iOS CoreLocation works (which it also uses under the hood.)
In general here are the rules to get apps to detect after being killed:
iOS:
Start beacon monitoring (not just ranging) in the didFinishLaunching method of the AppDelegate
Obtain ALWAYS Location permission
After the app is killed it will be re-launched in the background when all beacons disappear or the first beacon appears in a monitored region.
Android:
Start beacon monitoring in the onCreate method of an Android application class using RegionBootstrap. See here for a discussion on the FlutterBeacon github
Obtain BACKGROUND_LOCATION permission from the user.
On Android 8+, your app should restart within 25 minutes of being killed and give you a callback to the BootstrapNotifier methods as appropriate.

Location Simulation Without Running Xcode

Is there any way to simulate a location on an iOS device without having to run Xcode with gpx files to do so? I'm fluent in swift and objc and would like to make an app simulate a location without running Xcode. The down side is that when you want to simulate a location without being connected to Xcode the app does not continue to simulate the location. Any help would be greatly appreciated!
Sometimes I use a quite ugly hack to do that.
When you have your device connected to the Xcode while simulating location, just remove the lighting cable without killing an app directly.
The app will crash but when you relaunch it you will see it shows the same simualated location despite the fact it's no longer connected to the Xcode.
Note that this is not an elegant approach and to make your device location services work properly again, you have to run an app from Xcode on your device and explicitly set Debug/Simulate Location/Don't Simulate Location

iPhone keeping location after running an app from Xcode with a Location Simulation

Some times after running some app I developed where I enabled Location Simulation in the scheme, my iPhone keeps the location across all apps (e.g Maps, GMaps, Strava etc.).
I have to reboot my phone to disable that simulated location.
Any idea how I could avoid that problem when I'm not debugging my apps ?

Can the IndoorAtlas ios SDK run in the background without the ios operating system kill it?

I'm looking for a solution for the following developing problem:
We are developing an ios (on iPhone, ios 8) application, based on the indoor positioning system, and we have found the IndoorAtlas geomagnetic solution. It is very good, but I don't know, how to solve that keeping running the IndoorAtlas in the background, if the user exit from the app or put the app in the background?
Thanks very much!!
This is not possible in normal application. Only certain type of applications can execute code in background, and even those are only woken up for the related callbacks of the application type.
https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html
In your case, the location background mode could work.

iOS: Application missing from Location Services list

My application uses iPhone's GPS functionality, and it was working fine previously, as in it prompts user to allow the use of location services and it shows up under Settings > Location Services list. I uninstalled and re-downloaded the app from the app store, but it no longer does either of them. The app was of the same version, and hasn't been updated for a while, but the problem had started recently.
The problem has been found in multiple devices (iPhone 3GS, iPhone 4, iPhone 4S) running different OS (iOS 4-5). Did Apple change how Location Services work recently?
This same happend to me and i don't know why. To restore applications to location service list you need to turn of main location service switch and then run all of your applications one by one. Every app which will need location service enabled will ask you to enable this service and add itself to the list.

Resources