i have a wallpaper app , i need a photos access when i try to add it in capabilities i don't find it.is there any solution?
How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here
Photos acess
It's not a capability. You need to add it to your Info.plist file.
Here's a screenshot of the relevant item you need to add - to the appropriate target - highlighted in blue:
The 'Value' is a String key in quotes, and you need an InfoPlist.strings
file for each supported language.
The file contains descriptive text giving reasons why your app needs photo library access, or location access etc. Here's what mine looks like for the two keys seen in that screenshot:
NSPhotoLibraryUsageDescription = "FILL THIS IN WITH THE TEXT THAT WILL APPEAR IN AN ACCESS PROMPT DIALOG";
"Privacy_UsageDescription_PhotoLibrary" = "FILL THIS IN WITH THE TEXT THAT WILL APPEAR IN AN ACCESS PROMPT DIALOG";
NSLocationWhenInUseUsageDescription = "SOME LOCATION TEXT GOES HERE";
"Location_UsageDescription_WhenInUse" = "SOME LOCATION TEXT GOES HERE";