title: iOS and Cordova for geolocation tracking and monitorSignificantLocationChanges and other questions
body: <p>I'm writing a Cordova plugin for background tracking in iOS, my understanding is the following:</p>
  
  <ul>
  <li>I use <code>startUpdatingLocation</code> to start the tracking</li>
  <li>this will send locations whether my app is in the foreground or in the background</li>
  <li>if I receive a location in the background and take too much time to process it, iOS will kill the app</li>
  <li>this is why I also use <code>startMonitoringSignificantLocationChanges</code>, so in case my app is killed iOS will reopen it with a new location in <code>didFinishLaunchingWithOptions</code></li>
  </ul>
  
  <p>is that correct?</p>
  
  <p>I also have two other questions:</p>
  
  <h1>Monitoring significant location changes</h1>
  
  <p>I call <code>startMonitoringSignificantLocationChanges</code> to have my app relaunched if it is killed. I have read that in this case, the latest location is given in the options passed to the method, but that we have to call again both <code>startUpdatingLocation</code> and <code>startMonitoringSignificantLocationChanges</code> to keep the geolocation coming, is this correct ?</p>
  
  <p>Also, if we have to call <code>startUpdatingLocation</code>, and (I assume) this generates a new call to the location handler with the latest location, is there a point in using the location given as parameter directly in the <code>didFinishLaunchingWithOptions</code> method rather than in the location handler?</p>
  
  <p>It seems this would result in two parts of the code with the same processing task so this is redundant (I assume the location processing is also done in the location handler since this was the purpose of the app before it got killed -- the only case I see that might need processing in <code>didFinishLaunchingWithOptions</code> without restarting <code>startUpdatingLocation</code> is geofencing apps that only need to be awaken near a particular location without necessarily tracking the user, is this why the option is given?)</p>
  
  <p>Now the question: is there a way when writing a Cordova plugin to add directly a handler to the <code>didFinishLaunchingWithOptions</code> method in order to call back <code>startUpdatingLocation</code> and <code>startMonitoringSignificantChanges</code> again? or is the only way to listen to the corresponding notification from the plugin code?</p>
  
  <h1>Javascript events when processing geolocations</h1>
  
  <p>The plugin calls a javascript event when it receive a location in the foreground or background. However, this javascript code might run some tasks like an animation with a timer, etc. I'd like to understand better the Cordova execution to see whether this would result in a delay that causes the app to be killed if for instance receiving a geolocation starts a javascript timer that runs an animation for too long, does this keep the application running and triggers the iOS watchdog, or is it run in a BackgroundTask thread?</p>
  
  <p>And for instance if I run an AngularJS app that reacts to a new location, what happens since AngularJS has it's own run loop, will the application always be killed because AngularJS is constantly watching the variables for change etc &amp; I have to tell AngularJS to stop its run loop when the app is in the background?</p>
  
  <p>In particular, what happens if I want to asynchronously send an HTTP request to a server? Will Cordova run the js in the background or do I have to tell Cordova to wait until a certain event happens, eg the js code does the request and tells Cordova it has finished so Cordova can finish the background task?</p>