setup-fastlane
Skill38 starsChanged 6 months agoMITView on GitHub
Set up Fastlane for iOS/macOS app automation
- Installs packages
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 152
Code signing issues?: Ask: "Set up Match for code signing"
- Distinctive: line 153
Need screenshots?: Ask: "Automate my App Store screenshots"
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Fastlane Setup (One-Time)
┌─────────────────────────────────────────────────────────────────┐
│ ONE-TIME SETUP │
│ ══════════════ │
│ After this, you'll have: │
│ │
│ fastlane ios test → Run tests │
│ fastlane ios beta → Upload to TestFlight │
│ fastlane ios release → Submit to App Store │
│ │
│ Do this once per project. Takes ~10 minutes. │
└─────────────────────────────────────────────────────────────────┘Environment Check
- Xcode CLI: !
xcode-select -p 2>/dev/null && echo "✓" || echo "✗ Run: xcode-select --install" - Homebrew: !
brew --version 2>/dev/null | head -1 || echo "✗ Run: /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"" - Fastlane: !
fastlane --version 2>/dev/null | grep -o "fastlane [0-9.]*" | head -1 || echo "✗ Run: brew install fastlane"
Your Project
- Project: !
find . -maxdepth 2 -name "*.xcodeproj" 2>/dev/null | head -1 || echo "None found" - Workspace: !
find . -maxdepth 2 -name "*.xcworkspace" ! -path "*/.build/*" ! -path "*/xcodeproj/*" 2>/dev/null | head -1 || echo "None" - Bundle ID: !
grep -r "PRODUCT_BUNDLE_IDENTIFIER" --include="*.pbxproj" . 2>/dev/null | head -1 | sed 's/.*= //' | tr -d '";' || echo "Not found" - Team ID: !
grep -r "DEVELOPMENT_TEAM" --include="*.pbxproj" . 2>/dev/null | head -1 | sed 's/.*= //' | tr -d '";' || echo "Not found"
Target: ${ARGUMENTS:-current directory}
Step 1: Install Fastlane
brew install fastlaneWhy Homebrew? Bundler 4.x broke Fastlane's Ruby dependencies. Homebrew avoids all version conflicts.
Step 2: Create Configuration Files
fastlane/Appfile
app_identifier("{{BUNDLE_ID}}") # Your bundle ID
apple_id("{{APPLE_ID}}") # Your Apple ID email
team_id("{{TEAM_ID}}") # Your team IDfastlane/Fastfile
default_platform(:ios)
platform :ios do
desc "Run tests"
lane :test do
scan(scheme: "{{SCHEME}}")
end
desc "Upload to TestFlight (internal testers)"
lane :beta do |options|
increment_build_number unless options[:skip_build_increment]
gym(scheme: "{{SCHEME}}", export_method: "app-store")
pilot(skip_waiting_for_build_processing: true)
end
desc "Upload to TestFlight and distribute to external testers"
lane :beta_external do |options|
increment_build_number
gym(scheme: "{{SCHEME}}", export_method: "app-store")
pilot(
distribute_external: true,
groups: ["External Testers"],
changelog: options[:changelog] || "Bug fixes and improvements",
skip_waiting_for_build_processing: false
)
end
desc "Submit the latest TestFlight build for App Store review"
lane :release do
deliver(
build_number: latest_testflight_build_number.to_s,
submit_for_review: true,
automatic_release: false,
force: true,
skip_binary_upload: true,
skip_metadata: false,
skip_screenshots: false
)
end
desc "Build, upload, and submit a fresh build to the App Store"
lane :release_full do |options|
increment_version_number(version_number: options[:version]) if options[:version]
increment_build_number
gym(scheme: "{{SCHEME}}", export_method: "app-store")
deliver(
submit_for_review: true,
automatic_release: options[:auto_release] == true,
force: true
)
end
endReplace {{SCHEME}} with your app's scheme name (usually the app name).
Step 3: Set Up Metadata (Optional)
Download your existing App Store listing:
fastlane deliver download_metadata
fastlane deliver download_screenshotsThis creates fastlane/metadata/ with editable text files for your app description, keywords, etc.
You're Done!
# Verify setup
fastlane lanes
# Run your first lane
fastlane ios testQuick Reference
| Command | What it does |
fastlane ios test | Run tests |
fastlane ios beta | Build + TestFlight |
fastlane ios release | Build + App Store |
fastlane deliver download_metadata | Fetch App Store listing |
Next Steps
- Code signing issues? Ask: "Set up Match for code signing"
- Need screenshots? Ask: "Automate my App Store screenshots"
- CI/CD setup? See Xcode Cloud guide
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

