default
TypeScriptstatic default(): PHAssetResourceManagerSwift declarationclass func `default`() -> PHAssetResourceManagerclass · iOS 9.0+ · SDK 27.1
class PHAssetResourceManagerstatic default(): PHAssetResourceManagerSwift declarationclass func `default`() -> PHAssetResourceManagercancelDataRequest(requestID: number): voidSwift declarationfunc cancelDataRequest(_ requestID: PHAssetResourceDataRequestID)static init(): PHAssetResourceManagerSwift declarationinit()requestData(resource: PHAssetResource, options: (PHAssetResourceRequestOptions) | null, handler: ((arg0: ArrayBuffer) => void), completionHandler: ((arg0: (NativeError) | null) => void)): numberSwift declarationfunc requestData(for resource: PHAssetResource, options: PHAssetResourceRequestOptions?, dataReceivedHandler handler: @escaping (Data) -> Void, completionHandler: @escaping ((any Error)?) -> Void) -> PHAssetResourceDataRequestIDwriteData(resource: PHAssetResource, fileURL: string, options: (PHAssetResourceRequestOptions) | null, completionHandler: ((arg0: (NativeError) | null) => void)): voidSwift declarationfunc writeData(for resource: PHAssetResource, toFile fileURL: URL, options: PHAssetResourceRequestOptions?) async throwsexportedAssetID(resource: PHAssetResource): Promise<_CloudKit_CKAsset_ExportedAssetID>Swift declarationfunc exportedAssetID(for resource: PHAssetResource) async throws -> CKAsset.ExportedAssetIDReturns the exported asset ID for the specified asset resource. The returned `CKAsset.ExportedAssetID` can be used to create a `CKAsset` that references the asset resource data without copying it. Network access is required; the request will fail if the resource cannot be resolved in CloudKit. Only resources belonging to ``PHAssetResource.TypeGroup.coreComponents`` are valid. The photo library must be cloud-enabled; requests against a local-only library will fail with ``PHPhotosError.requestNotSupportedForAsset``. This method supports task cancellation. If the calling task is cancelled, the underlying network request is cancelled and this method throws ``CancellationError``. - Parameter resource: The asset resource to get an exported asset ID for. - Returns: The exported asset ID for the resource. - Throws: ``CancellationError`` if the task is cancelled, or another error if the request fails.
No declarations were skipped in this snapshot.