watchOS 9.0 Developer Beta 3: allowsBackgroundLocationUpdates = true crashes the application

This code worked before for me on Beta 2.

Now I get the exception

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: !stayUp || CLClientIsBackgroundable(internal->fClient) || _CFMZEnabled()'

I do call requestAlwaysAuthorization() if the authorizationStatus != authorizedAlways (and I have tried with authorizedWhenInUse).

I start the collection like that

locationManager.activityType = .airborne
locationManager.desiredAccuracy = kCLLocationAccuracyBestForNavigation
locationManager.allowsBackgroundLocationUpdates = true
locationManager.startUpdatingLocation()

And I have a delegate attached to the location manager to collect the data.

I have enabled Background Modes for location updates, and have in info information about the Privacy - Location ... for various options

The app is crashing because the UIBackgroundMode is being removed from the plist by the build system. This workaround will work until a fix is available: https://twitter.com/parrots/status/1544841877945450498

watchOS 9.0 Developer Beta 3: allowsBackgroundLocationUpdates = true crashes the application
 
 
Q