[PB-5921]: File Provider item resolution + re-auth signaling#493
Open
terrerox wants to merge 3 commits into
Open
Conversation
Implement item(for:) so the system can resolve any identifier to a FileProviderItem: return the root container item, decode folder/file identifiers and fetch their metadata from the Drive API, and map 401 responses to NSFileProviderError.notAuthenticated so the system can re-request credentials.
Persist the Drive API base URL in the App Group keychain when credentials are written, so the File Provider extension can build authenticated Drive requests. Add a wrapper test asserting the native module receives driveBaseUrl.
Add FileProviderDomainManager.signalEnumeration to notify the working set enumerator, and call it once the File Provider domain is registered so the Files app refreshes Drive contents right after credentials change. Signal failures are logged and ignored to avoid blocking login.
4fcdcfd to
f222339
Compare
5b85782 to
5bfc79f
Compare
|
patricioxavier8
approved these changes
Jun 12, 2026
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.



What this fixes
item(for:)real lookup — the extension's single-item resolver was an unimplemented stub that returned every identifier as a non-downloaded file, so tapped folders showed greyed/empty. Now resolvesf:/d:identifiers viagetFolderMetaByUuid/getFileMetaByUuidand returns correct folder/file items (right kind, capabilities, materialization).NSFileProviderManager.signalEnumerator(.workingSet)after registering the domain, so the system re-enumerates with the fresh credentials instead of staying latched in the needs-auth state.driveBaseUrlhandoff — forwarded into the shared keychain on credential write so the extension can build its Drive client after login.