UIImagePickerController in Swift 3

后端 未结 2 916
谎友^
谎友^ 2020-12-07 02:11

I\'ve recently updated to Swift 3 in Xcode 8 using the developer beta. I\'m trying to implement Firebase Auth, and everything\'s going well.

My Problem:

I\'m

相关标签:
2条回答
  • 2020-12-07 02:45

    Follow the error message from xCode, and add key/value to Info.plist of application.

    For example, I got an error message from my developing app. It reminds me to add NSCameraUsageDescription to app's Info.plist.


    The error message from xCode

    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.


    And MORE

    Add key/value pair to Localizable.strings, it will give i18n support. For example, I add a pair to Localizable.strings (English). It will give English description when ask user about camera permission.

    "NSCameraUsageDescription" = "We needs camera permission to capture image.";
    
    0 讨论(0)
  • 2020-12-07 02:52

    I think you need to add privacy - key for camara and photo library in your info.plist file as from xcode 8. for example,

     Key : Privacy - Media Library Usage Description
     Value : YES 
    
     Key : Privacy - Photo Library Usage Description
     Value : YES 
    
     Key : Privacy - Camara Usage Description
     Value : YES 
    

    here value is string not Boolean.

    so try this.

    Check Apple documentation for more details!

    Reference : this so post

    0 讨论(0)
提交回复
热议问题