feat(app): share an image into Freegle to start an Offer (iOS) [dark]#759
Closed
edwh wants to merge 1 commit into
Closed
feat(app): share an image into Freegle to start an Offer (iOS) [dark]#759edwh wants to merge 1 commit into
edwh wants to merge 1 commit into
Conversation
iOS half of Share-into-Freegle (Android is in the parent commit). Adds an
iOS share-sheet extension so a photo can be shared straight into a new OFFER
with the image pre-attached.
DARK / FLAG-GATED: everything is a no-op unless ENABLE_SHARE_EXTENSION=true.
By default the Xcode project, the main app's entitlements and signing are
byte-for-byte unchanged, so this cannot affect the weekly App Store release
until deliberately enabled. Enabling first requires (human, Apple-portal):
1. Register App Group group.org.ilovefreegle.iphone and enable it on both
App IDs (org.ilovefreegle.iphone and .ShareExtension).
2. Pre-create the .ShareExtension App ID + App Store distribution profile.
3. Regenerate the main app profile so it includes the App Group.
4. Set ENABLE_SHARE_EXTENSION=true in the deploy-apps CircleCI context.
Then on-device verification.
- ios/App/ShareExtension/ShareViewController.swift — no-UI share handler:
copies shared image(s) into the App Group container and opens the host app
with freegleshare://shared?p=<path>... (responder-chain openURL).
- ios/App/ShareExtension/Info.plist — share-services extension, image
activation rule, programmatic principal class (no storyboard).
- ios/App/ShareExtension/ShareExtension.entitlements — App Group.
- ios/App/App/Info.plist — register the freegleshare:// URL scheme.
- fastlane/add_share_extension_target.rb — gated; adds the target + (build-time
only) the App Group entitlement to the main app. Mirrors add_nse_target.rb.
- fastlane/Fastfile — gated wiring + signing + export map, composed so a
disabled build is identical to today's app(+NSE) export.
- stores/mobile: appUrlOpen handles freegleshare://shared, queuing the
image(s) into the same pendingSharedImages give-flow path as Android.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Member
Author
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
The iOS half of Share-into-Freegle. Adds an iOS share-sheet extension so a
photo can be shared straight into a new OFFER with the image pre-attached —
the iOS counterpart to the Android
ACTION_SENDwork in #758.Everything is a no-op unless
ENABLE_SHARE_EXTENSION=true. By default theXcode project, the main app's entitlements and its signing/export are
byte-for-byte unchanged, so this cannot affect the weekly App Store
release until deliberately enabled. The disabled export composes to exactly
today's app(+NSE) provisioning map.
Enabling requires these human, Apple-Developer-portal steps first (no code
can do them — they need interactive Apple ID + 2FA):
group.org.ilovefreegle.iphone; enable it on both AppIDs (
org.ilovefreegle.iphoneandorg.ilovefreegle.iphone.ShareExtension)..ShareExtensionApp ID + an App Store distribution profile(same "create once by hand" approach as the NSE).
ENABLE_SHARE_EXTENSION=truein thedeploy-appsCircleCI context.…then on-device verification (native code is not buildable locally).
How
the App Group container, then opens the host app with
freegleshare://shared?p=<path>…via the responder-chainopenURL:technique.com.apple.share-services, image activationrule, programmatic principal class (no storyboard to get wrong).
freegleshare://URL scheme.only, never committed) the App Group entitlement to the main app. Mirrors
add_nse_target.rb.== today's export).
appUrlOpencatchesfreegleshare://sharedand queuesthe image(s) into the same
pendingSharedImages→/give/mobile/photospath as Android.
Risk / testing
and the new Ruby script both pass
ruby -c; all plists are well-formed;mobile.jspassesnode --check.Capacitor.convertFileSrc()serving the App Group container path to the WKWebView. If it doesn't, the fix
is to copy app-group→app-tmp in
AppDelegatebefore forwarding the URL.Part of Share-into-Freegle. Companion: #758 (Android).
🤖 Generated with Claude Code