Native share sheet for NativePHP Mobile — share URLs, text, and files using the platform's native sharing UI.
- Share URLs with custom titles and text
- Share files with automatic MIME type detection
- Share plain text messages
- Native share sheet UI per platform
- Automatic temporary file cleanup (Android)
- iPad popover support (iOS)
composer require nativephp/mobile-share
| Platform |
Minimum Version |
| NativePHP |
^3.0 |
| iOS |
18.2+ |
| Android |
API 26+ |
Audio (m4a, aac, mp3, wav, ogg, flac), Video (mp4, m4v, mov, avi, mkv, webm), Images (jpg, jpeg, png, gif, webp), Documents (pdf, txt)
Share::url(title: 'Title', text: 'Check this out', url: 'https://...');
Share::file(title: 'Title', text: 'Here is the file', filePath: '/path/to/file');