When sending video to an Apple TV via AirPlay my iPhone app crashes
| Originator: | jmacmullin | ||
| Number: | rdar://10509053 | Date Originated: | 01-Dec-2011 04:23 PM |
| Status: | Duplicate | Resolved: | |
| Product: | iPhone SDK | Product Version: | 5 |
| Classification: | Crash | Reproducible: | Always |
Summary: When sending video to an Apple TV via AirPlay my iPhone app crashes - Create a new single-view iPhone app - Add the 'audio' mode to the app's 'Required Background Modes' in the info.plist (so that AirPlay playback will continue if the screen is locked or the app is suspended). - Add a 'play' button to the view and hook it up to a 'play:' action - Add the MediaPlayer and AVFoundation frameworks - Implement the 'play:' method to set an appropriate Audio Session category and create and present an MPMoviePlayerViewController - Run the app and choose to send the video to an Apple TV via AirPlay. - Suspend the app and lock the screen - Press the home button to attempt to wake up the iPhone Expected Results: - The video will continue to play on the TV screen connected to the Apple TV whilst the app is suspended and I'll be able to lock/unlock my screen and use other apps etc. Actual Results: - The app crashes and video stops playing on the Apple TV. Regression: - The crash happens on my iPhone 4S that is running iOS5.0.1 (9A405) but the exact same code works fine on my iPad2 that is running iOS5.0 (9A334).
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!
Marked as a duplicate of 10443170