Edit: I just needed to set the value for the key 'PHProjectExtensionDefinesProjectTypes' to 'NO'.
I am creating a project extension in the macOS Photos application. The Xcode project includes a file 'PhotoProjectViewController.swift' with the following functions conforming to PHProjectExtensionController:
var projectExtensionContext: PHProjectExtensionContext? {}
var supportedProjectTypes: [PHProjectTypeDescription] {}
func beginProject(with extensionContext: PHProjectExtensionContext, projectInfo: PHProjectInfo, completion: @escaping (Error?) -> Void) {}
func resumeProject(with extensionContext: PHProjectExtensionContext, completion: @escaping (Error?) -> Void) {}
func finishProject(completionHandler completion: @escaping () -> Void) {}
There is also a view named PhotoProjectViewController.xib.
Apple has no documentation for the new project extension API.
My question is: what view is loaded when the user starts the project extension? Anything I put into the xib does not appear. The viewDidLoad() is called, but not beginProject(). How do you get the user's photo selection and load it into say a collection view? There is very little to go off from Apple, and nothing else online about creating these extensions.
This is the PhotoProjectViewController.xib: XIB
When I run the extension in Photos.app by choosing a photo and starting the extension, this appears: Extension View
I would like to get the photos the user selected and load them into a collection view in the extension.