Sharing Interface
Sharing Interface
Sharing interfaces enable users to send content to other applications, contacts, or services. iOS provides UIActivityViewController (share sheet) and Android uses the share intent system. Both platforms offer native sharing UI that applications trigger with content to share. Design systems must specify how to integrate platform sharing while providing consistent sharing experiences.
What Is Sharing Interface
Sharing interfaces are platform-provided UI for distributing content. Users can share text, links, images, files, and other content to messaging apps, social media, email, and other destinations. The platform determines available share targets based on installed apps and their declared capabilities.
iOS share sheets present a bottom sheet with share destinations, copy/save actions, and sometimes custom actions. UIActivityViewController handles presentation; applications provide content and optional custom activities.
Android sharing uses intents, where applications declare what content types they can receive. When sharing, the system shows available receivers. The share interface varies somewhat by Android version and manufacturer.
How Sharing Interfaces Work
iOS share sheet implementation provides content to UIActivityViewController, which presents the standard share sheet. Custom activities can add application-specific actions.
Sharing Interface Implementation:
iOS UIActivityViewController:
let activityVC = UIActivityViewController(
activityItems: [shareText, shareURL],
applicationActivities: [customActivity]
)
activityVC.excludedActivityTypes = [.print, .airDrop]
present(activityVC, animated: true)
- Activity items: Content to share
- Application activities: Custom actions
- Excluded activities: Removed options
- Completion handler: Result tracking
Android Share Intent:
Intent shareIntent = new Intent(Intent.ACTION_SEND);
shareIntent.setType("text/plain");
shareIntent.putExtra(Intent.EXTRA_TEXT, shareText);
startActivity(Intent.createChooser(shareIntent, "Share via"));
- Action: ACTION_SEND or ACTION_SEND_MULTIPLE
- Type: MIME type of content
- Extras: Actual content to share
- Chooser: Title for share dialog
Share Button Placement:
- Standard icon: Square with arrow (iOS), Share (Android)
- Consistent placement in navigation or toolbars
- Tap triggers platform share UI
- Loading state if preparing share content
Share button design uses platform-recognized icons. iOS uses the square-with-up-arrow share icon. Android uses various share icons. Consistent placement in navigation bars or toolbars follows platform conventions.
Content preparation may happen before sharing. Generating share-ready content, creating preview images, or composing share text might require processing before triggering the share interface.
Custom share actions appear alongside system options. Applications can add custom actions (Save to Favorites, Copy Link) that appear in the share sheet without opening external applications.
Key Considerations
- Use platform share interfaces rather than custom
- Share button icons should follow platform conventions
- Content preparation may need loading states
- Track share completion for analytics
- Custom actions extend but do not replace system sharing
- Preview appearance may be configurable
Common Questions
Should applications use custom sharing or platform sharing?
Platform sharing is strongly recommended. Users know how platform share sheets work. They see their installed apps and preferred sharing methods.
Custom sharing (building your own share UI) requires maintaining share destinations, handling authentication with each service, and keeping up with API changes. This effort rarely benefits users.
Custom actions within platform sharing work well. Adding Save or Copy alongside system share options extends functionality without replacing familiar UI.
Pre-selected share destinations (explicit share to Twitter button) may suit some applications. These complement rather than replace general sharing.
How do applications customize share previews?
iOS supports rich link previews through Open Graph and similar metadata. When sharing URLs, the receiving app may show title, image, and description from metadata.
Explicit preview images can be included in share content. Sharing an image alongside URL ensures preview image presence.
Share extensions on iOS can customize how content from your app appears in other apps. This requires building a share extension.
Android preview behavior varies by receiving application. Content preview is less standardized than iOS.
What analytics should sharing interfaces capture?
Share initiation tracks when users open share UI. This indicates interest in sharing even without completion.
Share completion tracks successful shares. Platform APIs provide completion callbacks indicating whether sharing completed.
Share destination may be available. Some platforms indicate where content was shared, enabling understanding of popular destinations.
Content shared helps understand what users find share-worthy. Tracking which content gets shared most informs content strategy.
Summary
Sharing interfaces use platform-provided share sheets (iOS UIActivityViewController, Android share intents) rather than custom implementations. Platform sharing leverages users’ installed apps and familiar UI patterns. Design systems should specify share button placement, content preparation approaches, and any custom actions to include alongside system sharing. Analytics capture share activity for understanding user behavior.
Buoy scans your codebase for design system inconsistencies before they ship
Detect Design Drift Free