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