6

Can't end BackgroundTask: no background task exists with identifier , or it may have already been ended. Break in UIApplicationEndBackgroundTaskError() to debug.

self.backgroundTaskIdentifier = UIApplication.shared.beginBackgroundTask(expirationHandler: {
     if self.backgroundTaskIdentifier != UIBackgroundTaskIdentifier.invalid{
                UIApplication.shared.endBackgroundTask(self.backgroundTaskIdentifier!)
                self.backgroundTaskIdentifier = UIBackgroundTaskIdentifier.invalid
            }
})
Ravikanth
  • 308
  • 1
  • 10

0 Answers0