You may have to select the Signing Account in Xcode.
Also add NSPhotoLibraryUsageDescription in info.plist.