Forum Xamarin Xamarin.iOS

iOS11 app crashes: unrecognized selector sent

IsmailAkbulutIsmailAkbulut USUniversity

We have an app which uses the iPhone or iPad camera.
The app worked fine in all previous version however it crashes in iOS11.

We use a CameraPickerController that calls the CameraOverlayController

Here is the code:
overlayController = UIStoryboard.FromName("NewInspectionStoryBoard", null).InstantiateViewController("ReportCameraOverlayController") as ReportCameraOverlayController;

this.CameraOverlayView = overlayController.View;

it fails after the assignment with the error message:
[UIViewController _setCamersOverlayView] =: unrecognized selector sent

I changed in the Overlay controller view class to UIViewController but that did not change anything.


  • ShaneBoyedShaneBoyed NZMember ✭✭

    We had the same problem. Fixed it by moving the following code from ViewDidLoad() to the class constructor:

    AllowsEditing = false;
    MediaTypes = new[] { "public.image" };
    SourceType = UIImagePickerControllerSourceType.Camera;
    CameraDevice = UIImagePickerControllerCameraDevice.Rear;
    ShowsCameraControls = false;
    VideoQuality = UIImagePickerControllerQualityType.Low;

  • IsmailAkbulutIsmailAkbulut USUniversity

    Thank you. Calling
    SourceType = UIImagePickerControllerSourceType.Camera;

    fixed the issue.

Sign In or Register to comment.