setUploadJobExtensionEnabled(_:)
Enables or disables the background asset resource upload job feature.
Declaration
func setUploadJobExtensionEnabled(_ enable: Bool) throwsParameters
- enable:
trueallows calls to the extension’s host application; you can fulfill that protocol to create Phassetresourceuploadjob objects.falsestops calls to the extension’s host application.
Mentioned in
Discussion
You must call this function before you create PHAssetResourceUploadJob in the extension’s host application.
To enable background uploads, you must have both full library access and register the extension with the extension point: “com.apple.photos.background-upload”.