UIImagePickerController crashes on iOS10

后端 未结 4 1667
鱼传尺愫
鱼传尺愫 2020-12-31 01:33

On presenting UIImagePickerController with photo library source on iOS10, my app crashes.

On iOS10 with camera source and on iOS9<

相关标签:
4条回答
  • 2020-12-31 01:49

    Rahul's answer is perfect. If you prefer to add it straight into your plist rather than via the plist's source code then just do the following.

    0 讨论(0)
  • 2020-12-31 01:51

    permission keys in plist for permission For Camera (also need Microphone permission) and PhotoLibrary

    <key>NSCameraUsageDescription</key>
    

    ${PRODUCT_NAME} Camera Usage

    <key>NSMicrophoneUsageDescription</key>
    

    ${PRODUCT_NAME} Microphone Usage

    <key>NSPhotoLibraryUsageDescription</key>
    

    ${PRODUCT_NAME} PhotoLibrary Usage

    0 讨论(0)
  • 2020-12-31 01:59

    I solved the crash by updating to the latest Xcode version. The problem has been discussed here as well: https://github.com/Leanplum/Leanplum-iOS-SDK/issues/12

    0 讨论(0)
  • 2020-12-31 02:08

    You may need to put the NSCameraUsageDescription (if your app uses the Camera) and NSPhotoLibraryUsageDescription (if your app uses the Photo Library) in your plist. Like below,

    <key>NSCameraUsageDescription</key>
    <string>$(PRODUCT_NAME) needs access to use your camera</string>
    
    <key>NSPhotoLibraryUsageDescription</key>
    <string>$(PRODUCT_NAME) needs access to use your photo library</string>
    
    0 讨论(0)
提交回复
热议问题