Claude
Skills
Sign in
Back

distributing-tauri-for-ios

Included with Lifetime
$97 forever

Guides users through distributing Tauri applications to the iOS App Store, including Apple Developer enrollment, Xcode configuration, provisioning profiles, code signing, TestFlight beta testing, and App Store submission processes.

General

What this skill does


# Distributing Tauri Apps for iOS

This skill covers the complete process of distributing Tauri v2 applications to Apple's iOS App Store.

## Prerequisites

Before distributing a Tauri iOS app, ensure:

1. macOS development machine (required for iOS builds)
2. Xcode installed with iOS SDK
3. Apple Developer Program enrollment ($99/year)
4. Tauri project initialized for iOS (`tauri ios init`)

## Apple Developer Program Enrollment

Enroll at [developer.apple.com/programs](https://developer.apple.com/programs):

1. Sign in with Apple ID
2. Accept the Apple Developer Agreement
3. Complete enrollment (individual or organization)
4. Wait for approval (typically 24-48 hours)

## Bundle Identifier Configuration

The bundle identifier must be unique and match across all configurations.

### tauri.conf.json

```json
{
  "identifier": "com.yourcompany.yourapp",
  "version": "1.0.0",
  "bundle": {
    "iOS": {
      "bundleVersion": "1"
    }
  }
}
```

**Configuration notes:**

- `identifier`: Reverse-domain format, must match App Store Connect
- `version`: Becomes `CFBundleShortVersionString` (user-visible version)
- `bundleVersion`: Becomes `CFBundleVersion` (build number, must increment for each upload)

### Register Bundle ID in App Store Connect

1. Go to [Certificates, Identifiers & Profiles](https://developer.apple.com/account/resources/identifiers/list)
2. Click "+" to register a new identifier
3. Select "App IDs" then "App"
4. Enter description and explicit Bundle ID matching `tauri.conf.json`
5. Select required capabilities
6. Click "Register"

## Code Signing Setup

### Create Certificates

**Distribution Certificate (required for App Store):**

1. Open Keychain Access on macOS
2. Keychain Access > Certificate Assistant > Request a Certificate from a Certificate Authority
3. Enter email, select "Saved to disk"
4. Go to [Certificates](https://developer.apple.com/account/resources/certificates/list)
5. Click "+" and select "Apple Distribution"
6. Upload the certificate signing request
7. Download and double-click to install

### Create Provisioning Profile

**App Store Distribution Profile:**

1. Go to [Profiles](https://developer.apple.com/account/resources/profiles/list)
2. Click "+" to create new profile
3. Select "App Store Connect" under Distribution
4. Select your App ID
5. Select your distribution certificate
6. Name and generate the profile
7. Download the `.mobileprovision` file

### Install Provisioning Profile

```bash
# Copy to Xcode provisioning profiles directory
cp ~/Downloads/YourApp_AppStore.mobileprovision \
   ~/Library/MobileDevice/Provisioning\ Profiles/
```

Or double-click the file to install automatically.

## Xcode Project Configuration

Open the Tauri iOS project in Xcode:

```bash
tauri ios build --open
```

### Configure Signing in Xcode

1. Select the project in the navigator
2. Select your app target
3. Go to "Signing & Capabilities" tab
4. Uncheck "Automatically manage signing" for manual control
5. Select your Team
6. Select the App Store provisioning profile

### Required Capabilities

Add capabilities based on app requirements:

| Capability | When Required |
|------------|---------------|
| Push Notifications | If using APNs |
| Background Modes | For background tasks |
| App Groups | For sharing data between extensions |
| Associated Domains | For universal links |

### Info.plist Configuration

Located at `src-tauri/gen/apple/[AppName]_iOS/Info.plist`:

```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleDisplayName</key>
    <string>Your App Name</string>
    <key>CFBundleName</key>
    <string>YourApp</string>
    <key>CFBundleIdentifier</key>
    <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
    <key>CFBundleVersion</key>
    <string>$(CURRENT_PROJECT_VERSION)</string>
    <key>CFBundleShortVersionString</key>
    <string>$(MARKETING_VERSION)</string>
    <key>UILaunchStoryboardName</key>
    <string>LaunchScreen</string>
    <key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>NSCameraUsageDescription</key>
    <string>This app requires camera access for...</string>
    <key>NSPhotoLibraryUsageDescription</key>
    <string>This app requires photo library access for...</string>
</dict>
</plist>
```

**Required usage descriptions** (add only if your app uses these features):

- `NSCameraUsageDescription`: Camera access
- `NSPhotoLibraryUsageDescription`: Photo library
- `NSLocationWhenInUseUsageDescription`: Location services
- `NSMicrophoneUsageDescription`: Microphone access

## App Icons

Generate iOS app icons from a source image (1024x1024 recommended):

```bash
tauri icon /path/to/app-icon.png --ios-color '#ffffff'
```

This generates all required icon sizes in `src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/`.

## Building for App Store

### Command Line Build

```bash
# Build IPA for App Store Connect
tauri ios build --export-method app-store-connect
```

The IPA is generated at:
```
src-tauri/gen/apple/build/arm64/[AppName].ipa
```

### Build Options

```bash
# Build with specific target
tauri ios build --target aarch64-apple-ios --export-method app-store-connect

# Build in release mode (default for export-method)
tauri ios build --release --export-method app-store-connect

# Build and open in Xcode for manual archive
tauri ios build --open
```

### Archive via Xcode (Alternative)

1. Open project: `tauri ios build --open`
2. Select "Any iOS Device" as destination
3. Product > Archive
4. Window > Organizer to view archives
5. Click "Distribute App"
6. Select "App Store Connect"
7. Follow the wizard

## App Store Connect API Key Setup

Create an API key for automated uploads:

1. Go to [App Store Connect > Users and Access](https://appstoreconnect.apple.com/access/users)
2. Select "Integrations" tab
3. Click "App Store Connect API" then "+"
4. Name the key and select "Admin" or "Developer" role
5. Click "Generate"
6. Download the `.p8` file (only available once)
7. Note the Key ID and Issuer ID

### Store the API Key

```bash
# Create directory
mkdir -p ~/.appstoreconnect/private_keys

# Move the key file (rename to include Key ID)
mv ~/Downloads/AuthKey_XXXXXXXXXX.p8 ~/.appstoreconnect/private_keys/

# Alternative location
mkdir -p ~/private_keys
mv ~/Downloads/AuthKey_XXXXXXXXXX.p8 ~/private_keys/
```

### Environment Variables (Optional)

```bash
export APPLE_API_KEY_ID="XXXXXXXXXX"
export APPLE_API_ISSUER="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
```

## Uploading to App Store Connect

### Using altool

```bash
xcrun altool --upload-app \
  --type ios \
  --file "src-tauri/gen/apple/build/arm64/YourApp.ipa" \
  --apiKey "$APPLE_API_KEY_ID" \
  --apiIssuer "$APPLE_API_ISSUER"
```

### Using Transporter App

1. Download Transporter from Mac App Store
2. Sign in with Apple ID
3. Drag and drop the IPA file
4. Click "Deliver"

### Using Xcode Organizer

1. Window > Organizer
2. Select your archive
3. Click "Distribute App"
4. Select "App Store Connect"
5. Choose "Upload" or "Export"
6. Follow prompts

## TestFlight Beta Testing

After upload processing (typically 15-30 minutes):

### Internal Testing

1. App Store Connect > Your App > TestFlight
2. Add internal testers (up to 100, must be App Store Connect users)
3. Testers receive email invitation

### External Testing

1. Create a test group
2. Add build to the group
3. Submit for Beta App Review (required for external testers)
4. Add external testers (up to 10,000)
5. Testers install via TestFlight app

## App Store Submission

### Create App in App Store Connect

1. Go to [App Store Connect](https://appstoreconnect.apple.com)
2. My Apps > "+" > New App
3. Select iOS platform
4. Enter app name, primary l

Related in General