418

After installing Xcode 14.3 in order to run my app on my iOS 16.3 iPhone XS. I get the following error:

File not found: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a

How can I fix it?

0

38 Answers 38

447

Add the below code to the Podfile. It works for me. Version 14.3 beta 2 (14E5207e)

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'] = '13.0' end end end end 
Sign up to request clarification or add additional context in comments.

9 Comments

This worked for me with my flutter app! I changed the target to 11. Xcode 14.3, Flutter 3.7.7, testing out on iPhone 14 Pro Max simulator. This error came out of the blue today it seems like.
This solution works for me. Instead of 13.0, I set the IPHONEOS_DEPLOYMENT_TARGET to 11.0 only. I'm using Xcode v14.3 on macOS Ventura 13.3. Make sure you run pod install again after enter the given code on your podfile. ^_^
What if I am not using Pods? How to resolve this?
The latest Flutter version (3.3.10) includes a fix! No need to mess with the Info.plist anymore.
Doesn't work 👎🏻😒. Use @JustAimz's answer stackoverflow.com/a/75867043/9185411. IMPORTANT!replace the existing post_install with the given one
|
280

Open Terminal and go to the following folder:

cd /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/ 

Create the folder "arc":

Go to System PreferencesSecurity & PrivacyFull Disk AccessTerminal, and do:

sudo mkdir arc cd arc sudo git clone https://github.com/kamyarelyasi/Libarclite-Files.git . 

Give the necessary permissions:

sudo chmod +x * 

Now you will be able to build and run, but not Archive.

To fix this, follow the steps:

In Xcode, navigate to:

  • PodsTarget Support FilesPods-Runner or Pods-App

  • Open file Pods-Runner-frameworks.sh or Pods-App-frameworks.sh

  • Find the line: source="$(readlink "${source}")"

  • Replace it by: source="$(readlink -f "${source}")"

Then...Archive

Enter image description here

13 Comments

Big thanks. This works for me: 1 - Download files from Libarclite-Files 2- Add them to /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/
thanks, just move cloned files from the Libarclite folder ( /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/ ) to the parent folder (in the lib folder ), then give permission to it.
Before changing Symlinked in Pods-Runner-frameworks.sh run: pod install
I wanna point out that it's not a good idea to give random files from GitHub root and executable permissions
@MuhammadShahzad i read it somewhere that statement was pods path getting updated so pods are not readable on old path that's why it's happened.
|
188

You can manually modify the minimum deployment version of the third-party framework.

e.g.: iOS 8.0 --> iOS 11.0

An image showing a settings menu within xcode. On the left side, 'Pods' is selected. Then, 'General' is selected. In the center of the screen, a dropdown menu with the title "Minimum Deployments" is higlighted, and is currently set to iOS 8.0.

5 Comments

For me, it was my FMDB dependency that needed to be updated to 11.0. Then everything worked.
This works for me after I set ALL pods to the same iOS version.
This happened to me for a completely diff pod file (not flutter). And also this solution worked for me. And I'll tell you why this is the best answer... 1. There is NO reason for anyone to install libarclite_iphoneos.a 2. This mod is clean and you dont have to write yet another script file to fix this error..
@MatthewTrent Updated FMDB deployment target from 8 to 11 did it, thanks.
I also had to manually update some related pods (Firebase+Core+Analytics+etc.), and I repeated this step for other pods until I stopped getting the error.
95

Actually, the other answers are correct, but to an amateur, it's still quite difficult to figure it out.

It seems like iOS stopped supporting iOS 8, so the minimum should be 11.0.

There are two ways to upgrade your iOS:

  1. Manually update all targets with a minimum deployment at 11.0.

    Enter image description here

    It will work perfectly but tiring, so...

  2. Adjust the pod code to force all targets with a minimum deployment at 11.0.

    enter image description here

     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'] = '12.0' end end end end 

    Remember to clean and de-integrate pod and re-install it.

     cd [project directory] pod deintegrate pod clean pod install 

6 Comments

My attached pictures are minimum deployment 12.0 cuz, some of my dependencies require higher than 11.0
'pod clean' no longer exists
Thanks, 1st solution is enough to work, no need to go for second one. Set minimum deployment at 11.0.
@KasunUdaraJayasekara first solution you have to update manually everytime whenever pod install/re-install. Second solution is one time change.
pod clean doesn't exist. Use pod cache clean --all instead
|
73
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'] = '13.0' end end end installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) end end 

