Skip to content

Missing libarclite_iphoneos.a in Xcode 14.3

Problem Statement

After updating Flutter and Xcode to version 14.3, you encounter a build failure when attempting to run your iOS app with Firebase plugins. The error occurs because Xcode cannot find the libarclite_iphoneos.a file, required for projects with iOS deployment targets below iOS 11.0. The error appears as:

Error (Xcode): File not found: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a
Error (Xcode): Linker command failed with exit code 1

Key factors causing this:

  1. Xcode 14.3 removed libarclite, which supported legacy code for older deployment targets (< iOS 11.0).
  2. Flutter plugins or dependencies (like FMDB or AppAuth) set their minimum iOS deployment targets below 11.0.

Solution 1: Update iOS Deployment Target in Podfile (Best Practice)

Modify your ios/Podfile to enforce a minimum deployment target of at least 13.0 for all pods:

  1. Set global platform version at the top:

    ruby
    platform :ios, '13.0'  # Add or update this line
  2. Add/update the post_install hook:

    ruby
    post_install do |installer|
      installer.generated_projects.each do |project|
        project.targets.each do |target|
          target.build_configurations.each do |config|
            # Ensure all targets use minimum iOS 13.0
            config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
          end
        end
      end
      installer.pods_project.targets.each do |target|
        flutter_additional_ios_build_settings(target)
      end
    end
  3. Apply changes:

    bash
    flutter clean
    cd ios
    pod deintegrate
    pod install

Solution 2: Upgrade Flutter and Dependencies (If Using Older Versions)

Flutter versions ≥ 3.7.11 include fixes for this issue. Update Flutter and reset dependencies:

bash
flutter upgrade  # Update Flutter to the latest stable version
flutter clean    # Clear build artifacts
flutter pub get  # Update dependencies

# Reset iOS pod environment
cd ios
pod deintegrate
rm Podfile.lock
pod install

Solution 3: Manual Workaround (Temporary Fix)

If you cannot update your deployment target immediately:

  1. Manually modify pod deployment targets in Xcode:
    • Open ios/Runner.xcworkspace in Xcode.
    • In the Pods project, find targets with low deployment targets (e.g., FMDB).
    • Set their iOS Deployment Target to 13.0 or higher in the Build Settings tab.

WARNING

This is temporary and resets when running pod install. Prefer Solution 1 for a permanent fix.


Explanation

Why This Fix Works

Xcode 14.3 requires projects targeting iOS 11.0 or newer. The error occurs when dependencies use older targets (< iOS 11.0) that reference the removed libarclite library.

  • Setting IPHONEOS_DEPLOYMENT_TARGET = 13.0 bypasses the need for libarclite.
  • Flutter versions ≥ 3.7.11 force newer deployment targets in generated projects.

Notes on Common Mistakes

  1. Avoid downgrading Xcode: While possible, it's not recommended.
  2. Don’t use symlink workarounds: Script fixes for symlinks (e.g., modifying Pods-Runner-frameworks.sh) are fragile and obsolete.
  3. Update all plugins: Ensure your Firebase plugins (firebase_core, firebase_messaging, etc.) are up-to-date.

TIP

Always run pod install after modifying your Podfile. Verify changes in ios/Pods/Pods.xcodeproj/project.pbxproj by searching for IPHONEOS_DEPLOYMENT_TARGET.


Conclusion

To permanently resolve the missing libarclite_iphoneos.a error:

  1. Set platform :ios, '13.0' in your Podfile.
  2. Add the provided post_install hook to enforce deployment targets.
  3. Upgrade Flutter and dependencies to versions incorporating Apple toolchain updates.

This ensures compatibility with Xcode 14.3+ and avoids manual pod adjustments.