Run endBackgroundTaskIfNeeded after running runOnBackgroundQueue
Run endBackgroundTaskIfNeeded after running runOnBackgroundQueue

amplitude/Amplitude-iOS,amplitude/Amplitude-iOS,amplitude/Amplitude-iOS,amplitude/Amplitude-iOS