Add iOS and macOS extensions to Tauri apps with a single command.
- Automatic Xcode project configuration via XcodeGen
- Built-in skeleton templates with TODO markers
- Plugin-based template system for custom implementations
- Supports both iOS and macOS platforms
- Idempotent - safe to re-run
- XcodeGen installed (
brew install xcodegen) - Tauri iOS project initialized (
tauri ios init) for iOS extensions - For macOS extensions: Tauri macOS Xcode project via @choochmeque/tauri-macos-xcode
# npm
npm install -D @choochmeque/tauri-apple-extensions
# pnpm
pnpm add -D @choochmeque/tauri-apple-extensions
# yarn
yarn add -D @choochmeque/tauri-apple-extensions
# bun
bun add -D @choochmeque/tauri-apple-extensions# Add iOS Share Extension
npx @choochmeque/tauri-apple-extensions ios add share
# Add macOS Share Extension
npx @choochmeque/tauri-apple-extensions macos add shareThis creates a Share Extension with a minimal skeleton template. Open the generated Swift file and implement your logic where you see // TODO: comments.
# Use templates from a plugin (plugin must include tauri-apple-extension config)
npx @choochmeque/tauri-apple-extensions ios add share --plugin <plugin-name>
# Use custom templates directory
npx @choochmeque/tauri-apple-extensions ios add share --templates ./path/to/templatesNote: When using
--plugin, the plugin'spackage.jsonmust contain atauri-apple-extensionconfig. See For Plugin Developers below.
| Type | Description |
|---|---|
share |
Share Extension for receiving shared content |
After running the tool:
- Open the Xcode project:
- iOS:
src-tauri/gen/apple/*.xcodeproj - macOS:
src-tauri/gen/apple-macos/*.xcodeproj
- iOS:
- Select your Apple Developer Team for both targets
- Enable App Groups capability for both targets
- Configure App Groups in Apple Developer Portal
To make your plugin compatible, add to your package.json:
{
"tauri-apple-extension": {
"type": "share",
"templates": {
"ios": "./templates/ios",
"macos": "./templates/macos"
}
}
}Plugins can support one or both platforms. If a user runs the command for a platform your plugin doesn't support, they'll receive a clear error message.
| Variable | Description |
|---|---|
{{APP_GROUP_IDENTIFIER}} |
App Group ID (e.g., group.com.example.app) |
{{APP_URL_SCHEME}} |
URL scheme for deep linking |
{{VERSION}} |
App version from tauri.conf.json |
{{BUNDLE_IDENTIFIER}} |
Extension bundle identifier |
{{PRODUCT_NAME}} |
App product name |
PRs welcome! Please open an issue first to discuss what you would like to change.