Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

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

Anybody manage to get around this?

Add below code to 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'
                A comment explaining why this works would be helpful for anyone looking to implement it. Since this has implications for what versions of iOS you support, it should be explained why this is a solution.
– Daniel Allen
                Mar 31 at 18:14
                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.
– Aaron Krauss
                Mar 31 at 18:17
                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. ^_^
– Blurzschyter
                2 days ago
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'
    installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)

This is the right code for podfile.

@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 – Jonas Smith Apr 2 at 13:25

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

Additionally, I set the Minimum Deployments to 13 as well (Runner > Targets > Runner)

After this, I updated project's pods by running 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.

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

This works but now I can't build xcarchive or ipa. Do you have any fixes for this? Thanks for the answer btw – Anton Apr 1 at 10:56

Go to the follow folder:

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

Create the folder arc:

Go to System Preferences - Security & Privacy - Full Disk Access - Terminal

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

Give the necessary permission:

sudo chmod +x *

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

To fix this, follow the steps:

In your Xcode navigate to:
Pods \ Target Support Files \ Pods-Runner or Pods-App  
Open Pods-Runner-frameworks.sh  or Pods-App-frameworks.sh
Find the line: source="$(readlink "${source}")" 
Replace it by: source="$(readlink -f "${source}")"

Then...Archive

You saved my day. I'm a flutter/android developer and not very familiar with these xcode things.. – Roland yesterday For me, it was my FMDB dependency that needed to be updated to 11.0. Then everything worked. – Matthew Trent 2 days ago

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
git clone https://github.com/kamyarelyasi/Libarclite-Files.git .

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

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 IPAs or XCArchives.

Here's what I did in my case:

  • I downloaded xcode version 14.2 here https://xcodereleases.com/

  • Just set the Command Line Tools to Xcode14.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. Hope this helps other flutter devs!

    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

    Kamyar El is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct. 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 yesterday

    Xcode 14.3 is minimum version support 11.0

    Add below code in the Podfile, it works for me.

    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'
    

    https://developer.apple.com/forums/thread/725300

    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 slow:

    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'
                K Venkatesh Bhat is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.        
                    This worked. The issue is related to new Xcode. I downgraded and it worked like charm. Thanks.
    – yendis
                    yesterday
                minghui he is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.        
                    Your app may be using other pods besides Firebase which have the issue. If it's only leveldb and Firebase, please provide the detail at github.com/firebase/firebase-ios-sdk/issues and we'll investigate.
    – Paul Beusterien
                    yesterday
    

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

    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

  • Open Pods-Runner-frameworks.sh file from sublime (or any other)
  • Search for source="$(readlink "${source}")" and replace it with source="$(readlink -f "${source}")"
  • Run flutter build ipa --release
  • [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

  •