iOS Deployment

Deploy your Flutter app to iOS devices and App Store

🍎 What is iOS Deployment?

iOS deployment involves building your Flutter app for Apple devices and distributing it through TestFlight or the App Store. It requires a Mac, Xcode, and an Apple Developer account for production releases.


# Build iOS app
flutter build ios --release

# Build IPA for distribution
flutter build ipa --release
                                    

Output:

✓ Built build/ios/iphoneos/Runner.app

iOS Deployment Requirements

💻

Mac Computer

iOS development requires a Mac with Xcode installed. You cannot build iOS apps on Windows or Linux. Use macOS 12 or later for best compatibility.

# Check Xcode installation
xcodebuild -version
🔧

Xcode IDE

Xcode is Apple's development environment required for building iOS apps. Download from Mac App Store. It includes iOS SDK, simulators, and build tools needed for compilation.

# Install Xcode command line tools
xcode-select --install
👤

Apple Developer Account

Required for App Store distribution and TestFlight. Free accounts allow device testing. Paid membership ($99/year) enables App Store publishing and advanced features like push notifications.

# Sign up at developer.apple.com
🔐

Certificates & Profiles

iOS apps require signing certificates and provisioning profiles for distribution. Xcode can automatically manage these, or you can manually create them in Apple Developer portal.

# Xcode manages automatically

🔹 Initial iOS Setup

Configure your Flutter project for iOS:

# Open iOS project in Xcode
open ios/Runner.xcworkspace

# Or use Flutter command
flutter build ios --release --no-codesign

Xcode Configuration:

  1. Select Runner in project navigator
  2. Update Bundle Identifier (e.g., com.yourcompany.appname)
  3. Set Deployment Target (minimum iOS version)
  4. Configure Signing & Capabilities
  5. Add app icons in Assets.xcassets

🔹 Configure App Information

Update app details in ios/Runner/Info.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN">
<plist version="1.0">
<dict>
    <key>CFBundleDisplayName</key>
    <string>My App Name</string>
    
    <key>CFBundleIdentifier</key>
    <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
    
    <key>CFBundleVersion</key>
    <string>1</string>
    
    <key>CFBundleShortVersionString</key>
    <string>1.0.0</string>
</dict>
</plist>

🔹 Code Signing Setup

Configure automatic signing in Xcode:

Automatic Signing (Recommended):

  1. Open ios/Runner.xcworkspace in Xcode
  2. Select Runner target
  3. Go to Signing & Capabilities tab
  4. Check "Automatically manage signing"
  5. Select your Team (Apple Developer account)
  6. Xcode creates certificates and profiles automatically
# Build with automatic signing
flutter build ios --release

🔹 Build IPA for Distribution

Create an IPA file for App Store or TestFlight:

# Build IPA (requires Mac)
flutter build ipa --release

# Output location
# build/ios/ipa/your_app.ipa

# Build with specific export method
flutter build ipa --export-method app-store

Export Methods:

app-store: For App Store submission

ad-hoc: For limited device distribution

enterprise: For enterprise distribution

development: For testing

🔹 TestFlight Distribution

Upload your app to TestFlight for beta testing:

TestFlight Steps:

  1. Build IPA: flutter build ipa --release
  2. Open Xcode → Window → Organizer
  3. Select your archive
  4. Click "Distribute App"
  5. Choose "App Store Connect"
  6. Select "Upload"
  7. Wait for processing (10-30 minutes)
  8. Add testers in App Store Connect
# Alternative: Use Transporter app
# Download from Mac App Store
# Drag and drop IPA file to upload

🔹 App Store Submission

Submit your app to the App Store:

Submission Checklist:

  • ✓ App icons (all required sizes)
  • ✓ Screenshots (all device sizes)
  • ✓ App description and keywords
  • ✓ Privacy policy URL
  • ✓ Support URL
  • ✓ Age rating questionnaire
  • ✓ App category
  • ✓ Pricing and availability
# After upload, go to App Store Connect
# 1. Fill in app information
# 2. Add screenshots and description
# 3. Submit for review
# 4. Wait for approval (1-3 days typically)

🔹 Common iOS Build Issues

Troubleshoot common iOS deployment problems:

Issue: Signing Certificate Not Found

Solution: Enable automatic signing in Xcode or create certificates in Apple Developer portal

Issue: Provisioning Profile Error

Solution: Delete old profiles, let Xcode regenerate, or create new ones manually

Issue: Build Failed in Xcode

Solution: Run flutter clean, pod install in ios folder, then rebuild

Issue: App Rejected by Apple

Solution: Read rejection reason carefully, fix issues, resubmit with notes

🔹 iOS Build Commands

Useful Flutter iOS build commands:

# Build for iOS simulator
flutter build ios --simulator

# Build for physical device
flutter build ios --release

# Build IPA
flutter build ipa --release

# Clean iOS build
flutter clean
cd ios && pod install && cd ..

# Run on connected iOS device
flutter run --release

# Check iOS setup
flutter doctor

🧠 Test Your Knowledge

What is required to build iOS apps?