

Given this big push for user control this is a great year to take a step back and ask yourself if your app even needs to ask the user for access to their photo library at all.

In nearly all cases, users do not want to give third parties access to their entire library. Over the years we've seen personal photo libraries grow from tends to hundreds of thousands of photos and videos. The primary motivation was to give users more control over their data. Before we dive into the technical details, I want to first talk about why we built this feature. Later on in the presentation I will show you new APIs that you can adopt which will allow you to take control over when and where this management UI is presented from as well as suppressing that prompt that comes up the first time your app calls PhotoKit APIs after launch. This allows a user to modify the selection within all apps without app adoption. For these apps, like this one here, once per app lifecycle when they first fetch assets via PhotoKit the user will be prompted to either keep their current selection or modify it. The second way is specific to apps that haven't made any changes to accommodate this new mode. So if I add a new photo and go back to our app, you'll see that it refreshed its view of the library. The first way is by going to settings, where alongside the option to change the overall access level this app has, the user can manage their selection. Now you may be wondering how a user would be able to modify this selection of photos for this app. So if we turn the favorites on for this we can see it's only the selected assets. The app is still able to see photo metadata such as whether it was favorited, however this is limited to the user's selection.

As you can see the app is only able to fetch the assets selected by the user. After tapping done the app is back in the foreground. This is allowing the user to individually select what photos or videos the app will have access to via PhotoKit. The user now has an additional option which says "Select Photos." After selecting this this, the user is presented with the limited library management UI. Upon first launch of a photos application the user will often be faced with a prompt asking them to grant the app access to their photo library. This demo will show what a user will see when using a third party app that hasn't adopted any new APIs or functionality. To demonstrate this let's look at an example app. Even the apps you've already shipped will be able to be put into this mode in iOS 14. It's important to note that limited photo library access will affect all apps that use photo kit.
PHOTOS LIBRARY SNAPSELECT UPDATE
When a user modifies their selection your app will automatically be notified so that it can update its UI to reflect the user's actions.

You will only be able to fetch assets and resources related to what the user has chosen for you to have access to. You can think of this as a filter for the PhotoKit APIs that you call. In limited mode we introduced this concept of the users limited library selection. Your app can make photo requests to either write or read from the database. In this scenario your app has access to nearly all of the assets in the user's photo library through PhotoKit APIs.
PHOTOS LIBRARY SNAPSELECT FULL
As a reference here's what full photos library access looks like to your app. So first let's go over what limited photo library means. And finally we'll discuss some UI changes that you might need to make in your app. Then we'll cover what new APIs are available to determine if your app has been put into this mode. We'll start with a feature overview so you can familiarize yourself with what this looks like in iOS 14. My name's Matt Dickoff and together with my colleague Adam Swift we'll be walking you through this new PhotoKit feature that allows users to better control the access that apps have to their photos library. Hello and welcome to the session on handling the new Limited Photos Library.