This is the right code for podfile.

8 Comments

Being a complete novice here, how and where do I implement this script?
I want my app to support down to iOS 11, will this affect it?
@Andy You need to add this to the end of your Podfile file, found in the ios directory of your application. There will be another structure that looks like post_install do |installer| {logic} end
Thanks! You saved my day! Also updated minimum deployment version of Pods.xcodeproj to same as main project. After that exec pod install, clean build folder and build project.
Works perfect with modified ['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0' as well.
|
36

I updated the post_install in my Podfile to:

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'] = '13.0' end end end installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) end end 

Additionally, I set the Minimum Deployments to 13 as well (RunnerTargetsRunner):

Xcode target minimum deployment target

After this, I updated the project's pods by running this in the terminal:

cd ios; # Remove the pods pod deintegrate; # Remove the Podfile.lock rm -f Podfile.lock; # Installs the pods pod install --repo-update; 

Try running the app from your IDE; it should work now.

If you continue to have issues, try cleaning the build folder within Xcode and running the app, also within Xcode.

Xcode clean build folder

Once you have successfully run the app from Xcode, go back to your IDE and you'll be able to run the app.

2 Comments

This works but now I can't build xcarchive or ipa. Do you have any fixes for this? Thanks for the answer btw
tonly this answer works for me
29

Update

This answer could be valid for the question in this topic as well

The old answer

It's worked for me.

cd /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/ sudo mkdir arc # While executing the above command, the OS will block it # and give an error. Allow permission from the settings # and run the command again. cd arc sudo git clone https://github.com/kamyarelyasi/Libarclite-Files.git . 

You may also need to run this command: sudo chmod +x *

6 Comments

it work for me when I put sudo git clone https://github.com/kamyarelyasi/Libarclite-Files.git .
I edited the post to include sudo before the git clone
It had worked for me without sudo before. Still, there's no harm, it can be added.
Good and Quick Solution. It works
Please change your answer to not use "edit" (near "Changelogs"). The answer should be as if it was written right now.
|
25

Since Xcode 14.3 you have to set all your Pods to a minimum deployment target of iOS 11. Then it will work.

  1. Navigate to the [Pods] project in the Project Navigator.
  2. Select "each" target under it and perform step 3 below.
  3. Change the Minimum Deployment Target to iOS 11 version in the drop-down list therein.

Comments

25

If you are working in Swift/Objective-C, No further action is needed except:

  1. Navigate to [Pods] project in the Project Navigator.
  2. Select "each" target under it and perform the step 3 below.
  3. Change the Minimum Deployments value to the lowest available version in the drop-down list therein. (Avoid typing in the version, manually)

enter image description here

Thereafter, clean build folder from Product Menu, and hopefully you'll be able to build the project successfully.

2 Comments

Please do not post duplicate answers.
@HangarRash Please take another look at my answer. It is well-written, straightforward and advises the readers against any unnecessary hassle such as adding extra code to the pod file, restarting Xcode etc. mentioned in other answers. More importantly, the step 2 is a must because the issue will not be resolved until it is ensured that each and every target is set to the lowest available version shown in the Minimum Deployments dropdown.
19

After updating to XCode 14.3 I got the same error message as described in the question. In my case it was an error in a pod that was shown. My project is a native iOS app and no flutter like answers from others seem to be dealing with.

The following worked for me:

  1. Comment out all pods in Podfile by adding # in front of each pod.
  2. Close XCode.
  3. Run pod install (will remove all pods).
  4. Open xcworkspace project in XCode again and do a clean (command-shift-k).
  5. Uncomment pods in Podfile and add this before the last end in the Podfile (change 11.0 to the minimum version you want to support):
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 
  1. Close XCode.
  2. Run pod install.
  3. Open xcworkspace project in XCode and error should be gone.

2 Comments

Worked for me as well after upgrading to Xcode 14.3
Thank God for Stack Overflow. Updating Xcode is always a terrifying experience. For native iOS apps, this is my favorite answer.
18

Here are the step-by-step instructions, including the image links:

  1. Open a web browser and go to the following URL: https://github.com/kamyarelyasi/Libarclite-Files

  2. On the GitHub page, you will see a list of files. Locate the file named libarclite_iphonesimulator.a.

    GitHub Files

  3. Click on the file name (libarclite_iphonesimulator.a) to open it.

  4. On the file page, click the "Download" button to download the file to your computer. Choose a suitable location to save the file.

  5. After the download is complete, locate the downloaded file (libarclite_iphonesimulator.a) on your computer.

  6. Open the Finder application on your Mac.

  7. In the menu bar, click on "Go" and select "Go to Folder" from the dropdown menu.

  8. In the "Go to the folder" dialog box, enter the following path and click the "Go" button: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/

    Go to Folder

  9. If the arc directory does not exist in the specified path, right-click on the "arc" folder in the Finder and select "New Folder" from the context menu. Rename the newly created folder as "arc".

  10. Now, locate the downloaded file (libarclite_iphonesimulator.a) and copy it.

  11. Go back to the Finder window containing the arc directory.

  12. Right-click on an empty space within the arc directory and select "Paste Item" from the context menu. This will paste the copied file (libarclite_iphonesimulator.a) into the arc directory.

  13. Once the file is successfully copied, you have completed the process of downloading the files and copying the libarclite_iphonesimulator.a file to the specified location.

Comments

16

From the Flutter team.

No need for workarounds, just update Flutter to latest version 3.7.11 and run flutter upgrade in your project, and you should be good.

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

Just tested in my Flutter project, and I can confirm I can build and archive the xcode project

Comments

13

Just create a folder called 'arc' in the following path:

/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/

Download and paste the contents of this repository into the folder you just created and then build again.

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

3 Comments

This did not work for as i keep getting "Command PhaseScriptExecution failed with a nonzero exit code" and I did flutter clean and even run pod install but still.
@yendis, did you try an earlier solution suggested here itself -> stackoverflow.com/a/75924853/1349159 It worked for me
It solves the issue partially. After doing this, you can build and run the app but Archiving for uploading AppStore still fails.
12

I spent hours and I've found out the problem. It was Xcode version 14.3.

I tried the above suggestions (update your podfile) and it worked, but the problem is you can't build IPA files or XCArchives.

Here's what I did in my case:

  1. I downloaded Xcode version 14.2 here https://xcodereleases.com/

  2. Just set the Command Line Tools to Xcode 14.2

P.S.: Just to make sure, run the usual first:

flutter clean && flutter pub get 

With this, I was able to build and create XCArchives. I hope this helps other Flutter developers!

Xcode Settings

Comments

11

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.

Comments

11

My system: MacBook Pro M1

Xcode: 14.3


To fix this issue, you must ensure that the iOS Deployment Target of your pods is 11.0; pods with an iOS Deployment Target of 8.0 were causing the issue for me.

Example: pods that were set to iOS Deployment Target 8.0: leveldb-library, nanopb.

You will receive this error for any pods that are set to 8.0 when building, so change them to 11.0 either manually or with a post install script in your Podfile.

2 Comments

prefect work for me.
Actually From Xcode 14.3, it supports 11.0 min Deployment Target.
10

tl;dr: Change deployment target without downgrading pods

Many answers here are about updating IPHONEOS_DEPLOYMENT_TARGET in the post_install hook of Cocoapods. I had to tweak this solution a little bit, since my project uses pods which already have a higher deployment target, and the provided solutions would downgrade them, causing their build to break (e.g. when the pods are using newer APIs).

So here's my patched approach, to only change the deployment target if it's too low:

post_install do | installer | installer.generated_projects.each do |project| project.targets.each do |target| target.build_configurations.each do |config| if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].split('.').first.to_i < 11 config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0' end end end end end 

