---
name: beta
description: Build and upload iOS app to TestFlight
argument-hint: [skip_build_increment:true] [changelog:"text"]
allowed-tools: Bash, Read
---

## TestFlight Beta Release

Build and upload the iOS app to TestFlight for beta testing.

### Pre-flight Checks
- Fastlane installed: !`fastlane --version 2>/dev/null | grep "fastlane " | head -1 || echo "✗ Not installed - run: brew install fastlane"`
- Fastfile exists: !`ls fastlane/Fastfile 2>/dev/null && echo "✓ Found" || echo "✗ Not found - run /setup-fastlane first"`
- App-specific password: !`[ -n "$FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD" ] && echo "✓ Set" || echo "⚠️ Not set - export FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD='xxxx-xxxx-xxxx-xxxx'"`

### Arguments: ${ARGUMENTS:-none}

---

## What This Does

1. **Syncs certificates** via Match (appstore type) — *only once you've run the `match` skill; the base `setup-fastlane` lane skips this*
2. **Increments build number** (unless `--skip-build-increment`)
3. **Builds release archive** with gym
4. **Uploads to TestFlight** via pilot
5. **Optionally distributes to external testers** (via the separate `beta_external` lane)

---

## Commands

### Standard Beta (Internal Testers)
Run from your project directory (where `fastlane/` lives):
```bash
fastlane beta
```

### Skip Build Number Increment
```bash
fastlane beta skip_build_increment:true
```

### External Testers (with changelog)
```bash
fastlane beta_external changelog:"Bug fixes and performance improvements"
```

---

## Troubleshooting

### "No value found for 'username'"
Set your Apple ID in `fastlane/Appfile`:
```ruby
apple_id("your@email.com")
```

### "Please sign in with an app-specific password"
1. Go to https://account.apple.com → Sign-In & Security → App-Specific Passwords
2. Generate a password named "Fastlane"
3. Export it:
```bash
export FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD='xxxx-xxxx-xxxx-xxxx'
```

### rsync error during export
If you see `--extended-attributes: unknown option`, Homebrew rsync conflicts with Xcode:
```bash
brew uninstall rsync  # Use system rsync
```

---

## After Upload

- Build will appear in TestFlight within 1-5 minutes
- Internal testers are notified automatically
- External testers require `beta_external` lane or manual distribution in App Store Connect


---
Source attribution: greenstevester
Original project: https://github.com/greenstevester/fastlane-skill/blob/cab4eff8e678391671916228d7b6446d438da4a9/skills/beta/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Dave AI.

## Upstream license notice

MIT License

Copyright (c) 2024 greenstevester

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Dave AI resource metadata

Creator / publisher: greenstevester
Original project: https://github.com/greenstevester/fastlane-skill/blob/cab4eff8e678391671916228d7b6446d438da4a9/skills/beta/SKILL.md
Attribution basis: Recovered original package and original project license at a pinned revision

Fields of work: Development & Engineering, Product Management
Roles: DevOps / SRE, Mobile Developer, Product Manager
Specialties: DevOps, Mobile
Tools: Bash, Fastlane
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: eb111ae87ae44b23b9d413a2a29fcc1218bc5bca9fccd87786a7ecfd1321ca5e
Metadata reviewed: 2026-10-27
This metadata supersedes earlier Dave AI catalog attribution. Original instruction and supporting files are preserved.
