App extension triggers UIApplication* notifications
| Originator: | iruan | ||
| Number: | rdar://20822367 | Date Originated: | 2015-05-05 |
| Status: | Open | Resolved: | |
| Product: | iPhone 5s 64GB Verizon Wi-Fi | Product Version: | iOS 8.3 |
| Classification: | Reproducible: | Yes |
Summary: According to <view-source:https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/ExtensionOverview.html#//apple_ref/doc/uid/TP40014214-CH2-SW6>, accessing [UIApplication sharedApplication] and any of UIApplication's associated methods — including notifications — is not available in the context of an app extension's sandboxed process. In iOS 8.3, a document provider utilizing an instance of LAContext (and calling its evaluatePolicy method) triggers an applicationDidBecomeActive notification. This should not technically not be permissible, according to the docs. Steps to Reproduce: Reproducible 100% of the time. 1. Instantiate an app with Document Provider app extension 2. Turn on Touch ID authentication when application does become active 3. Add observer for UIApplicationDidBecomeActiveNotification notification in the app delegate 4. Open another 3rd-party app that allows browsing/viewing files using original app's document provider 5. Open document provider in 3rd-party app that supports extension 6. Observe how when the app extension process is used, UIApplicationDidBecomeActiveNotification's callback is triggered in the app extension's context Expected Results: UIApplicationDidBecomeActiveNotification — or any UIApplication related methods and constants — should not be triggered in the context of an app extension. Actual Results: UIApplicationDidBecomeActiveNotification getting triggered in the context of an app extension's process. Version: iOS 8.3 (12F70) Notes: Configuration: iPhone 5s, 64GB, Verizon using Wi-Fi
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!