Indoor location with Swift 3, iOS 10 and iPhone 7

I added the an authorisation request to the didFinishLaunchingWithOptions: method, which seems to have fixed the issue, for the first launch of the app:

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    let beaconManager = ESTBeaconManager() //only for asking permission
    beaconManager.requestAlwaysAuthorization() 
    [...] //start the location service and return True
 }

However, after first launch of the app, the app never manages to connect to the location. Removing the app and then starting a new session through XCode then has working location updates for that launch. But after stopping and starting the session again, no more update come in, and the app has to be removed again to get location updates. Is this a known issue? What could be done to overcome this?

Also, one other issue. As discussed with one of your colleagues at Indoor location on locked device (iOS) the new Beacons should work when the device is locked. However, when locking the device, the stream of location updates seems to stop. As stated, the app as permission to always use the location services and has location updates listed as a required background mode in info.plist. What else should be done to enable location updates in the background, or is this linked to the other problem?

So TL;DR of our problems:

  1. Indoor location only works the first time the app is launched
  2. When indoor location works, no location is reported when the phone is locked.