---
title: "createJob(destination:resource:)"
framework: photos
role: symbol
role_heading: Type Method
path: "photos/phassetresourceuploadjobchangerequest/createjob(destination:resource:)"
---

# createJob(destination:resource:)

Creates an asset resource upload job.

## Declaration

```swift
class func createJob(destination: URLRequest, resource: PHAssetResource)
```

## Discussion

Discussion Parameter: destination: the destination NSURLRequest to which this asset resource will be sent. resource: the asset resource to be uploaded. If the number of jobs exceeds jobLimit the photo library performChanges(_:completionHandler:) request will fail with a limitExceeded error. To generate jobs after this limit is triggered, you must acknowledge succeeded/failed jobs, and wait for the registered/pending ones to finish uploading, which will make those jobs also succeeded/failed.
