Unable to build project in Xcode 14.3 beta due to missing arc dir at /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib

Downloaded Xcode 14.3 this morning and it will not build the project. It fails building the CocoaPods project with this error:

It varies which pod causes the failure, but always the first to link.

cd'ing into there confirms that there is no arc dir. The regular Xcode app (Version 14.2 (14C18)) runs just fine.

Any ideas?

Potentially useful information:

  1. Project with objc, swift and c
  2. Uses CocoaPods
  3. Uses automatic reference counting
  4. macOS Ventura 13.2.1 (22D68)
  5. Version 14.3 beta (14E5197f)
Answered by DTS Engineer in 745550022

If you build a standard iOS app created from New > Project > iOS > App template and then looking at the build transcript, there are no references to libarclite_iphoneos.a. That’s because the app’s deployment target is modern enough that it can rely on ARC being built in to the system. Indeed, that’s always the case with Xcode 14, where it’s minimum supported deployment target is iOS 11 [1].

Presumably your app’s deployment target is not lower than what Xcode supports, so the question becomes: Why is your project trying to link libarclite_iphoneos.a, something it most definitely does not need? I don’t have a ready answer to that but it’s likely to be related to your third-party build system. I recommend that you escalate this via its support channel.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] ARC was added to the system so far back that I can’t honestly remember when it happened. However, Wikipedia says iOS 5, and I’ve no reason to disbelieve it.

Hi all,

I also encountered this problem when I updated my XCode from 14.2 -> 14.3, official release.

What worked for me was a sequence of steps:

  1. from your project folder, flutter clean ios, then flutter pub get.

  2. in terminal, 'cd ios' , and run: pod deintegrate

  3. delete podfile.lock

  4. in podfile, set platform :ios, '13.0'

  5. keep the last block THE SAME as you found it (which is different from steps suggested by johnson0513 above. In my case, it was:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
  end
end
  1. in ios folder, run: pod install

  2. open 'Runner.xcworkspace' => Pods => highlight all packages in 'Targets' => set 'iOS Deployment Target' to 'iOS 11.0'

    • This seems like the manual version of what Johnson0513 suggests, but this manual process was what made all the difference for me.
  3. Run the build! You can also build your project on your IDEs like VSCode.

Still not work ??????

For those running a Flutter app, do the following:

  1. run flutter clean
  2. Delete your Podfile.lock file and your Pods directory (ios/Pods)
  3. run flutter pub get
  4. Update your Podfile by replacing your post_install section with the following:
post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
    end
    flutter_additional_ios_build_settings(target)
  end
end
  1. cd into your ios directory and run pod install
  2. build your app flutter run

Hope this helps!

The above bug fix works when building the app on my iPhone. But archiving does not work. I have the following error:

Command PhaseScriptExecution failed with a nonzero exit code

The logs show:

rsync --delete -av --filter P .*.?????? --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AppAuth.framework" "/Users/../Library/Developer/Xcode/DerivedData/Runner-dikvfvwemjaxumfhjbnxifpkoagx/Build/Intermediates.noindex/ArchiveIntermediates/Runner/InstallationBuildProductsLocation/Applications/Runner.app/Frameworks"
building file list ... rsync: link_stat "../ios/../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AppAuth.framework" failed: No such file or directory (2)
done

sent 29 bytes  received 20 bytes  98.00 bytes/sec
total size is 0  speedup is 0.00
rsync error: some files could not be transferred (code 23) at /AppleInternal/Library/BuildRoots/97f6331a-ba75-11ed-a4bc-863efbbaf80d/Library/Caches/com.apple.xbs/Sources/rsync/rsync/main.c(996) [sender=2.6.9]
Command PhaseScriptExecution failed with a nonzero exit code

Downgrading to Xcode14.2 does not solve the problem!

I solved the problem

All deployment targets should be set on 11

What worked for me is described in this issue:

https://github.com/flutter/flutter/issues/123852

The gist of it is that you change a line in this file : ios/Pods/Targets Support Files/Pods-Runner/Pods-Runner-frameworks.sh

from source="$(readlink "${source}")" to source="$(readlink -f "${source}")"

I hope the next flutter version will address this and this won't be necessary anymore. This fix is for Flutter 3.7.9

I encountered the same problem with version 14.3 (14E222b). There seems to be a fix possible by changing cocoa as published here: https://github.com/CocoaPods/CocoaPods/issues/11808

However, I could solve it by adding the frameworks directly without installing it via cocoa pods. But this is only restricted to frameworks which allow the direct import.

Adding this code to your podfile will fix the issue

Add post-install script to set minimum deployment target for all pods

post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' end end end end

I tried downgrading to XCode 14.2 (14C18) and it worked for me.

I met the same error while built my application under the latest Xcode version 14.3, actually we used a few of old third-party package some of them compiled with iOS 8.0 or a little higher, so I download a little older Xcode version 13.4 and find the missing libraries to the new Xcode version with the same path, clean and re-build anything works well. Hope this help to us all.

cp /Users/burderly/Downloads/Xcode\ 13.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/* to /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/

post_install do |installer| installer.generated_projects.each do |project| project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0' end end end end

This worked for me

if you're running into this issue with the leveldb CocoaPod (a dependency of FirebaseFirestore and FirebaseDatabase), we've published version 1.22.2 with updated minimum versions, compatible with Xcode 14. Run pod update to get 1.22.2.

I figured out the problem. I had to increase the deployment target for the Pod module that was causing the error to iOS 15.0. At least, that's what worked for me.

This going to be 100% working fix for you. At first analyze the issue.

The error state that there are fre files that are missing(Actually one). As of the issue probably arc folder is missing in 14.3(public&beta) release candidates.

Things to do

Head over to this location

NOTE: Public candidate

# If public release candidate (14.3)
cd /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib

NOTE: Beta candidate

# If beta release candidate (14.3 beta)
cd /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib

Create a dir with sudo permissions(Won't allow you without sudo)

sudo mkdir arc
cd arc

Now clone(I personally recommend)/download a github repo Libarclite-Files

git clone https://github.com/kamyarelyasi/Libarclite-Files.git .

Grand execution permissions for everything in it.

sudo chmod +x *

Now try

pod deintegrade
rm -rf podfile.lock
pod install

Ideally, after this pod installs it should work. If not follow this(But need to do it every time you deintegrate and install them)

  • Go to Pods\Target Support Files\Pods-Runner or Pods-App
  • Open Pods-Runner-frameworks.sh or Pods-App-frameworks.sh in an editor
  • Search for source="$(readlink "${source}")"(Ideally at line:45)
  • And update it to source="$(readlink -f "${source}")"

NOTE: This is one time setup. So you don't need to change your app configs because of your dev env.

sudo mkdir arc

This does not appear to be possible in MacOS Ventura

mkdir: arc: Operation not permitted

Whats the workaround ?

Unable to build project in Xcode 14.3 beta due to missing arc dir at /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib
 
 
Q