Application not rotating after presenting a RPPreviewViewController

Originator:maxime.dechalendar
Number:rdar://31551699 Date Originated:11-Apr-2017 09:43 AM
Status:Open Resolved:
Product:iOS + SDK Product Version:10.3 (14E277)
Classification:ReplayKit Reproducible:Always
 
Summary:
If your app supports all orientations, presents modally a view controller that uses a specific orientation (using  'supportedInterfaceOrientations'), records the screen and presents ReplayKit's preview controller, then after this point, the application won't respond to the device's orientation changes anymore.

Steps to Reproduce:
1. Run the project from Xcode, on a real device (since ReplayKit doesn't work in the simulator).
2. Try to rotate your device : the root controller rotates and supports all orientations
3. Tap the 'Present modally' button
4. Try to rotate your device : the recording controller only supports landscape
5. Tap the 'Start recording' button
6. Wait for the recording to start, and the 'Stop recording' button to appear
7. Tap the 'Stop recording' button
8. Wait for the RPPreviewViewController controller to be presented
9. Tap the 'Cancel' button on the top left
10. Tap the 'Dismiss' button on the recording controller
11. Try to rotate your device

Expected Results:
The root controller, that originally supported all orientations, should rotate according to the device's orientation

Actual Results:
The root controller, that originally supported all orientations, is locked in whichever orientation it was when the recording controller was presented for the first time.

Version:
10.3 (14E277)

Notes:
The attached project uses Swift 3.1 and compiles with Xcode 8.3.1 

Configuration:
iPhone 6 128Gb

Sample project : https://puu.sh/vgwYu/c233bc4634.zip

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!