57557


`https://github.com/hyperoslo/ImagePicker`  
を使うと落ちます。

開発環境  
Xcode 10.2 (10E125)  
Deployment Target: 12.2

その他必要な情報があれば教えてください。

[code]

    import UIKit
    import ImagePicker
    
    class ViewController: UIViewController, ImagePickerDelegate {
    
        override func viewDidLoad() {
            super.viewDidLoad()
        }
    
        @IBAction func addBtnTapped(_ sender: Any) {
            choosePicture()
        }
    
        @objc func choosePicture() {
            let config = Configuration()
            config.doneButtonTitle = "Finish"
            config.noImagesTitle = "Sorry! There are no images here!"
            config.recordLocation = false
            config.allowVideoSelection = true
    
            let imagePicker = ImagePickerController(configuration: config)
            imagePicker.delegate = self
    
            present(imagePicker, animated: true, completion: nil)//<-###ここで落ちる
        }
    
        // MARK: - ImagePickerDelegate
        func cancelButtonDidPress(_ imagePicker: ImagePickerController) {
            imagePicker.dismiss(animated: true, completion: nil)
        }
    
        func wrapperDidPress(_ imagePicker: ImagePickerController, images: [UIImage]) {
            guard images.count > 0 else { return }
    
            print(images)
        }
    
        func doneButtonDidPress(_ imagePicker: ImagePickerController, images: [UIImage]) {
            imagePicker.dismiss(animated: true, completion: nil)
        }
    }
    
[/code]

[![画像の説明をここに入力](https://i.stack.imgur.com/6sqSO.jpg)](https://i.stack.imgur.com/6sqSO.jpg)


CC BY-SA 4.0
2019-08-22T13:22:09.530
57548
2019-08-23T02:24:58.957
2019-08-22T13:28:10.607
12297
12297
question
swift xcode uiimagepickercontroller
Swiftのhyperoslo/ImagePickerを使うと落ちます。


Info.plistに

[code]

    Privacy - Photo Library Usage Description
    
[/code]

と

[code]

    Privacy - Camera Usage Description
    
[/code]

を追加したら解決しました！


CC BY-SA 4.0
2019-08-23T02:24:58.957
57557
2019-08-23T02:24:58.957
12297
57548
answer