UIApplicationDidEnterBackgroundNotification incorrectly sent twice
|Product:||iOS + SDK
UIApplicationDidEnterBackgroundNotification incorrectly sent twice when an app with a background task is killed from Springboard
Steps to Reproduce:
Set up an app that has some background work to do, is capturing audio or otherwise running in the background.
Background it -- it receives UIApplicationDidEnterBackgroundNotification.
Kill the app from Springboard before it finishes its background work -- it receives another UIApplicationDidEnterBackgroundNotification
Already backgrounded apps should not be sent a redundant backgrounding notification. If there is a need to tell background apps that they've been told to knock it off, there should be another notification for this.
Application lifecycle listeners have to be wary and not mess stuff up when they are lied to by the system.
It also appears that UIApplicationWillEnterForegroundNotification is received by listeners more than once when an app comes from background to foreground after it has been suspended. This is still happening on iOS 10.2.1
iPhone 7, AT&T
Reports posted here will not necessarily be seen by Apple.
All problems should be submitted at bugreport.apple.com before they are posted here.
Please only post information for Radars that you have filed yourself, and please do
not include Apple confidential information in your posts. Thank you!