Bug 47244 - iPhone app crashes when launching camera in Video mode
Summary: iPhone app crashes when launching camera in Video mode
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: XI 10.0 (iOS10)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2016-11-17 20:33 UTC by Thomas Wonneberger
Modified: 2016-11-18 05:36 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

sample file demonstrating the issue (856 bytes, application/octet-stream)
2016-11-17 20:33 UTC, Thomas Wonneberger

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Thomas Wonneberger 2016-11-17 20:33:22 UTC
Created attachment 18517 [details]
sample file demonstrating the issue

The iPhone app will crash if the camera is launched with MediaType of UTType.Movie.  Even if the camera is launched in UTType.Image mode, switching the camera to video mode causes the app to crash.  The info.plist file has the appropriate permission request definitions set.  This was discovered both running a deployed app on an iPhone as well as when running connected to a debugger in Xamarin Studio for OSX.  I isolated the issue by creating a sample app with only a button that launches the camera as I've described.  I've attached a sample file from that app so that you can verify my code.
Comment 1 Alex Soto [MSFT] 2016-11-18 05:36:00 UTC
Hello I am able to reproduce the issue but it is gone once I add both (NSCameraUsageDescription and NSMicrophoneUsageDescription) of the following keys to my info plist. 

> <key>NSCameraUsageDescription</key>
> <string>Need Camera.</string>
> <key>NSMicrophoneUsageDescription</key>
> <string>Need Mic.</string>

My guess is that you might be missing NSMicrophoneUsageDescription please add this key to your info.plist. If adding the above does not work for you please reopen the bug report and add a full test case app so we can repro.