modules/Share-with-Bluesky/README.md
iOS Share Extension for the Bluesky Social app that enables users to share content from other apps directly to Bluesky.
This module implements an iOS Share Extension (Action Extension) that appears in the system share sheet when users tap the share button in other iOS apps. It allows sharing text, URLs, images, and videos to create a new Bluesky post.
The extension is implemented as a native iOS Share Extension using Swift. When a user shares content:
ShareViewController receives the shared content from the extension contextgroup.app.bsky) for access by the main appThe extension communicates with the main app using deep links with the bluesky:// scheme:
bluesky://intent/compose?text=<encoded-text>
bluesky://intent/compose?imageUris=<uri1>|<width>|<height>,<uri2>|<width>|<height>
bluesky://intent/compose?videoUri=<uri>|<width>|<height>
The scheme can be customized by setting the MainAppScheme key in Info.plist to support forks.
The main app handles these deep links in src/lib/hooks/useIntentHandler.ts:
ShareViewController.swift - Main view controller that handles share requests and processes contentInfo.plist - Extension configuration (activation rules, supported content types)Share-with-Bluesky.entitlements - App group entitlements for shared file accesssrc/lib/hooks/useIntentHandler.ts - Main app hook that handles incoming deep linksandroid/app/src/main/AndroidManifest.xml - Android share intent configuration (lines 57-76)Defined in Info.plist under NSExtensionActivationRule:
The extension uses the group.app.bsky App Group identifier to share files with the main app. This is configured in:
Share-with-Bluesky.entitlementsThe MainAppScheme in Info.plist defaults to bluesky but can be changed for forks to use a custom URL scheme.
When images are shared:
<file-url>|<width>|<height>When videos are shared:
<file-url>|<width>|<height>This module is built as part of the main Xcode project. The extension target is included in the iOS build configuration.
To modify the extension:
/iosShareViewController.swift for logic changesInfo.plist for configuration changes