FAQ

Common Sharing Services issues and solutions

Why doesn't text appear in my Facebook share?

Facebook policy prohibits pre-filling share dialogs with text. As per Facebook's documentation, only images and URLs can be sharedβ€”text must be entered manually by the user.

Solution: For Facebook sharing, use images and URLs. Add text descriptions to your game's post-share screen instead of trying to pre-fill Facebook text.

// Facebook: Images and URLs only
if (SocialShareComposer.IsComposerAvailable(SocialShareComposerType.Facebook))
{
    var imageItem = ShareItem.Screenshot();
    var urlItem = ShareItem.URL(URLString.URLWithPath("https://yourgame.com"));

    // Text will be ignored by Facebook
    SharingServices.ShowSocialShareComposer(
        SocialShareComposerType.Facebook,
        callback: null,
        imageItem,
        urlItem
    );
}

When should I use ShareSheet vs specific composers?

Use the decision tree:

Use Specific Composers (MailComposer, MessageComposer, SocialShareComposer) when:

  • You know the intended destination (email for support, SMS for invites, Facebook for achievements)

  • You want to pre-fill specific fields (email subject, message body)

  • You need platform-specific features (email attachments, HTML formatting)

  • Better user experience with targeted sharing flow

Use ShareSheet when:

  • Destination is unknown or varies by user preference

  • Specific composer is unavailable (fallback scenario)

  • Maximum flexibility for user choice

  • Quick general sharing without specific requirements

How can I detect if the user actually shared the content?

Detection varies by platform:

iOS: Result callbacks reliably report share status:

Android: Result detection is limited. Android's sharing system doesn't always report whether content was actually shared or just viewed. The callback may fire when the share sheet closes, regardless of whether sharing completed.

Best Practice: On Android, assume sharing succeeded when the result callback fires, or don't gate rewards strictly on confirmed sharing. iOS provides reliable confirmation.

Why doesn't MailComposer show on my device?

MailComposer requires configured email accounts on the device. If none are configured, MailComposer.CanSendMail() returns false.

Solution: Always check before showing:

Device Setup:

  • iOS: Settings β†’ Mail β†’ Accounts β†’ Add Account

  • Android: Settings β†’ Accounts β†’ Add Account β†’ Email

Can I share both text and image to WhatsApp on iOS?

No. WhatsApp on iOS only accepts either text OR an image in a single share, not both. Android WhatsApp supports both simultaneously.

Solution: Prioritize image over text on iOS, or let user choose:

Why doesn't MessageComposer support subject on Android?

SMS (Short Message Service) doesn't have a subject fieldβ€”only MMS (Multimedia Messaging Service) supports subjects on some platforms. Android SMS typically doesn't support subjects.

Solution: Check capability before setting subject:

How do I share high-resolution screenshots without quality loss?

Use PNG format for lossless compression:

For custom images, use PNG encoding:

Note: Some platforms (like Twitter, Facebook) may automatically compress images on their end. Essential Kit preserves quality up to the sharing point.

Can I customize the appearance of ShareSheet?

No. ShareSheet uses the native platform UI (UIActivityViewController on iOS, Intent.createChooser() on Android) which cannot be customized. The appearance is controlled by the OS.

What you can control:

  • Content shared (text, images, URLs)

  • Which apps are available (based on content type)

  • Excluded activity types (iOS only, advanced)

What you cannot control:

  • UI appearance, colors, layout

  • Button positions or labels

  • Available app order

How do I share files like PDFs or documents?

Use ShareItem.File() with appropriate MIME type:

Common MIME types:

  • PDF: application/pdf

  • Text: text/plain

  • JSON: application/json

  • ZIP: application/zip

  • CSV: text/csv

Why does my social composer say platform is unavailable?

SocialShareComposer.IsComposerAvailable() returns false when:

  1. The app is not installed on the device

  2. The user is not logged into the app

  3. The platform doesn't support sharing via the iOS/Android sharing API

Solution: Always check availability and provide fallback:

Can I share without showing any UI?

No. Native sharing APIs require user interaction and UI presentation for privacy and security reasons. Silent background sharing is not permitted by iOS or Android.

All sharing methods (ShowShareSheet, ShowMailComposer, ShowMessageComposer, ShowSocialShareComposer) display native UI that the user must interact with.

How do I track which platform users shared to?

Platform tracking is limited:

iOS ShareSheet: Result code indicates success/failure but not which app was selected.

Android ShareSheet: Similar limitationsβ€”result indicates closure but not destination app.

Specific Composers: You know the platform (Mail, SMS, Facebook, etc.) because you explicitly called that composer.

Best Practice: Track by composer type rather than destination app:

Why are my email attachments too large to send?

Email services have attachment size limits (typically 10-25MB depending on email provider).

Solution: Compress images before sharing:

File size tips:

  • Use JPEG for photos/screenshots (smaller than PNG)

  • Use PNG only when transparency is needed

  • Resize large textures before converting to ShareItem

  • Compress binary files before creating ShareItem

Can I pre-fill recipients in MessageComposer?

Yes, but user can always modify:

Note: Recipient field is pre-filled but not lockedβ€”user can add/remove recipients before sending. This is intentional for privacy reasons.

Does ShareSheet work in Unity Editor?

No. ShareSheet and all sharing composers require native platform APIs that are only available when built to iOS or Android devices.

Testing Workflow:

  1. Build to physical device (iOS or Android)

  2. Install and launch

  3. Test sharing functionality on device

  4. Monitor result callbacks

Editor Behavior: Calling sharing methods in Editor may show warnings or do nothing. Always test on devices.

How do I handle sharing errors gracefully?

Implement comprehensive error handling:

Can I share animated GIFs?

Yes, using the GIF conversion method:

Note: Not all platforms/apps support animated GIFs. Some may convert to static images.

Where can I confirm plugin behavior versus my implementation?

Run Assets/Plugins/VoxelBusters/EssentialKit/Examples/Scenes/SharingDemo.unity on a physical device. If the sample works but your implementation doesn't:

  • Compare capability checking (CanSendMail(), IsComposerAvailable())

  • Verify ShareItem creation (correct MIME types, valid data)

  • Check callback implementation (correct result code handling)

  • Confirm you're testing on device, not in Editor

  • Validate image sizes (not exceeding platform limits)

  • Ensure proper result code comparisons in callbacks

Last updated

Was this helpful?