Rear camera is not working in Ipad in Xamarin form

2019-09-06 23:51发布

问题:

I am using Xam.Plugin.Media to access camera and photo gallery in my Xamarin forms app.

Its working in IPhone and in Android devices but not working in IPad with latest ios version 10.3. The Screen will be freezed when I am calling the function to open Camera.

I tried other plugins also but the same issue. Front Camera is working but Rear camera is not working.

回答1:

I found the fix for this issue in below links.

https://github.com/jamesmontemagno/MediaPlugin/issues/173

Application freezes when trying to present rear camera on iPad

Actually I was using this code

UISlider.Appearance.MinimumTrackTintColor = UIColor.Red.ColorWithAlpha(100);

to configure some appearance of UISlider in ios. It was causing the issue. By removing these lines, camera is working fine in both iphone and Ipad.