Manage TestFlight beta testing and navigate App Store review.
TestFlight Overview
# TestFlight = Beta testing platform for iOS apps
# Internal: Up to 100 testers (team members)
# External: Up to 10,000 testers (public link)
# Builds expire after 90 daysInternal Testing
// Fastlane lane for internal testing
lane :beta_internal do
increment_build_number(
build_number: latest_testflight_build_number + 1,
xcodeproj: "MyApp.xcodeproj"
)
build_app(
scheme: "MyApp",
configuration: "Release",
export_method: "app-store"
)
upload_to_testflight(
api_key_path: "./fastlane/app_store_connect.json",
skip_waiting_for_build_processing: true,
groups: ["Internal Testers"],
notify_external_testers: false,
changelog: "Internal build #{lane_context[SharedValues::BUILD_NUMBER]}"
)
clean_build_artifacts
end# Add internal testers in App Store Connect:
# 1. TestFlight → Internal Testing → +
# 2. Add App Store Connect users (Admin, App Manager, Developer)
# 3. They receive email invitation
# 4. Install TestFlight app → RedeemExternal Testing
lane :beta_external do
increment_build_number(
build_number: latest_testflight_build_number + 1
)
build_app(
scheme: "MyApp",
configuration: "Release",
export_method: "app-store"
)
upload_to_testflight(
api_key_path: "./fastlane/app_store_connect.json",
skip_waiting_for_build_processing: false, # Wait for processing
changelog: "External build #{lane_context[SharedValues::BUILD_NUMBER]}",
groups: ["External Testers"],
notify_external_testers: true,
# Test info
beta_app_description: "Test version of MyApp",
beta_app_feedback_email: "feedback@example.com",
marketing_url: "https://example.com",
privacy_url: "https://example.com/privacy",
terms_url: "https://example.com/terms"
)
clean_build_artifacts
end# Create external group:
# TestFlight → External Testing → + New Group
# Add testers by email (up to 10,000)
# Or: Public Link → Enable → Share link
# Testers must install TestFlight app firstBuild Processing
# After upload, build goes through processing:
# 1. "Processing" - Apple validates binary (5-30 min)
# 2. "Missing Compliance" - Export compliance needed
# 3. "Ready to Test" - Available to testers
# Check status:
fastlane testflight_build_information
# Or in App Store Connect: TestFlight → Builds# Wait for processing in lane
private_lane :wait_for_testflight_processing do
30.times do |i|
build = testflight_build_information(
api_key_path: "./fastlane/app_store_connect.json"
)
status = build[:build_status]
UI.message("Build status: #{status} (attempt #{i + 1}/30)")
if status == "VALID"
UI.success("Build processed successfully!")
break
elsif status == "INVALID" || status == "FAILED"
UI.error("Build failed: #{build[:build_status]}")
break
end
sleep(60)
end
endExport Compliance
# Required for all apps using encryption
# App Store Connect → App → App Information → Export Compliance
# Answer questions:
# - Does your app use encryption? (Yes/No)
# - Is it exempt? (Yes/No - most apps are exempt)
# - CCATS? (Only if not exempt)
# Fastlane: precheck includes export compliance check
lane :precheck_compliance do
precheck(
api_key_path: "./fastlane/app_store_connect.json",
include_in_app_purchases: false
)
endTestFlight Best Practices
# TestFlight Best Practices
## Build Management
- Increment build number for each upload
- Use semantic versioning: 1.0.0 (version) + 42 (build)
- Delete old builds to stay under limit (100 builds max)
- TestFlight builds expire after 90 days
## Testing Groups
- Internal: Team members, immediate feedback
- External: Real users, staged rollout
- Separate groups for: QA, stakeholders, public beta
## Feedback Collection
- Enable "Send Beta Feedback" in TestFlight settings
- Provide feedback email in upload
- Monitor: TestFlight → Feedback
- Respond to crash reports
## Crash Reporting
- TestFlight shows crashes automatically
- Integrate: Firebase Crashlytics, Sentry
- Symbolicate with dSYM files
- Fastlane: download_dsyms + upload_symbols_to_crashlytics
## Distribution
- Public link for open beta (no email needed)
- Invite link for controlled external testing
- TestFlight web clip for easy installationApp Store Connect Setup
# Before submission:
# 1. App Store Connect → My Apps → + New App
# 2. Platform: iOS
# 3. Name: MyApp (unique, 30 chars max)
# 4. Primary Language: English
# 5. Bundle ID: Select from dropdown
# 6. SKU: Internal identifier
# 7. User Access: Full AccessApp Metadata
# fastlane/deliver configuration
# fastlane/Deliverfile
app_identifier "com.example.myapp"
username "your@appleid.com"
team_id "YOUR_TEAM_ID"
# Metadata (overridden by fastlane/metadata/)
# Screenshots: fastlane/screenshots/
# App preview videos: fastlane/screenshots/*_preview.mp4
# Automatic release
automatic_release true
force true
skip_binary_upload false
skip_metadata false
skip_screenshots false
precheck_include_in_app_purchases false# fastlane/metadata/en-US/name.txt
MyApp
# fastlane/metadata/en-US/subtitle.txt
Amazing subtitle here
# fastlane/metadata/en-US/description.txt
Full app description for the App Store.
Supports multiple paragraphs.
Key features:
• Feature 1
• Feature 2
• Feature 3
# fastlane/metadata/en-US/keywords.txt
keyword1, keyword2, keyword3, keyword4, keyword5
# fastlane/metadata/en-US/support_url.txt
https://example.com/support
# fastlane/metadata/en-US/marketing_url.txt
https://example.com
# fastlane/metadata/en-US/privacy_url.txt
https://example.com/privacy
# fastlane/metadata/en-US/release_notes.txt
Version 1.0.0
• Initial release
• Feature A
• Feature B
Screenshots & App Previews
# Required sizes (iOS 17):
# iPhone 6.7" (15 Pro Max): 1290 x 2796 px
# iPhone 6.5" (11 Pro Max): 1242 x 2688 px
# iPhone 5.5" (8 Plus): 1242 x 2208 px
# iPad Pro 12.9": 2048 x 2732 px
# App Preview videos:
# - 15-30 seconds
# - 1080p or 4K
# - No audio required
# - Landscape or portrait
# Generate with Fastlane Snapshot:
fastlane screenshotsAge Rating
# App Store Connect → App → App Information → Age Rating
# Answer questionnaire honestly
# Determines: 4+, 9+, 12+, 17+
# Affects: Parental controls, visibilityIn-App Purchases
# App Store Connect → Features → In-App Purchases
# Types:
# - Consumable: Coins, gems (purchased multiple times)
# - Non-Consumable: Pro upgrade, remove ads (once)
# - Auto-Renewable Subscription: Monthly/yearly
# - Non-Renewing Subscription: Season pass
# Each needs:
# - Reference Name (internal)
# - Product ID (com.example.myapp.pro)
# - Price tier
# - Screenshot for review
# - Description for users
# - Review notes for AppleApp Review Guidelines
# Common Rejection Reasons
## 1. Crashes/Bugs
- Test on all supported devices
- Test offline, low memory, background
- Fix all crashes before submission
## 2. Incomplete Information
- Privacy policy URL required
- Support URL required
- Accurate metadata
## 3. Privacy Violations
- NSUserTrackingUsageDescription for IDFA
- NSLocationUsageDescription for location
- Camera/microphone usage descriptions
- Data collection disclosure
## 4. Guideline Violations
- 2.1: App completeness
- 2.3: Accurate metadata
- 3.1: Payments (use IAP for digital goods)
- 3.2: Subscriptions (proper setup)
- 4.2: Minimum functionality
- 5.1: Privacy
## 5. Design Issues
- Human Interface Guidelines
- iPhone X+ safe areas
- Dark mode support
- Dynamic Type supportSubmission Process
lane :release do
# 1. Ensure clean state
ensure_git_status_clean
ensure_git_branch(branch: 'main')
# 2. Version bump
version = UI.input("Version number (e.g., 1.0.0): ")
increment_version_number(version_number: version)
increment_build_number(build_number: latest_testflight_build_number + 1)
# 3. Build
build_release
# 4. Upload to TestFlight
upload_to_testflight(
api_key_path: "./fastlane/app_store_connect.json",
skip_waiting_for_build_processing: false,
groups: ["Internal Testers"]
)
# 5. Wait for processing
wait_for_testflight_processing
# 6. Submit for review
deliver(
api_key_path: "./fastlane/app_store_connect.json",
submit_for_review: true,
automatic_release: true,
force: true,
skip_metadata: false,
skip_screenshots: false,
precheck_include_in_app_purchases: false
)
# 7. Tag release
add_git_tag(tag: "v#{version}")
push_git_tags
clean_build_artifacts
endReview Timeline
# Typical timeline:
# 1. "Waiting for Review" - 1-24 hours
# 2. "In Review" - 1-3 days (usually < 24 hours)
# 3. "Pending Developer Release" - You control release
# 4. "Ready for Sale" - Live on App Store
# Expedited review (urgent bug fix):
# App Store Connect → App → Request Expedited Review
# Limited to once per month
# Rejection:
# - Read resolution center messages
# - Fix issues
# - Upload new build (same version, new build number)
# - ResubmitPhased Release
# After approval: Staged rollout
# App Store Connect → App → Pricing and Availability → Phased Release
# 1% → 2% → 5% → 10% → 20% → 50% → 100% (over 7 days)
# Can pause at any time
# Monitor: App Analytics → MetricsPost-Launch
# Post-Launch Checklist
## Monitoring
- [ ] App Store Connect → App Analytics
- [ ] Crashlytics / Sentry dashboards
- [ ] TestFlight crash reports
- [ ] User reviews (respond to 1-2 star)
## Updates
- [ ] Plan next version
- [ ] Collect user feedback
- [ ] Monitor competitors
- [ ] Update screenshots if needed
## Marketing
- [ ] Press kit ready
- [ ] Social media announcements
- [ ] App Store badge on website
- [ ] ASO optimization
## Technical
- [ ] Renew certificates (yearly)
- [ ] Update provisioning profiles
- [ ] Test on new iOS beta
- [ ] Update dependenciesTry It
Upload build to TestFlight. Add internal/external testers. Complete metadata. Submit for review. Monitor review status.
fastlane beta
fastlane deliver
# Or use Xcode: Product → Archive → Distribute AppApp Store deployment
- Set up App Store Connect app record
- Configure Fastlane deliver with metadata
- Generate screenshots with Snapshot
- Upload build to TestFlight (internal)
- Test with external group
- Complete App Store metadata
- Submit for review
- Handle any rejections
- Release with phased rollout
TestFlight: Internal (100) + External (10k). Builds process in 5-30 min. Export compliance required. Metadata in fastlane/metadata/. Submit with deliver. Review: 1-3 days. Phased release for gradual rollout. Monitor crashes and reviews post-launch.
Resources
- TestFlight: https://developer.apple.com/testflight/
- App Store Connect: https://appstoreconnect.apple.com/
- App Review Guidelines: https://developer.apple.com/app-store/review/guidelines/
- Fastlane Deliver: https://docs.fastlane.tools/actions/deliver/