Add PhotoKit background uploads for Auto Upload on iOS 27 & NC >= 33 - #4279
Draft
marinofaggiana wants to merge 36 commits into
Draft
Add PhotoKit background uploads for Auto Upload on iOS 27 & NC >= 33#4279marinofaggiana wants to merge 36 commits into
marinofaggiana wants to merge 36 commits into
Conversation
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Request full photo library access at launch and enable the upload job extension on iOS 27. Use OSLog for background upload lifecycle events. Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Add a shared extension scheme and diagnostic lifecycle logging. Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Store background upload job identifiers in metadata and bump the database schema version. Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Add Realm-backed metadata support and build upload destination requests in the background upload target. Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Update the extension project settings to use the relocated entitlements and property list files. Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Create, retry, and acknowledge Photos background upload jobs while syncing their results to metadata. Exclude extension-managed uploads from the legacy networking process. Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Enable the upload job extension for eligible accounts and fall back to the existing auto-upload flow when unavailable. Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Initialize the extension database, logger, and NextcloudKit sessions, and split account-related metadata handling into dedicated extension files. Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Move destination, job, and result handling into focused extension files and add retry processing for background upload jobs. Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Track completed auto-upload transfers and clear job identifiers only after successful acknowledgement. Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Acknowledge jobs without metadata and mark successful uploads with a missing file ID as errors. Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Require server version 33 or later and update the upload extension options when already enabled. Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Use account-specific subfolder granularity when creating upload paths and only skip assets by their generated filename. Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Scope pending uploads to active accounts, acknowledge orphan retry jobs, preserve asset dimensions and size, and accept standard ETag headers. Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Bump the Realm database schema version to 416. Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Limit pending metadata creation to available upload slots and prevent duplicate asset queuing by local identifier. Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Restrict auto-upload processing to the active account and delegate supported flows to the Photos extension. Cancel or acknowledge background jobs when auto-upload is disabled or moved to another account. Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Reset retry state after successful uploads and preserve session data when handling failures. Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Defer disabling until active auto-upload jobs finish and cap concurrent extension jobs at 20. Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Acknowledge orphaned jobs, stop retrying authentication failures, and keep processing active while upload jobs remain. Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
marinofaggiana
marked this pull request as draft
September 1, 2026 09:16
Delete pending uploads immediately and mark active background uploads for cancellation. Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Use OSLog levels for extension diagnostics while persisting errors and key lifecycle events. Update the Nextcloud scheme to prompt for the app when debugging extensions. Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introduces the iOS 27 PhotoKit Background Resource Upload extension for Nextcloud Auto Upload.
The new implementation:
PHAssetResourceUploadJob;PUTdestinations;Live Photo handling is intentionally excluded and will be addressed separately.
🤖 AI (if applicable)