Repository navigation
Fix importing IPAs via the share sheet / "Open in Feather" - #1
Draft
xDifferentiate wants to merge 12 commits into
Draft
xDifferentiate wants to merge 12 commits into
xDifferentiate wants to merge 12 commits into
Conversation
- Register com.apple.itunes.ipa (the system/standard IPA UTI) as a handled document type and declare it as an imported type, so Feather shows up in the share sheet for .ipa files that aren't typed as Feather's own exported UTI. - Declare LSSupportsOpeningDocumentsInPlace explicitly. - Always request security-scoped access for opened files and release it after the import finishes; previously access was only requested for some file-provider paths and was never released. - Match .ipa/.tipa case-insensitively and normalise the extension before unzipping. - Coordinate the read so iCloud / file-provider files are downloaded before copying. - Insert the imported app into Core Data on the main actor instead of from a detached task (view context threading violation that kept imports from appearing in the Library). - Surface import errors with an alert and haptics instead of silently dropping them; clean up Documents/Inbox copies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014pbTqbdameqpCv6kqgpP5e
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014pbTqbdameqpCv6kqgpP5e
Owner
Author
|
The Release build (run 43657163877) failed while resolving Swift packages, before any source files compiled. This PR doesn't change any package references or project files, so the crash doesn't come from this diff. I've re-run it once. If it crashes the same way again, I'll add a separate step that resolves packages before Generated by Claude Code |
Xcode 26.3 on macos-latest crashes in xcodebuild while registering Swift package dependencies for this project (also on main), so build with a matrix of Xcode 26.x versions and upload the IPA/Catalyst zip. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014pbTqbdameqpCv6kqgpP5e
5cc5361 removed LicensePlist and its dependencies from the project but only updated Feather.xcworkspace's Package.resolved. The project-level file that `make` (xcodebuild -project) uses still pinned 8 packages that are no longer in the graph, plus SWCompression 4.8.6 while the project requires exactly 4.8.7. xcodebuild fetches the stale pins and then crashes while registering dependency packages (count of array (32) differs from count of index set (31)), on every Xcode 26.x and on main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014pbTqbdameqpCv6kqgpP5e
…per PR update Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014pbTqbdameqpCv6kqgpP5e
Library > Import from Files gets a private copy of the picked file and imports it through DownloadManager: it creates an archive entry (shown in the download header with unpack progress), copies, extracts and adds the app to the Library. Opening an .ipa/.tipa from Files or another app's share sheet skipped all of that and ran FR.handlePackageFile directly on the in-place, security-scoped URL from a background task, so nothing visible happened. - Add DownloadManager.importPackageFiles(_:completion:) holding the picker's import steps, and use it from LibraryView. - On open, take security-scoped access, copy the file into our temporary directory (coordinated, so iCloud/file-provider files are downloaded), then run the same importPackageFiles path. Clean up the copy afterwards. - Also accept files whose type conforms to an IPA type even without a .ipa extension. - Show an alert when an import from Files or Open with fails, instead of only a haptic. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014pbTqbdameqpCv6kqgpP5e
"Open with Feather" / share sheet opens still did nothing on re-signed installs: Feather came to the foreground but nothing was imported and no error appeared (see claration#581). With UISupportsDocumentBrowser (which implies open-in-place) Feather receives a URL inside the sending app's container and needs a sandbox extension to read it, which iOS does not reliably grant to a sideloaded app whose bundle ID / application identifier were changed by the signer. - Turn off open-in-place (LSSupportsOpeningDocumentsInPlace = NO, drop INFOPLIST_KEY_UISupportsDocumentBrowser) so iOS copies the file into Feather's Documents/Inbox itself before handing it over. - Scan Documents/Inbox whenever the scene becomes active and import any .ipa/.tipa found, so the import does not depend on the open URL event being delivered. The open URL handler and the scan share one path and skip files the other already consumed. - Show an alert for files Feather can't import instead of returning silently. Trade-off: Feather's Documents folder no longer appears under On My iPhone in the Files app (still reachable through Finder file sharing). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014pbTqbdameqpCv6kqgpP5e
Some apps (e.g. Telegram/Swiftgram) only offer a Share action for files, not "Open in", so Feather never appeared there. Add a share extension, as proposed in claration#581, activated by NSExtensionActivationRule for IPA/TIPA (and zip) attachments. - FeatherShare target (app extension, iOS only; filtered out of the Mac Catalyst build): loads each shared file, copies it into a FeatherShareInbox folder in Feather's App Group container and opens feather://import-shared. - The main app imports everything in that inbox on feather://import-shared and whenever it becomes active, through the same path as Import from Files, and removes the inbox copies. - Sideload signers rename App Groups, so both processes read the group ID from their own signed entitlements first and only fall back to group.thewonderofyou.Feather from Info.plist. If no group is usable the extension says so instead of silently doing nothing. - Add the App Group to both entitlements files and sign the iOS build (extension first, then the app) with them, so signers that keep an app's entitlements can provision the group. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014pbTqbdameqpCv6kqgpP5e
Mac Catalyst rejects LSSupportsOpeningDocumentsInPlace = NO at build time. Leaving the key out (with UISupportsDocumentBrowser also gone) keeps the iOS default of NO, so iOS still copies opened files into Documents/Inbox. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014pbTqbdameqpCv6kqgpP5e
Turning off open-in-place removed Feather from "Open with" and hid its Documents folder in the Files app. Put UISupportsDocumentBrowser and LSSupportsOpeningDocumentsInPlace = YES back. Sharing from apps whose files Feather can't read in place goes through the Share to Feather extension instead; the Documents/Inbox scan stays for senders that copy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014pbTqbdameqpCv6kqgpP5e
…importing Opening an .ipa from Files, Safari, the share sheet or the Share to Feather extension now posts .featherShowLibrary, and both tab bars select the Library tab so the new import is visible. The iOS 18 tab bar gets a selection binding for this; every tab now has a value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014pbTqbdameqpCv6kqgpP5e
…from the Catalyst app too After make, _build/Payload holds the Mac Catalyst app, whose Info.plist is at Contents/Info.plist, so Get Version failed and skipped the upload. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014pbTqbdameqpCv6kqgpP5e
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.
Problem
Feather registered as a document handler only for its own exported UTI,
thewonderofyou.Feather.ipa. iOS usually types.ipafiles from Safari, Files and Telegram ascom.apple.itunes.ipa, so Feather often didn't appear for them.When "Open with Feather" did start, nothing visible happened. Feather opened in place: iOS handed it a URL inside the sending app's container, and reading that URL needs a sandbox extension. iOS doesn't reliably grant one to a re-signed (sideloaded) Feather (see claration#581). The import also bypassed the progress UI that Import from Files uses, and it inserted into Core Data off the main thread. Apps that only offer Share for files (Telegram/Swiftgram) can't reach Feather at all without a share extension.
Changes
Opening files with Feather
Info.plist:com.apple.itunes.ipato the IPA document type and declare it inUTImportedTypeDeclarations.INFOPLIST_KEY_UISupportsDocumentBrowserand don't setLSSupportsOpeningDocumentsInPlace. iOS then copies opened files intoDocuments/Inboxitself, so no cross-app permission is needed.LSSupportsOpeningDocumentsInPlace = NOexplicitly breaks the Mac Catalyst build, so the key is omitted.FeatherApp:DownloadManager.importPackageFiles. That gives the progress header and Library entry.Documents/Inboxwhenever the scene becomes active, so imports don't depend on the open-URL event arriving.AppFileHandler: coordinated copy, lowercase extension before unzipping, and insert into Core Data on the main actor."Share to Feather" extension (
FeatherShare, proposed in claration#581)NSExtensionActivationRulematches IPA/TIPA/zip attachments.FeatherShareInboxin Feather's App Group container, then opensfeather://import-shared. The app imports that inbox on that URL and on every activation.group.thewonderofyou.FeatherfromInfo.plist. Without a usable group, the extension shows a message instead of doing nothing.Trade-off: Feather's Documents folder no longer appears under On My iPhone in Files. It's still available through Finder file sharing.
Build fix (
maindoesn't build either)5cc5361removed LicensePlist but left stale pins in the project-levelPackage.resolvedthatmakeuses. It also pinned SWCompression 4.8.6, while the project requires exactly 4.8.7.xcodebuildcrashed while resolving packages (count of array (32) differs from count of index set (31)). This PR removes the stale pins.CI
.github/workflows/build.ymlruns on PRs and manual dispatch. It builds with Xcode 26.3 and 26.2 and uploadsFeather.ipaandFeather_Catalyst.zip.release.ymlalso uploads its packages as an artifact.Testing
PlugIns/FeatherShare.appex(com.apple.share-services, principal classFeatherShare.ShareViewController, activation rule includescom.apple.itunes.ipa).LSSupportsOpeningDocumentsInPlaceorUISupportsDocumentBrowser.🤖 Generated with Claude Code
https://claude.ai/code/session_014pbTqbdameqpCv6kqgpP5e