Closed noway closed 2 years ago
@noway Could you specify the version of MapboxMobileEvents.xcframework
you are using?
@vesh93 I'm using version 0.10.13.
@noway Thanks. There are no similar known issues for this version. I'll investigate it and get back to you.
The issue is reproduced locally, looking for a fix.
Configuration
Steps to Reproduce I'm using react-native-mapbox-gl and trying to play audio in background. The map is shown when the audio starts playing.
I have both location and audio UIBackgroundModes yet it still happens.
I suspect the app is killed because of the background task that MapboxMobileEvents creates. See the logs bellow.
Expected
Logging
2022-03-24 11:54:31.101062+1300 myapp[8916:3189929] [BackgroundTask] Background Task 27 ("Called by MapboxMobileEvents, from -[MMEUIApplicationWrapper beginBackgroundTaskWithExpirationHandler:]"), was created over 30 seconds ago. In applications running in the background, this creates a risk of termination. Remember to call UIApplication.endBackgroundTask(_:) for your task in a timely manner to avoid this.