I'm implementing a PHBackgroundResourceUploadExtension to back up photos and videos from the user's library to our cloud storage service.
Our existing upload infrastructure uses chunked uploads for large files (splitting videos into smaller byte ranges and uploading each chunk separately). This approach:
- Allows resumable uploads if interrupted
- Stays within server-side request size limits
- Provides granular progress tracking
Looking at the PHAssetResourceUploadJobChangeRequest.createJob(destination:resource:) API, I don't see a way to specify byte ranges or create multiple jobs for chunks of the same resource.
Questions:
- Does the system handle large files (1GB+) automatically under the hood, or is there a recommended maximum file size for a single upload job?
- Is there a supported pattern for chunked/resumable uploads, or should the destination URL endpoint handle the entire file in one request?
- If our server requires chunked uploads (e.g., BITS protocol with CreateSession → Fragment → CloseSession), is this extension the right mechanism, or should we use a different approach for large videos?
Any guidance on best practices for large asset uploads would be greatly appreciated.
Environment: iOS 26, Xcode 18