Fix: clang error SDK does not contain libarclite in Xcode 15

Fix: clang error SDK does not contain libarclite in Xcode 15

Written by

in

Quick answer: The libarclite library was removed in Xcode 15. Fix the build error by adding a post_install hook to your Podfile that sets IPHONEOS_DEPLOYMENT_TARGET to 11.0 or higher for every CocoaPods target, then run pod install.

Why this happens

Xcode 15 removed libarclite, the static library that provided automatic reference counting (ARC) support for iOS versions below 11. When any target in your project — including CocoaPods dependencies — declares a minimum deployment target earlier than iOS 11, the linker looks for libarclite and fails with:

clang: error: SDK does not contain 'libarclite' at the path '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a'

Even if your Podfile specifies platform :ios, '13.0', individual pod targets can still inherit an older deployment target from their own podspecs or from Xcode’s default settings. The error appears because at least one pod target is still set to iOS 10 or earlier.

Apple’s guidance is clear: audit every target and raise the minimum deployment target to at least iOS 11. Do not attempt to copy libarclite from an older Xcode installation.

How to fix it

1. Add a post_install hook to enforce deployment target (recommended)

Open your ios/Podfile and add (or replace) the post_install block so it iterates over all pod targets and sets IPHONEOS_DEPLOYMENT_TARGET to 11.0 or higher. This runs automatically on every pod install.

post_install do |installer|
  # React Native's own post-install logic
  react_native_post_install(installer)
  $RNMBGL.post_install(installer) if defined?($RNMBGL)

  # Force every pod target to iOS 11+
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
    end
  end
end

Steps:
1. Edit ios/Podfile and ensure the block above is present and uncommented.
2. Run cd ios && pod install --repo-update.
3. Clean the build folder in Xcode (Product → Clean Build Folder).
4. Build the project (⌘B).

Note: If you already have a post_install block, merge the installer.pods_project.targets.each loop into it rather than creating a second block.

2. Verify the change in Xcode (manual check)

After pod install completes:
1. Open YourProject.xcworkspace.
2. In the Project Navigator, select Pods (the top-level Pods project).
3. Click each pod target → Build Settings → search iOS Deployment Target.
4. Confirm every target shows 11.0 or newer.

This visual check is useful the first time; thereafter the hook keeps targets in sync.

3. Update the main app target if needed

Select your app target (not the Pods project) → Build Settings → iOS Deployment Target and set it to 13.0 (or whatever your minimum supported version is). This should already match the platform :ios, '13.0' line in your Podfile, but it’s worth verifying.

How to prevent it

  • Keep the post_install deployment-target loop in your Podfile permanently.
  • Run pod install --repo-update after any pod repo update or when adding new dependencies.
  • Set your app’s minimum deployment target to iOS 13 or newer in both the Podfile (platform :ios, '13.0') and the Xcode project settings.
  • Avoid pinning pods to very old versions that still declare iOS 10 support in their podspecs.

FAQ

Why does the error mention iOS 13 but the fix uses iOS 11?

The error suggests “try increasing the minimum deployment target” because your app target is already at 13.0. However, pod targets may still be at 10.x. Apple removed libarclite for any target below iOS 11, so raising pod targets to 11.0 satisfies the linker while your app can stay at 13.0.

Can I just delete the libarclite reference from build settings?

No. The reference is injected automatically by the toolchain when the deployment target is < 11. The only supported fix is to raise the deployment target.

Will this break compatibility with older iOS devices?

iOS 11 was released in 2017. Supporting iOS 11+ covers > 99 % of active devices. If you truly need iOS 10 support, you must stay on Xcode 14.x, which is not recommended for new App Store submissions.

Related fixes

Sources & credits

Parts of this guide are adapted from content licensed under CC BY-SA 4.0; this article is shared under the same license.