1 Comment

Yep this seem the best answer for multiple pod versions. I use it like this: post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] == '8.0' config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0' end end end end
5

In one line:

Just search for "iphoneos_deployment_target" in your Xcode and change any target lower than 11.0 to 11.0.

Comments

4

Nothing worked for me. I just downgraded Xcode to 14.2 and it worked!

2 Comments

This worked. The issue is related to new Xcode. I downgraded and it worked like charm. Thanks.
I am using Version 15.0.1 (15A507), still doesn't work
4

It seems like some files are missing from Xcode 14.3 above (including Xcode 15). You can add them back by this command:

sudo git clone https://github.com/MojtabaHs/xcode-arc `xcode-select -p`/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc 

This will add them to the currently selected Xcode. You can select another Xcode using xcode-select command and run the above command again to make it work too.

Comments

3

You can try adding this code to the Pod file

 post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) target.build_configurations.each do |config| config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0' end end end 

Don't use this code

 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 

1 Comment

is it flutter environment? flutter_additional_ios_build_settings
2

1. First update PodFile.

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 installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) end end 

Update target as per your need. For me 11.0 was minimum requirement. This basically updates minimum deployments from anything you have to 11.0 so you don’t need to update manually.

Now Missing file libarclite_iphoneos.a must be fixed. However, you might get another issue while generating build. If so, please go through following steps.

