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:
- Xcode 14.3 removed
libarclite
, which supported legacy code for older deployment targets (< iOS 11.0). - Flutter plugins or dependencies (like
FMDB
orAppAuth
) set their minimum iOS deployment targets below 11.0.
Recommended Solutions
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:
Set global platform version at the top:
rubyplatform :ios, '13.0' # Add or update this line
Add/update the
post_install
hook:rubypost_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
Apply changes:
bashflutter 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:
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:
- 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.
- Open
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 forlibarclite
. - Flutter versions ≥
3.7.11
force newer deployment targets in generated projects.
Notes on Common Mistakes
- Avoid downgrading Xcode: While possible, it's not recommended.
- Don’t use symlink workarounds: Script fixes for symlinks (e.g., modifying
Pods-Runner-frameworks.sh
) are fragile and obsolete. - 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:
- Set
platform :ios, '13.0'
in yourPodfile
. - Add the provided
post_install
hook to enforce deployment targets. - Upgrade Flutter and dependencies to versions incorporating Apple toolchain updates.
This ensures compatibility with Xcode 14.3+ and avoids manual pod adjustments.