camera functionality broken with iOS 12.1 RRS feed

  • Question

  • User244390 posted

    We have a Xamarin iOS app that was published to the App store about 3 years ago. When the app is installed on an iPhone with iOS version 12.1 the camera functionality in the app does not work.

    For years the camera in the app has worked fine. And we found that in iOS version 12.0 it works fine. NOTE: in 12.0 the user is asked for permission to use the camera the first time they try to use the app that way, (As it should be). AND the app continues to work fine if that same phone is upgraded to 12.1

        Case that is fine:
            - iOS phone has version 12.0
            - we install our app 
            - we go to the use-camera part of the app
            - iOS asks the user for permission to use the camera
            - the user says, OK
            - the camera in the app works fine
            - upgrade the iOS version to 12.1
            - the camera in the app still works fine
        Case that fails:
            - iOS phone has version 12.1
            - we install the app
            - we try to go to the use-camera part of the app
            - a black screen is presented

    We don't have information on what other cases may fail. Sorry.

    Rebuilding and re-publishing the app is not an option.

    Why is the camera functionality in the app breaking with iOS version 12.1 ?


    Friday, November 16, 2018 6:58 PM

All replies

  • User369979 posted

    I've tested UIImagePickerController with NSCameraUsageDescription privacy in info.plist on my side. It worked fine on iOS 12.1. Could you please show your privacy strings? And did you use UIImagePickerController or AVFoundation capture photos?

    Monday, November 19, 2018 2:54 AM
  • User244390 posted

    Thank you for your response. I have to do some work before I can answer your question.

    Keep in mind, this is for a Xamarin iOS app built and deployed 3 years ago.

    Monday, November 19, 2018 8:46 PM
  • User24359 posted

    We are now having issues with the CrossMedia package for xamarin.forms. After you call the code to take the picture the camera comes up then once you take the picture it will just disappear without clicking on "Use Photo". It seemed to work prior to the iOS update of 12.1.1

    The code is: file = await CrossMedia.Current.TakePhotoAsync(new Plugin.Media.Abstractions.StoreCameraMediaOptions { SaveToAlbum = saveToAlbum }) ?? null;

    Wednesday, December 12, 2018 7:08 PM
  • User244390 posted

    OK. Update. @LandLu, the code is using UIIMagePickerController

    I was finally able to get the source code and reproduce the problem. in development: As soon as you tap the "Take Picture" button that should open the camera, the app crashes.

    I went to Xcode > Window > Devices > Logs and found

    Termination Reason: TCC, This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCameraUsageDescription key with a string value explaining to the user how the app uses this data.

    Fixed that by opening info.plist and adding

        key: NSCameraUsageDescription
        string: The app needs to use the camera.

    The app works fine ... here in development. What's weird is that the app has been working for years. I am guessing that Xamarin/Mono has been supplying a string to make iOS happy, but this update to iOS no longer accepted that. Guessing.

    Wednesday, December 19, 2018 1:08 PM