Enterprise-grade iOS TestFlight automation platform with intelligent certificate management
Deploy iOS apps to TestFlight in under 1 minute with complete automation from certificates to processing verification
β v2.13.0 STATUS: PRODUCTION READY - Enterprise-grade iOS automation platform with privacy validation, automatic TestFlight conflict resolution and bulletproof certificate management.
Most iOS automation tools fail at scale. This platform solves the real problems teams face:
- π 4+ hours per deployment with manual TestFlight uploads
- π₯ Certificate hell - only works on one developer's machine
β οΈ Version conflicts cause constant deployment failures- π§ xcrun altool failures due to API key location issues
- π₯ Team collaboration impossible - new developers take days to set up
- β‘ 1-minute deployments with complete end-to-end automation
- π― 100% TestFlight success rate with verified xcrun altool integration
- π‘οΈ Enhanced CI/CD compatibility - seamless integration with all automation platforms
- π Enhanced TestFlight confirmation - wait for Apple processing with real-time status
- π Advanced logging & audit trails - comprehensive upload tracking
- π Smart provisioning profile reuse - no more unnecessary profile creation
- π€ 5-minute team onboarding - any developer can deploy instantly
- π’ Multi-team support - complete isolation between Apple Developer teams
- π§ Smart TestFlight version checking prevents upload conflicts
- π Temporary keychain security - complete isolation from system keychain
- ποΈ Clean Architecture Foundation - domain-driven design with 95%+ test coverage
- π Monolithic Stability - proven reliability with comprehensive business logic
- π― Apple API Integration - clean abstraction layer for all Apple services
PROBLEM SOLVED: Prevent TestFlight upload failures due to missing privacy purpose strings (ITMS-90683)
BREAKTHROUGH FEATURES:
- β Pre-Upload Privacy Validation - Catch ITMS-90683 errors before TestFlight upload
- β 15+ Privacy Usage Keys - Comprehensive validation for all iOS privacy APIs
- β Clean Architecture Implementation - Domain-driven design with 95%+ test coverage
- β Smart Info.plist Detection - Automatic project file discovery and validation
- β Three Validation Modes - strict (fail), warn (continue), skip (bypass)
- β
Unified Validation System -
apple-deploy validatewith scope support for targeted checking - β Educational Error Messages - Step-by-step fix instructions with Apple documentation links
- β Quality Analysis - Detects placeholder text and insufficient purpose string descriptions
PRIVACY KEYS VALIDATED:
- Media Access: Camera, Microphone, Photo Library, Music Library
- Location Services: When-in-Use, Always, Background tracking
- Personal Data: Contacts, Calendars, Reminders
- Device Capabilities: Speech Recognition, Face ID, Motion Data, Bluetooth
- Health & Fitness: HealthKit read/write permissions
- Network & Tracking: Local Network, User Tracking Transparency
INTEGRATION METHODS:
# 1. Automatic (default) - integrated into deployment pipeline
apple-deploy deploy privacy_validation="strict" [...]
# 2. Standalone validation
apple-deploy validate scope="privacy" scheme="MyApp"
# 3. Custom modes
apple-deploy deploy privacy_validation="warn" [...] # Continue with warnings
apple-deploy deploy privacy_validation="skip" [...] # Bypass validationERROR PREVENTION:
- π¨ ITMS-90683: Missing purpose string in Info.plist
- π¨ ITMS-90672: App references privacy-sensitive APIs
- π¨ App Store Review: Privacy-related rejection patterns
- π¨ TestFlight Processing: Upload failures due to privacy compliance
How to Upgrade:
brew upgrade apple-deployPROBLEM SOLVED: Fastfile displays incorrect version numbers (1.0.0, build 1) instead of actual project values
FIXED ISSUES:
- β Enhanced project file detection - robust multi-strategy search for .xcodeproj files
- β Improved version parsing - better regex patterns for MARKETING_VERSION and CURRENT_PROJECT_VERSION
- β Working directory diagnostics - detailed logging shows exactly where files are searched
- β Robust error handling - graceful fallback with comprehensive error reporting
TECHNICAL DETAILS:
- Root Cause: Project file detection failed in Homebrew environment due to working directory assumptions
- Solution: Multi-strategy detection (scheme-based β glob pattern β direct file) with detailed logging
- Result: Fastfile now correctly displays the same version numbers as the actual IPA build
How to Upgrade:
brew upgrade apple-deployPROBLEM SOLVED: Fastfile couldn't find project files with different naming patterns, causing version fallback to defaults
FIXED ISSUES:
- β Enhanced project file detection - tries multiple file path patterns automatically
- β Robust glob pattern matching - finds .xcodeproj files regardless of name
- β Better error diagnostics - shows exactly which paths were tried when file not found
- β Universal compatibility - works with any iOS project structure and naming convention
TECHNICAL DETAILS:
- Root Cause: Fastfile assumed specific project file naming (./scheme.xcodeproj/project.pbxproj)
- Solution: Multi-pattern search including glob patterns for .xcodeproj detection
- Result: Automatic version reading works regardless of project file location or name
How to Upgrade:
brew upgrade apple-deployPROBLEM SOLVED: Deploy.sh updates versions correctly but Fastfile uses wrong version numbers, causing upload conflicts
FIXED ISSUES:
- β Version sync between deploy.sh and Fastfile - both now read from same Xcode project source
- β Eliminates "build already exists" false positives - conflict resolution now uses correct version numbers
- β Proper project file integration - Fastfile reads MARKETING_VERSION and CURRENT_PROJECT_VERSION directly
- β Enhanced logging - shows exactly which version numbers are being used for upload
TECHNICAL DETAILS:
- Root Cause: Fastfile was using hardcoded fallback values (1.0.0, build 1) instead of reading updated project values
- Solution: Direct project.pbxproj parsing in Fastfile to match deploy.sh behavior
- Result: 100% version consistency between conflict detection and actual upload
How to Upgrade:
brew upgrade apple-deployPROBLEM SOLVED: "Build number already exists" errors causing deployment failures
NEW FEATURES:
- β Intelligent build conflict detection - automatically queries TestFlight for existing builds
- β Zero-config resolution - automatically increments build numbers when conflicts exist
- β Integrated with all version strategies - patch, minor, and major all include conflict resolution
- β Prevents upload failures - eliminates "build already exists" errors completely
- β Smart retry logic - tries up to 10 different build numbers automatically
UPGRADE BENEFITS:
- π 100% success rate - no more deployment failures due to build conflicts
- β‘ Zero manual intervention - system handles conflicts automatically
- π§ Intelligent querying - real-time TestFlight integration via xcrun altool
- π‘οΈ Simplified workflow - removed confusing sync/auto options, conflict resolution built into patch/minor/major
How to Upgrade:
brew upgrade apple-deployπ‘ Technical Details: The system uses
xcrun altool --list-buildsto query existing TestFlight builds and automatically increments build numbers when conflicts are detected. See Technical Implementation for details.
PROBLEM SOLVED: "Invalid trust settings. Restore system default trust settings for certificate" errors in CI/CD environments
NEW FEATURES:
- β Automatic certificate trust configuration - works silently in the background
- β Universal CI/CD compatibility - seamless integration with Jenkins, GitHub Actions, GitLab CI, etc.
- β Zero configuration required - fix applies automatically to all projects and teams
- β Enhanced keychain security - bulletproof cleanup and emergency fallback handling
- β Non-interactive operation - perfect for automated deployment pipelines
UPGRADE BENEFITS:
- π Eliminates build failures from certificate trust issues
- π‘οΈ Works across all certificate types - Development, Distribution, Enterprise
- β‘ Faster deployments - no more manual certificate troubleshooting
- π€ Team collaboration - consistent behavior across all developer machines
How to Upgrade:
brew upgrade apple-deployπ‘ Technical Details: The fix uses
security set-key-partition-listto grant certificate trust permissions automatically during keychain setup. See Technical Implementation Notes for implementation details.
# Install via Homebrew (recommended)
brew tap snooky23/tools
brew install apple-deploy
# To upgrade to latest version with privacy validation:
brew upgrade apple-deployπ NEW in v2.13.0: MAJOR FEATURE - Privacy validation prevents TestFlight upload failures! See What's New for details.
- Visit App Store Connect API Keys
- Create API key with App Manager role
- Download the
AuthKey_XXXXX.p8file - Note your Key ID and Issuer ID
# Navigate to your iOS project directory
cd /path/to/your-ios-app
# Initialize project structure
apple-deploy init
# Place your API key (will be auto-detected)
mv ~/Downloads/AuthKey_XXXXX.p8 apple_info/
# π Deploy to TestFlight
apple-deploy deploy \
apple_info_dir="./apple_info" \
team_id="YOUR_TEAM_ID" \
app_identifier="com.yourcompany.app" \
apple_id="your@email.com" \
api_key_id="YOUR_KEY_ID" \
api_issuer_id="your-issuer-uuid" \
app_name="Your App" \
scheme="YourScheme"# Add the tap and install
brew tap snooky23/tools
brew install apple-deploy
# Verify installation
apple-deploy version# Clone repository
git clone https://github.com/snooky23/apple-deploy.git
cd apple-deploy
# Install Ruby dependencies
bundle install
# Ready to use from any iOS project directory| Command | Purpose |
|---|---|
apple-deploy deploy |
Complete TestFlight deployment with privacy validation |
apple-deploy validate |
Unified validation system with flexible scope targeting |
apple-deploy status |
Check TestFlight build status and environment health |
apple-deploy verify_build |
Standalone IPA verification and integrity checks |
apple-deploy init |
Initialize project structure |
apple-deploy setup_certificates |
Setup certificates & profiles |
apple-deploy help |
Show usage information |
apple-deploy version |
Show version information |
What it does: Full end-to-end deployment from code to TestFlight
- β NEW: Validates privacy usage descriptions (prevents ITMS-90683)
- β Creates/imports certificates automatically
- β Builds your iOS app with proper signing
- β Uploads to TestFlight with version management
- β Monitors processing until "Ready to Test"
apple-deploy deploy \
apple_info_dir="./apple_info" \
team_id="ABC1234567" \
app_identifier="com.mycompany.myapp" \
apple_id="developer@mycompany.com" \
api_key_id="ABCD123456" \
api_issuer_id="12345678-1234-1234-1234-123456789012" \
app_name="My Awesome App" \
scheme="MyApp"Output example:
π Setting up certificates... β
Complete
π Building MyApp (Release)... β
Complete
π€ Uploading to TestFlight... β
Complete
β±οΈ Processing status: Ready to Test (2m 34s)
π Successfully deployed v1.2.3 build 45 to TestFlight!
What it does: Validates privacy usage descriptions to prevent TestFlight upload failures
- β Prevents ITMS-90683 errors before TestFlight upload
- β 15+ privacy keys validated (Camera, Location, Contacts, Speech Recognition, etc.)
- β Smart Info.plist detection automatically finds your project's Info.plist
- β Quality analysis detects placeholder text and insufficient descriptions
- β Educational guidance with step-by-step fix instructions
# Basic validation (auto-detects Info.plist)
apple-deploy validate scope="privacy" scheme="MyApp"
# Custom Info.plist path
apple-deploy validate scope="privacy" info_plist_path="./MyApp/Info.plist"
# Strict mode (warnings become errors)
apple-deploy validate scope="privacy" scheme="MyApp" strict_mode="true"Output example:
π Privacy Validation
β
Camera access: 'This app uses the camera to scan documents'
β
Location when in use: 'This app uses location to find nearby stores'
β Speech recognition (NSSpeechRecognitionUsageDescription): Missing description
π‘ Fix Instructions:
1. Open your Info.plist file in Xcode
2. Add missing privacy usage description keys
3. Provide clear, user-friendly explanations
π Privacy Guide: https://developer.apple.com/documentation/...
Privacy Keys Checked:
- Camera, Microphone, Photo Library access
- Location services (when-in-use, always)
- Personal data (Contacts, Calendars, Reminders)
- Device capabilities (Speech Recognition, Face ID, Motion)
- Health & Fitness data, Bluetooth, Local Network
- User Tracking Transparency (iOS 14.5+)
What it does: Comprehensive validation system with flexible scope targeting
- β Environment validation - Xcode, tools, and system requirements
- β Network connectivity - Internet connection and Apple services
- β API credentials - App Store Connect authentication
- β Privacy validation - Info.plist privacy usage descriptions
- β Certificate health - Certificate and profile validation
- β Project structure - App configuration and build settings
# Complete validation suite
apple-deploy validate \
apple_info_dir="./apple_info" \
team_id="ABC1234567" \
app_identifier="com.mycompany.myapp" \
scheme="MyApp"
# Quick validation (environment and network only)
apple-deploy validate mode="quick"
# Scope-based validation (specific domains)
apple-deploy validate scope="privacy" scheme="MyApp"
apple-deploy validate scope="environment,network"
apple-deploy validate scope="privacy,certs" team_id="ABC1234567"
# Predefined scope combinations
apple-deploy validate scope="essential" # environment + network + authOutput example:
π‘οΈ Unified Validation System
β
Environment: Xcode 15.2, Command Line Tools installed
β
Network: Connected to Apple Developer services
β
API Credentials: Valid App Store Connect authentication
β
Privacy: All required usage descriptions present
β
Certificates: Valid distribution certificate found
β
Project: App configuration ready for deployment
π All validation checks passed! Ready for deployment.
Validation Scopes:
environment- Xcode, Command Line Tools, system requirementsnetwork- Internet connectivity, Apple Developer servicesauth/authentication- App Store Connect API credentialsprivacy- Info.plist privacy usage descriptionscerts/certificates- Code signing certificates and profilesproject- Xcode project configuration and build settings
Predefined Combinations:
all- Complete validation suite (default)quick- Environment and network only (fastest)essential- Environment, network, and authentication
What it does: Checks TestFlight build status and environment health
- β TestFlight monitoring - Latest build processing status
- β Build history - Last 5 builds with status and metadata
- β Environment check - Certificate and profile health
- β API connectivity - App Store Connect service status
- β Team configuration - Audit of team setup and credentials
# Check specific app status
apple-deploy status \
apple_info_dir="./apple_info" \
team_id="ABC1234567" \
app_identifier="com.mycompany.myapp"
# Quick environment check only
apple-deploy status environment_only="true"Output example:
π TestFlight Status & Environment Health
π Latest Build: v1.2.3 build 45
π Status: Ready to Test (processed in 2m 34s)
β° Uploaded: 2025-01-15 14:32:15 UTC
π Recent Builds:
β
v1.2.3 (45) - Ready to Test - 2 hours ago
β
v1.2.2 (44) - Ready to Test - 1 day ago
β οΈ v1.2.1 (43) - Rejected - 3 days ago
β
v1.2.0 (42) - Ready to Test - 5 days ago
π Environment:
β
Certificates: 2 valid (expires in 347 days)
β
Profiles: 1 active provisioning profile
β
API Access: Connected to App Store Connect
What it does: Standalone verification of built IPA files
- β Code signing verification - Validates signing integrity
- β IPA structure analysis - Checks app bundle structure
- β Version validation - Confirms version and build numbers
- β Size analysis - App size and performance metrics
- β Quality checks - Detects common build issues
# Verify specific IPA file
apple-deploy verify_build \
ipa_path="./build/MyApp.ipa" \
expected_version="1.2.3" \
expected_build="45"
# Auto-detect latest build
apple-deploy verify_build scheme="MyApp"Output example:
π IPA Verification & Integrity Check
π± App: MyApp v1.2.3 build 45
π¦ Size: 14.2 MB (optimized)
π Signing: Valid distribution signature
π Bundle: Proper app structure detected
β
Code signing verified with Apple certificate
β
IPA structure follows Apple guidelines
β
Version numbers match expectations
β
App size within reasonable limits
β
No critical issues detected
π IPA ready for TestFlight upload!
What it does: Creates and imports certificates/profiles without building
- β Downloads existing certificates from Apple Developer Portal
- β Creates new certificates if needed (respects Apple's 2 dev + 3 distribution limit)
- β Generates provisioning profiles for your app
- β Imports everything to temporary keychain for signing
apple-deploy setup_certificates \
apple_info_dir="./apple_info" \
team_id="ABC1234567" \
app_identifier="com.mycompany.myapp"Output example:
π Checking existing certificates...
π₯ Found 1 development, 2 distribution certificates
β¨ Creating new development certificate
π Generating provisioning profile for com.mycompany.myapp
π Importing certificates to keychain
β
Certificate setup complete! Ready for deployment.
What it does: Sets up the apple_info directory structure in current directory
- β
Creates
apple_info/directory with proper structure - β
Generates
config.envtemplate with your team settings - β Creates subdirectories for certificates and profiles
- β Provides next-steps guidance
π‘ Pro Tip: You can run this anywhere - in your iOS project, in a shared team directory, or in a dedicated credentials folder. No Xcode project required!
# Option 1: Initialize in your iOS project directory
cd /path/to/MyAwesomeApp
apple-deploy init
# Option 2: Initialize in a shared credentials directory
cd /shared/ios-team-credentials
apple-deploy init
# Option 3: Initialize anywhere you want to store Apple credentials
mkdir ~/my-ios-credentials && cd ~/my-ios-credentials
apple-deploy initWhat it creates:
current-directory/
βββ apple_info/ # π Created by init
β βββ certificates/ # π For .p12 files
β βββ profiles/ # π For .mobileprovision files
β βββ config.env # π Template configuration
βββ (other files in current directory remain unchanged)
Output example:
π Initializing Apple Deploy structure...
π Created: apple_info/certificates/
π Created: apple_info/profiles/
π Created: apple_info/config.env (from template)
β
Project initialized successfully!
NEXT STEPS:
1. Add your Apple Developer credentials to apple_info/:
- API key file: apple_info/AuthKey_XXXXX.p8
- Certificates: apple_info/certificates/*.p12
2. Edit apple_info/config.env with your team details
3. Run your first deployment:
apple-deploy deploy team_id="YOUR_TEAM_ID" app_identifier="com.your.app" [...]
team_id="YOUR_TEAM_ID" # Apple Developer Team ID (10-character)
app_identifier="com.yourcompany.app" # Bundle identifier (reverse DNS)
apple_id="your@email.com" # Apple Developer account email
api_key_id="YOUR_KEY_ID" # App Store Connect API Key ID
api_issuer_id="your-issuer-uuid" # API Issuer ID (UUID format)
app_name="Your App Name" # Display name for TestFlight
scheme="YourScheme" # Xcode build scheme name# Apple Credentials Directory
apple_info_dir="./apple_info" # Apple credentials directory (default: ./apple_info)
apple_info_dir="/path/to/shared/apple_info" # Or absolute path for shared/custom locations
# API Key (auto-detected if not specified)
api_key_path="AuthKey_XXXXX.p8" # API key filename (auto-detected)
# Version Management
version_bump="patch" # patch|minor|major (default: patch)
# Build Configuration
configuration="Release" # Build configuration (default: Release)
# TestFlight Options
testflight_enhanced="true" # Enhanced confirmation & logging (default: false)
# Privacy Validation (NEW!)
privacy_validation="strict" # strict|warn|skip (default: strict)
privacy_validation="warn" # Continue deployment with warnings
privacy_validation="skip" # Bypass privacy validation entirely
# Security
p12_password="YourPassword" # P12 certificate password (prompts if needed)/path/to/secure/apple_info/ # Shared credentials directory
βββ YOUR_TEAM_ID/ # Team ID directory
β βββ AuthKey_XXXXX.p8 # Team's API key
β βββ certificates/ # Team certificates (P12 files)
β β βββ development.p12 # Development certificate
β β βββ distribution.p12 # Distribution certificate
β βββ profiles/ # Provisioning profiles
β β βββ Development_*.mobileprovision
β β βββ AppStore_*.mobileprovision
β βββ config.env # Team configuration
βββ ABC1234567/ # Another team
βββ DEF7890123/ # Third team
my_app/ # Your iOS app directory
βββ MyApp.xcodeproj # Xcode project
βββ MyApp.xcworkspace # Xcode workspace (if using CocoaPods)
βββ fastlane/ # Runtime scripts (auto-copied)
my_app/
βββ apple_info/ # Local Apple credentials
β βββ YOUR_TEAM_ID/ # Team ID directory
β β βββ AuthKey_XXXXX.p8 # API key
β β βββ certificates/ # P12 certificates
β β βββ profiles/ # Provisioning profiles
β β βββ config.env # Configuration
β βββ ABC1234567/ # Another team
βββ MyApp.xcodeproj/ # Xcode project
βββ fastlane/ # Runtime scripts
For developers joining an existing team with shared certificates
# 1. Install apple-deploy and get project
brew tap snooky23/tools && brew install apple-deploy
git clone your-team-ios-project && cd your-app
# 2. Initialize and import team certificates
apple-deploy init
# Copy shared team credentials to apple_info/
# 3. Deploy immediately - it just works!
apple-deploy deploy \
apple_info_dir="./apple_info" \
team_id="YOUR_TEAM_ID" \
app_identifier="com.yourteamapp" \
apple_id="your@email.com" \
api_key_id="YOUR_KEY_ID" \
api_issuer_id="your-issuer-uuid" \
app_name="Your App" \
scheme="YourScheme"For the first person setting up certificates for the entire team
# 1. Install and initialize team project
brew tap snooky23/tools && brew install apple-deploy
cd your-team-app && apple-deploy init
# 2. Create and export team certificates
apple-deploy deploy \
apple_info_dir="./apple_info" \
team_id="YOUR_TEAM_ID" \
app_identifier="com.yourteamapp" \
apple_id="your@email.com" \
api_key_id="YOUR_KEY_ID" \
api_issuer_id="your-issuer-uuid" \
app_name="Your Team App" \
scheme="YourScheme"
# 3. Share apple_info/ directory with team
# Team members copy the apple_info/ folder to their projects- β One-time certificate setup by team lead creates shared P12 files
- β 5-minute onboarding for any new team member
- β Cross-machine compatibility - certificates work on any Mac
- β Shared Apple Developer account - no individual accounts needed
- β Team isolation - complete separation between different teams/projects
# Semantic versioning with automatic conflict resolution
apple-deploy deploy apple_info_dir="./apple_info" version_bump="patch" [...] # 1.0.0 β 1.0.1
apple-deploy deploy apple_info_dir="./apple_info" version_bump="minor" [...] # 1.0.0 β 1.1.0
apple-deploy deploy apple_info_dir="./apple_info" version_bump="major" [...] # 1.0.0 β 2.0.0π NEW: Automatic Build Number Conflict Resolution
- β Intelligent TestFlight checking - queries existing builds before upload
- β Zero-config conflict resolution - automatically increments build numbers when conflicts exist
- β Works with all version_bump types - patch, minor, and major all include conflict resolution
- β Prevents upload failures - no more "build already exists" errors
How it works:
- Increment version according to your chosen strategy (patch/minor/major)
- Automatically check TestFlight for existing builds with that version
- If build number conflicts exist, automatically increment until finding an available number
- Upload with guaranteed unique version + build combination
Example automatic resolution:
# You request: version 1.0.5, build 32
# TestFlight has: builds 32, 33, 34 for version 1.0.5
# System resolves: automatically uses build 35
# Result: Upload succeeds with version 1.0.5 build 35# Standard upload (fast) - 3-5 minutes total
apple-deploy deploy apple_info_dir="./apple_info" [...]
# Enhanced mode - wait for Apple processing completion
apple-deploy deploy apple_info_dir="./apple_info" testflight_enhanced="true" [...]
# Check TestFlight status anytime
apple-deploy status apple_info_dir="./apple_info" team_id="YOUR_TEAM_ID" app_identifier="com.yourapp"Enhanced Mode Features:
- β±οΈ Upload duration tracking with performance metrics
- π Real-time processing status monitoring
- π Build history display (last 5 TestFlight builds)
- π Advanced audit logging in config.env
- β Processing confirmation until "Ready to Test"
The platform uses intelligent build logic that automatically resolves common signing issues:
Attempt 1: Automatic Signing β‘
- Lets Xcode handle signing automatically
- Fastest approach for properly configured projects
Attempt 2: Manual Signing with Smart Matching π§
- Automatically switches to manual signing
- Intelligently matches certificate types to profile types:
- AppStore profiles β Distribution certificates
- Development profiles β Development certificates
- Configures Xcode project with correct certificate/profile pairs
Attempt 3: Certificate Mismatch Recovery π§
- Detects "doesn't include signing certificate" errors
- Analyzes keychain for available certificates
- Automatically reconfigures project with correct certificate
- Updates project.pbxproj directly if needed
- β Certificate Type Mismatches: AppStore profiles matched with development certificates
- β "Provisioning profile required" errors: Automatic project configuration
- β "Doesn't include signing certificate" errors: Smart certificate selection
- β Manual intervention: Complete automation of signing configuration
| Metric | Traditional | Automated | Improvement |
|---|---|---|---|
| Deployment Time | 2-4 hours | ~1 minute | 98% faster |
| TestFlight Success | 60-80% | 100% | Eliminates failures |
| Team Onboarding | 2-3 days | 5 minutes | 99% faster |
| Version Conflicts | 15-30% fail | 0% conflicts | 100% reliable |
π Certificate Setup: 4 seconds
π Project Validation: 1 second
π Version Management: 1 second (auto-increment from TestFlight)
π¨ iOS Build Process: 15 seconds
βοΈ TestFlight Upload: 40 seconds (14.1MB/s transfer)
β
Upload Verification: 1 second
βββββββββββββββββββββββββββββββββββββββββ
π« Total Pipeline: ~67 seconds
π Upload Status: SUCCESS (0 warnings, 0 messages)
# Test your environment before deployment
apple-deploy status \
apple_info_dir="/path/to/secure/apple_info" \
team_id="YOUR_TEAM_ID" \
app_identifier="com.yourapp"
# Test privacy validation specifically
apple-deploy validate scope="privacy" scheme="YourScheme"π Privacy Validation Issues (NEW!)
The most common cause of TestFlight upload failures in iOS apps
π¨ ITMS-90683 Error: Missing purpose string in Info.plist
Your app's code references one or more APIs that access sensitive user data.
The Info.plist file should contain a NSSpechRecognitionUsageDescription key
with a user-facing purpose string explaining clearly and completely why your
app needs the data.
β IMMEDIATE FIX:
# 1. Run privacy validation to see exactly what's missing
apple-deploy validate scope="privacy" scheme="YourApp"
# 2. Add missing keys to your Info.plist in Xcode:
# - Right-click Info.plist β Open As β Property List
# - Add the missing keys with clear descriptionsπ EXAMPLE PRIVACY STRINGS:
<key>NSCameraUsageDescription</key>
<string>This app uses the camera to scan documents and capture photos for your profile.</string>
<key>NSSpeechRecognitionUsageDescription</key>
<string>This app uses speech recognition to convert voice commands into text for hands-free operation.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>This app uses your location to show nearby restaurants and provide directions.</string>π§ VALIDATION MODES:
# Strict mode (stops deployment on privacy issues)
apple-deploy deploy privacy_validation="strict" [...]
# Warning mode (continues with warnings)
apple-deploy deploy privacy_validation="warn" [...]
# Skip validation (not recommended)
apple-deploy deploy privacy_validation="skip" [...]π PRIVACY KEYS REFERENCE:
NSCameraUsageDescription- Camera accessNSMicrophoneUsageDescription- Microphone accessNSPhotoLibraryUsageDescription- Photo library accessNSLocationWhenInUseUsageDescription- Location when in useNSSpeechRecognitionUsageDescription- Speech recognitionNSContactsUsageDescription- Contacts accessNSFaceIDUsageDescription- Face ID authenticationNSUserTrackingUsageDescription- App tracking transparency (iOS 14.5+)
π‘ BEST PRACTICES:
- Be specific about WHY you need the permission
- Avoid generic phrases like "This app uses your camera"
- Explain the user benefit clearly
- Use friendly, non-technical language
- Test with
apple-deploy validate scope="privacy"before deployment
π¨ "API key file not found" Error
Quick Fix:
# Check your API key path
ls -la /path/to/secure/apple_info/YOUR_TEAM_ID/AuthKey_*.p8
# If not found, move it to the right location
mv ~/Downloads/AuthKey_*.p8 /path/to/secure/apple_info/YOUR_TEAM_ID/Directory structure should look like:
/path/to/secure/apple_info/
βββ YOUR_TEAM_ID/
βββ AuthKey_XXXXX.p8 β Must be here
βββ certificates/
βββ profiles/
π¨ "App icon is missing" or TestFlight Upload Fails
This is the #1 cause of first-time deployment failures!
Apple requires a proper app icon before TestFlight uploads. The build will fail with errors like:
- "The app bundle does not contain an app icon for iPhone"
- "App icon is missing"
- "Invalid bundle - missing CFBundleIconName"
Quick Fix:
-
Add App Icon to Xcode Project:
YourApp.xcodeproj β Assets.xcassets β AppIcon -
Required Icon Sizes (iOS):
- 20x20, 29x29, 40x40, 58x58, 60x60, 76x76, 80x80, 87x87, 120x120, 152x152, 167x167, 180x180, 1024x1024
-
Quick Solution - Use App Icon Generator:
- Visit appicon.co or similar
- Upload your 1024x1024 icon
- Download and drag all sizes into Xcode's AppIcon asset
-
Verify Icon is Set:
# Check your project settings apple-deploy status apple_info_dir="./apple_info" team_id="YOUR_TEAM_ID" app_identifier="com.yourapp"
After adding the icon, retry deployment - it should work immediately! β
π¨ "Missing required apple_info_dir parameter"
The apple_info_dir parameter is only required for custom locations. For local projects, it defaults to ./apple_info:
# β
Local project (after apple-deploy init) - parameter optional
apple-deploy deploy \
team_id="YOUR_TEAM_ID" \
app_identifier="com.yourapp" [...]
# β
Custom/shared location - specify absolute path
apple-deploy deploy \
apple_info_dir="/Users/john/shared_apple_info" \
team_id="YOUR_TEAM_ID" [...]π¨ TestFlight upload fails with API key errors
This has been resolved in production. The platform automatically handles xcrun altool API key location requirements:
- Copies your API key to
~/.appstoreconnect/private_keys/ - Runs the upload command
- Cleans up the temporary API key copy
No action required - this works automatically.
β οΈ "Version already exists on TestFlight"
The platform prevents this automatically by checking TestFlight for the latest build number and incrementing appropriately.
Manual version control:
# Force version increment
apple-deploy deploy \
apple_info_dir="./apple_info" \
version_bump="patch" \
team_id="YOUR_TEAM_ID" [...]π¨ "Invalid trust settings" Certificate Error (FIXED in v2.12.3)
Error Message:
β Invalid trust settings. Restore system default trust settings for certificate
"Apple Distribution: Your Name (TEAM_ID)" in order to sign code with it.What This Means: CI/CD environments and some developer machines reject certificates for code signing due to security restrictions, even when certificates are valid.
β AUTOMATICALLY FIXED in v2.12.3:
- Universal certificate trust solution works automatically in background
- Zero configuration required - applies to all projects and teams
- CI/CD compatible - completely non-interactive operation
- Works with all certificate types - Development, Distribution, Enterprise
How to Get the Fix:
# Upgrade to v2.12.3
brew upgrade apple-deploy
# Verify version
apple-deploy version # Should show v2.12.7+Note: This fix is automatic and requires no configuration. It works silently during certificate setup.
π¨ "Not in an iOS project directory" Error (FIXED in v2.12.2)
Error Message:
β Error: Not in an iOS project directory
Please run this command from your iOS project root directoryβ FIXED in v2.12.2:
- Improved project detection works correctly from any valid iOS project
- Enhanced working directory handling prevents location confusion
How to Get the Fix:
# Upgrade to v2.12.2+
brew upgrade apple-deploy
# Test from your iOS project directory
cd /path/to/your-ios-project
apple-deploy help # Should work without errorsEnable detailed logging:
DEBUG_MODE=true VERBOSE_MODE=true \
apple-deploy deploy apple_info_dir="./apple_info" [...]
# Check the generated log file
cat build/logs/deployment_*.logPROBLEM SOLVED: "Invalid trust settings. Restore system default trust settings for certificate" errors
CI/CD environments often failed with certificate trust errors during code signing, even when certificates were valid and properly imported.
- Generic certificate trust permissions via
security set-key-partition-list - Works with ANY keychain path and ANY certificates
- CI/CD compatible - completely non-interactive operation
- Emergency keychain cleanup - prevents accumulation in failed deployments
- Bulletproof error handling - graceful degradation if trust setting fails
- Core Implementation:
scripts/domain/use_cases/setup_keychain.rb:283-302 - Integration Point: Runs automatically after keychain creation
- Zero Configuration - works out of the box for all projects and teams
Result: Universal fix that resolves certificate trust issues across all iOS projects, certificate types, and CI/CD environments.
- Production-Verified TestFlight Pipeline with xcrun altool integration
- Enhanced Certificate Management - seamless CI/CD integration with automatic configuration
- Intelligent Certificate/Profile Matching with automatic type detection and alignment
- Smart Provisioning Profile Management with reuse capabilities
- 3-Attempt Build Failover System with automatic signing configuration
- Multi-Team Directory Structure with complete team isolation
- Intelligent Version Management with TestFlight conflict prevention
- Advanced Keychain Security - complete isolation with enterprise-grade certificate management
- Enhanced TestFlight Confirmation with real-time status polling
- Domain-Driven Design with comprehensive business logic in Ruby entities
- 95%+ Test Coverage with 1,600+ lines of unit tests across domain entities
- Dependency Injection Container with advanced service management and health checks
- Repository Pattern Interfaces with 80+ methods for clean system integration
- Modular Use Case Extraction for key workflows with proven stability
- Apple API Abstraction Layer for certificate and profile operations
- Certificate Entity: 445 lines of business logic with Apple certificate limits
- ProvisioningProfile Entity: 600+ lines with wildcard matching and platform support
- Application Entity: 650+ lines with semantic versioning and App Store validation
- Comprehensive Unit Tests: Certificate (279 lines), Profile (695 lines), Application (699 lines)
- Battle-Tested Monolithic Design with proven FastLane integration
- Temporary API Key Handling with automatic cleanup
- Isolated Keychain System with zero system interference
- Comprehensive Audit Logging with deployment history tracking
- Team Directory Isolation with secure file permissions
- Business Rule Validation with comprehensive error checking and edge case handling
- β MAJOR: Working Directory Fix - Fixed CLI wrapper to execute from user's project directory instead of installation directory
- π RESOLVED: "No Xcode project found" Error - apple-deploy now correctly detects .xcodeproj files from your iOS project
- π§ WORKING: Complete Deployment Flow - All commands (deploy, build_and_upload, setup_certificates) now function properly
- β‘ TESTED: End-to-End Verification - Full deployment pipeline verified and operational
- β Project Detection Fix - Fixed iOS project directory detection for proper .xcodeproj recognition
- π Enhanced CLI Validation - Improved project structure validation in apple-deploy command
- π§ Better Error Messages - Clearer feedback when not in iOS project directory
- β
Command Alignment - Changed command from
ios-deploytoapple-deployfor consistency - π Unified Branding - All references now use "Apple Deploy" instead of "iOS FastLane Auto Deploy"
- π Version Management - Updated all components to v2.12.0 for consistency
- π§ Enhanced User Experience - Cleaner command interface aligned with package name
- π Documentation Updates - All docs updated to reflect new command structure
- β Homebrew Installation Fixed - Resolved file overwrite conflicts during installation
- π Enhanced Keychain Cleanup - Fixed .ff* temporary file accumulation issues
- π Improved Error Handling - Better cleanup and installation process
- β 100% TestFlight Success Rate - Proven end-to-end deployment capability
- β xcrun altool Integration - Fixed API key location issues for reliable uploads
- β Enhanced Processing Monitoring - Real-time TestFlight build status tracking
- β Smart Version Conflict Resolution - Automatic handling of build number conflicts
- β Multi-Team Directory Structure - Complete team isolation and collaboration support
Deploy your iOS app in 1 minute instead of 4 hours
β Production-verified with successful TestFlight uploads
brew tap snooky23/tools
brew install apple-deploycd /path/to/your-ios-app
apple-deploy initapple-deploy deploy \
apple_info_dir="./apple_info" \
team_id="YOUR_TEAM_ID" \
app_identifier="com.yourapp" \
apple_id="your@email.com" \
api_key_id="YOUR_KEY_ID" \
api_issuer_id="your-issuer-uuid" \
app_name="Your App" \
scheme="YourScheme"β Star this repo if it saved your team hours of deployment time!
- Development Teams seeking reliable iOS deployment automation with 100% TestFlight success
- Enterprise Organizations requiring secure, auditable deployment pipelines
- Startups wanting to focus on product instead of DevOps complexity
- Consultancies managing multiple iOS projects with different Apple Developer teams
Production Status: FULLY OPERATIONAL β
Built for enterprise teams. Production-verified.
- π Complete Setup Guide: docs/setup.md - Detailed setup from Apple account to deployment
- ποΈ Technical Architecture: docs/architecture.md - Clean Architecture implementation details
- π Security Practices: docs/security.md - Enterprise security guidelines
- π Report Issues: GitHub Issues