UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

SwiftUI - Project 13 Part 3 Save image to user's photo library

Forums > 100 Days of SwiftUI

Why does the NSPhotoLibraryAddUsageDescription in info.plist not recognized by Xcode 12 iOS 14 simulator?

The same entry in the Xcode 11 project using AppDelegate and SceneDelegate works in the iOS 13 simulator. However, running the same code using Xcode 12 iOS 14 simulator gets this error - "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."

This is the same code except Xcode 12 creates an "InstaFilter"App.swift and not the 2 Delegate.swift files. I have googled and checked Apple forum but no one has found this problem with Xcode 12. Paul Hudson's project-13 code from github uses Xcode 11.

Thank you.

2      

I entered the NSPhotoLibraryAddUsageDescription in the Test info.plist and not the project info.plist. The error has nothing to do with Xcode 12 versus 11. Thanks.

2      

TAKE YOUR SKILLS TO THE NEXT LEVEL If you like Hacking with Swift, you'll love Hacking with Swift+ – it's my premium service where you can learn advanced Swift and SwiftUI, functional programming, algorithms, and more. Plus it comes with stacks of benefits, including monthly live streams, downloadable projects, a 20% discount on all books, and free gifts!

Find out more

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.