skip to Main Content

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?

25

Answers


  1. Chosen as BEST ANSWER

    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.


  2. 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.

    Login or Signup to reply.
  3. you can copy ‘libarclite_iphoneos.a’ from Xcode 14.2 to Xcode 14.3, it worked for me

    Login or Signup to reply.
  4. You can manually modify the minimum deployment version of the third-party framework.

    e.g.: iOS 8.0 –> iOS 11.0

    enter image description here

    Login or Signup to reply.
  5. 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 (Runner > Targets > Runner)

    Xcode target minimum deployment target

    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.

    Xcode clean build folder

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

    Login or Signup to reply.
  6. 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:

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

    2. 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!

    Xcode Settings

    Login or Signup to reply.
  7. Nothing worked for me. Just downgraded the Xcode to 14.2 and it works!!

    Login or Signup to reply.
  8. 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

    Login or Signup to reply.
  9. Edit

    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 .
    

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

    Login or Signup to reply.
  10. if you’re running into this issue with the leveldb CocoaPod (a dependency of FirebaseFirestore and FirebaseDatabase), we’ve published version leveldb-library version 1.22.2 with updated minimum Apple platform versions to be compatible with Xcode 14. Run pod update to get 1.22.2.

    Login or Signup to reply.
  11. Open Terminal and 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

    enter image description here

    Login or Signup to reply.
  12. 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
    
    Login or Signup to reply.
  13. 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

    Login or Signup to reply.
  14. 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
    
    Login or Signup to reply.
  15. 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.
    Login or Signup to reply.
  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

    Login or Signup to reply.
  17. 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.

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

    Login or Signup to reply.
  19. For me, macOS project, increase the minimum deployments version for that target.

    Login or Signup to reply.
  20. 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. (DO NOT type in, manually)

    enter image description here

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

    Login or Signup to reply.
  21. Actually, the other answers are correct, but to an amateur, it’s still quite difficult to figure it out.

    Answer:

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

    There are 2 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
    
    Login or Signup to reply.
  22. 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.

    Login or Signup to reply.

  23. 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 a 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search