2. Can't generate build?

.sh Path: flutter-project-folder/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh

Steps

  1. Open Pods-Runner-frameworks.sh file from sublime (or any other)
  2. Search for source="$(readlink "${source}")" and replace it with source="$(readlink -f "${source}")"
  3. Run flutter build ipa --release
  4. [important] Now open sublime again. You will see it will remove -f. At this time immediately add -f again and save the file. Now the build should be successful.

This worked for me. Hope this helps.

Thanks

Comments

2

For me, macOS project, increase the minimum deployments version for that target.

Comments

2

Fixed in Flutter 3.7.11

flutter upgrade 

Upgrading to Xcode 14.3 will not build when plugin transitive dependencies have a low deployment target: File not found: XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a #124340

Hotfixes to the Stable Channel

Comments

2

I would like to improve moveFastLink's solution.

There are two things that I think could be improved:

  • In moveFastLink's solution, when one of the pods already has a higher deployment target, it will be "downgraded" to 13.0.
  • OP asks for a solution that solves his problem. For the problem to be solved, it's not necessary so set the target version of every pod to 13.0. Instead, 11.0 very much suffices.

For these reasons I propose to add this to the Podfile of your project:

wanted_project_target = 11.0 post_install do |installer| installer.generated_projects.each do |project| project.targets.each do |target| target.build_configurations.each do |config| current_project_target = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f if current_project_target < wanted_project_target config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = wanted_project_target.to_s end end end end end 

This piece of code checks if the current IPHONEOS_DEPLOYMENT_TARGET is lower than the wanted_project_target and only re-assigns it to wanted_project_target if this is the case.

1 Comment

What is the code in? Swift?
1

100% Working and Tested

For my case, I was getting an error like below:

Enter image description here

When I have updated my Xcode with the latest version, my running project was getting an error.

Executable path is a directory

Later I saw the below error in Xcode:

Enter image description here

This is how I resolved this:

By using a terminal, I have added the src directory and changed its permissions

  1. Open the Terminal application in your Mac.

  2. Enter the command:

    sudo mkdir arc 
  3. It will ask for permission if you haven't set permissions previously for access in App Management.

    Enter image description here

  4. Enter this command in the terminal:

    cd arc 
  5. Enter this command in the terminal:

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

Once this command fired, now it is time to change permissions:

sudo chmod +x * 

Almost done.

Simply search in Xcode for the following:

source="$(readlink "${source}")" 

and just replace it by the following:

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

It looks like:

Enter image description here

Done. You are able to generate a build and are also able to run in the simulator.

Enter image description here

Comments

1

Update the Flutter SDK to 3.7.12 to fix the problem.

Comments

0
Inside script "Pods-${TARGET}-frameworks.sh" Inside function install_framework() ... # Use filter instead of exclude so missing patterns don't throw errors. # # 1. fix framework path at $source variable # framework not found at script location source="${1}" echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" # 2. replace rsync --links flag with --copy-links # rsync will copy files and directories instead do symlinkink # if don't do this, later code sign failed, when try to codesign symbolic link rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --copy-links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" ... That's all ctrl+s and archive 

Comments

0

You can see the offending pod in the errors (yellow). I just changed that to my target (14)

Comments

0

I had this issue when using Pods to add Firebase to my app. What fixed it for me was: Select the ‘Pods’ project in the the file navigation on the left, then select the ‘General’ tab, select the ‘leveldb-library’ target and set the minimum deployment to iOS 11.0.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.