applicationDidBecomeActive called when leaving the app

Originator:jan.sachse
Number:rdar://32614495 Date Originated:
Status:open Resolved:
Product:iOS + SDK Product Version:11.0 (15A5278f)
Classification:Bug Reproducible:Always
 
Area:
UIKit

Summary:
The applicationDidBecomeActive delegate method is getting called after leaving the app using the UIApplication.shared.open(...) method. Additionally, applicationWillResignActive gets called twice (once before and once after the duplicate applicationDidBecomeActive call).

Steps to Reproduce:
Download the attached sample, run it while watching the log console and tap on the "Open Apple.com" button.

Expected Results:
The expected callback cycle is called as the app goes into background and the log should look like this:
didFinishLaunching
didBecomeActive
willResignActive
didEnterBackground

Observed Results:
applicationDidBecomeActive gets called again after the app goes into background and the log looks like this:
didFinishLaunching
didBecomeActive
willResignActive
didBecomeActive
willResignActive
didEnterBackground

Version:
11.0 (15A5278f)

Notes:
Regression

Configuration:
Tested on iPhone 6S Plus on iOS 11 (broken) and iPad Air 2 on iOS 10.2 (working)

Comments


Please note: 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!