Orientation info access in Messages Extensions
| Originator: | falcon.ser | ||
| Number: | rdar://28279379 | Date Originated: | 13-Sep-2016 |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | iOS 10.0.1 (14A403) |
| Classification: | Serious Bug | Reproducible: | Always |
Summary: UIDevice's orientation method always returns .unknown for Messages Extension Please find the sample project in attachment. After it launched you may observe, that there is no way to detect current device's orientation, but using deprecated since iOS 8 UIViewController.interfaceOrientation or inventing other custom workarounds. This information is necessary for camera based extension, as we need to rotate camera preview accordingly to the device's orientation changes. Steps to Reproduce: 1) call UIDevice.current.beginGeneratingDeviceOrientationNotifications() 2) rotate device Expected Results: UIDeviceOrientationDidChange notifications sent to observers, UIDevice.current.orientation represents actual device's orientation Actual Results: UIDevice.current.orientation is always .unknown UIDeviceOrientationDidChange notifications never be fired Version: iOS 10.0.1 (14A403) Notes: Configuration: iPad Pro Attachments: 'DeviceOrientationSample.zip' was successfully uploaded.
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!