File not found: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a
Xcode 14.3 删除了arc/libarclite_iphoneos.a, 是用来管理ARC内存的
cd /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/
sudo mkdir arc
cd arc
sudo git clone https://github.com/kamyarelyasi/Libarclite-Files.git .
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:
Pods → Target Support Files → Pods-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}")"
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
When building frameworks we were using -arch arm64 or -arch arm64 and build frameworks for different architectures and then join them.
Apple changed the way they generate bridging headers this solution fails because of format of header I attached in question.
The solution for us is just remove -arch and build fat framework.
post_install do |pi| pi.pods_project.targets.each do |t| t.build_configurations.each do |config| config.build_settings[‘ONLY_ACTIVE_ARCH’] = ‘NO’ end end end
Don’t exclude any architecture from Build Settings.
I had a very similar issue with Xcode 14.3 on macOS 13.3.1.
The solution for me was this - open Xcode > Go to the “Product” menu in the menu bar and select Destination > Destination Architectures > Show Rosetta Destinations. Then you will see Rosetta in parenthesis next to the simulator name. Run it. That’s all.
Here is the original source of this information - Link
ios中frameworks会带模拟器的运行库, 旧的一般为x86, 所以运行在Apple silicon中会报错. 解决办法:
1. 升级frameworks 编译出arm64支持
2. 运行rosetta模拟器
Error (Xcode): Building for ‘iOS-simulator’, but linking in object file (/Users/lmf/.pub-cache/hosted/pub.flutter-io.cn/tencent_kit-6.0.1/ios/Libraries/TencentOpenAPI.framework/TencentOpenAPI[arm64]2) built for ‘iOS’
Error (Xcode): Linker command failed with exit code 1 (use -v to see invocation)
Excluded Architectures Debug +arm64 *
1、去官网下载自己需要地址 2、下载完成后,执行以下命令添加:xcrun simctl runtime add /路径/iOS_17_Simulator_Runtime.dmg(这个是自己下载的文件的地址) 3、等待添加完毕