問題
NSPhotoLibraryAddUsageDescription
を記述しているにも関わらず、記述されていない判定でクラッシュする
This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSPhotoLibraryAddUsageDescription key with a string value explaining to the user how the app uses this data.
原因
SwiftUIはXcode13からデフォルトでInfo.plist
が表示されなくなりました。
ですので、Info.plist
の編集はこちらから行います。
しかし、1度編集を行うとプロジェクト内にInfo.plist
ファイルが生成されます。
こちらからNSPhotoLibraryAddUsageDescription
を追加しても反映されていませんでした。
解決方法
ターケット内のInfoからパーミッションリクエストを記述する
おわり
おそらくバグです