英文:
Missing file libarclite_iphoneos.a (Xcode 14.3)
问题
安装 Xcode 14.3 以在我的 iOS 16.3 iPhone XS 上运行我的应用程序后,我遇到了以下错误:
> 未找到文件:/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a
如何修复它?
英文:
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?
答案1
得分: 368
将以下代码添加到Podfile中。这对我有效。版本为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
英文:
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
答案2
得分: 246
打开终端并进入以下文件夹:
cd /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/
创建文件夹 "arc":
前往 系统偏好设置 → 安全性与隐私 → 完全磁盘访问 → 终端,执行以下命令:
sudo mkdir arc
cd arc
sudo git clone https://github.com/kamyarelyasi/Libarclite-Files.git .
授予必要权限:
sudo chmod +x *
现在您可以构建和运行,但无法进行归档。
要修复这个问题,请按照以下步骤操作:
在Xcode中,导航至:
-
Pods → Target Support Files → Pods-Runner或Pods-App
-
打开文件 Pods-Runner-frameworks.sh 或 Pods-App-frameworks.sh
-
查找以下行:
source="$(readlink "${source}")"
-
将其替换为:
source="$(readlink -f "${source}")
然后... 归档
英文:
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 Preferences → Security & Privacy → Full Disk Access → Terminal, 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:
-
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}")"
Then...Archive
答案3
得分: 158
你可以手动修改第三方框架的最低部署版本。
例如:iOS 8.0 --> iOS 11.0
英文:
You can manually modify the minimum deployment version of the third-party framework.
e.g.: iOS 8.0 --> iOS 11.0
答案4
得分: 70
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
这是正确的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'] = '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.
答案5
得分: 64
答案:
实际上,其他答案是正确的,但对于一个业余者来说,仍然相当难以理解。
看起来 iOS 停止支持 iOS 8,所以最低版本应该是 11.0。
升级 iOS 有两种方法:
1- 手动更新所有目标的最低部署版本为 11.0。
这将完美运行,但有点繁琐,所以...
2- 调整 pod 代码,强制所有目标的最低部署版本为 11.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'] = '12.0'
end
end
end
end
记得清理和取消 pod 集成,然后重新安装它。
cd [项目目录]
pod deintegrate
pod clean
pod install
英文:
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.
It will work perfectly but tiring, so...
2- Adjust the pod code to force all targets with a minimum deployment at 11.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'] = '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
得分: 36
我已更新我的Podfile中的post_install
如下:
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
此外,我还将最小部署目标设置为13(Runner → Targets → Runner)。
然后,我通过终端运行以下命令来更新项目的pods:
cd ios;
# 移除pods
pod deintegrate;
# 移除Podfile.lock
rm -f Podfile.lock;
# 安装pods
pod install --repo-update;
尝试从你的IDE运行应用程序;现在应该可以工作了。
如果问题仍然存在,尝试在Xcode中清理构建文件夹,然后在Xcode中运行应用程序。
成功从Xcode运行应用程序后,返回到你的IDE,你将能够运行应用程序。
英文:
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):
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.
Once you have successfully run the app from Xcode, go back to your IDE and you'll be able to run the app.
答案7
得分: 28
更新
旧答案
这对我有用。
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 *
英文:
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 *
答案8
得分: 24
自 Xcode 14.3 起,您必须将所有的 Pods 设置为最低部署目标为 iOS 11
。然后它将正常工作。
- 导航到项目导航器中的
[Pods]
项目。 - 选择其中的每个目标,并执行下面的第 3 步。
- 在下拉列表中将
最低部署目标
更改为iOS 11
版本。
英文:
Since Xcode 14.3 you have to set all your Pods to a minimum deployment target of iOS 11
. Then it will work
- Navigate to
[Pods]
project in the Project Navigator. - Select "each" target under it and perform the step 3 below.
- Change the
Minimum Deployment Target
toiOS 11
version in the drop-down list therein.
答案9
得分: 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.
英文:
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
答案10
得分: 15
在升级到XCode 14.3后,我遇到了与问题描述中相同的错误消息。在我的情况下,错误出现在一个显示的Pod中。我的项目是一个原生iOS应用程序,似乎与其他人提供的与Flutter相关的答案无关。
以下方法对我有效:
- 在Podfile中注释掉所有的pods,方法是在每个pod前面添加
#
。 - 关闭XCode。
- 运行
pod install
(将移除所有pods)。 - 再次在XCode中打开
xcworkspace
项目并执行一次清理(command-shift-k
)。 - 在Podfile中取消注释pods,并在Podfile的最后一个"end"之前添加以下内容(将11.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'] = '11.0'
end
end
end
end
- 关闭XCode。
- 运行
pod install
。 - 再次在XCode中打开xcworkspace项目,错误应该消失。
英文:
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:
- Comment out all pods in Podfile by adding
# in front of each pod
. - Close XCode.
- Run
pod install
(will remove all pods). - Open
xcworkspace
project in XCode again and do a clean (command-shift-k
). 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
- Close XCode.
- Run pod install.
- Open xcworkspace project in XCode and error should be gone.
答案11
得分: 13
只需在以下路径中创建一个名为 'arc' 的文件夹:
/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/
然后下载并粘贴此存储库的内容到刚刚创建的文件夹中,然后重新构建。
英文:
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
答案12
得分: 12
我花了几个小时,找出了问题所在。问题出在Xcode版本14.3上。
我尝试了上面的建议(更新你的podfile),它有效,但问题是你不能构建IPA文件或XCArchives。
以下是我在我的情况下所做的:
1)我从这里下载了Xcode版本14.2 https://xcodereleases.com/
2)只需将命令行工具设置为Xcode 14.2
附言:只是为了确保,首先运行以下命令:
flutter clean && flutter pub get
有了这个,我能够构建和创建XCArchives。希望这对其他Flutter开发者有所帮助!
英文:
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:
-
I downloaded Xcode version 14.2 here https://xcodereleases.com/
-
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!
答案13
得分: 11
以下是逐步说明,包括图像链接:
-
打开网络浏览器,前往以下网址:https://github.com/kamyarelyasi/Libarclite-Files
-
在GitHub页面上,您会看到文件列表。找到名为
libarclite_iphonesimulator.a
的文件。 -
单击文件名(
libarclite_iphonesimulator.a
)以打开它。 -
在文件页面上,单击 "Download" 按钮,将文件下载到您的计算机。选择一个合适的位置保存该文件。
-
下载完成后,在您的计算机上找到已下载的文件(
libarclite_iphonesimulator.a
)。 -
在您的Mac上打开Finder应用程序。
-
在菜单栏中,单击 "前往",然后从下拉菜单中选择 "前往文件夹"。
-
在 "前往文件夹" 对话框中,输入以下路径,然后单击 "前往" 按钮:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/
-
如果在指定路径中不存在 "arc" 目录,右键单击Finder中的 "arc" 文件夹,然后从上下文菜单中选择 "新建文件夹"。将新创建的文件夹命名为 "arc"。
-
现在,找到已下载的文件(
libarclite_iphonesimulator.a
)并复制它。 -
返回包含 "arc" 目录的Finder窗口。
-
右键单击 "arc" 目录内的空白空间,然后从上下文菜单中选择 "粘贴项目"。这将把复制的文件(
libarclite_iphonesimulator.a
)粘贴到 "arc" 目录中。 -
一旦文件成功复制,您已完成下载文件并将
libarclite_iphonesimulator.a
文件复制到指定位置的过程。
英文:
Here are the step-by-step instructions, including the image links:
-
Open a web browser and go to the following URL: https://github.com/kamyarelyasi/Libarclite-Files
-
On the GitHub page, you will see a list of files. Locate the file named
libarclite_iphonesimulator.a
. -
Click on the file name (
libarclite_iphonesimulator.a
) to open it. -
On the file page, click the "Download" button to download the file to your computer. Choose a suitable location to save the file.
-
After the download is complete, locate the downloaded file (
libarclite_iphonesimulator.a
) on your computer. -
Open the Finder application on your Mac.
-
In the menu bar, click on "Go" and select "Go to Folder" from the dropdown menu.
-
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/
-
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". -
Now, locate the downloaded file (
libarclite_iphonesimulator.a
) and copy it. -
Go back to the Finder window containing the
arc
directory. -
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 thearc
directory. -
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.
答案14
得分: 9
我找到了问题。我不得不将引发错误的 Pod 模块的部署目标增加到 iOS 15.0。至少对我来说是有效的。
英文:
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.
答案15
得分: 9
tl;dr: 不要下降 pod 版本,只更改部署目标。
许多答案都涉及在 Cocoapods 的 post_install 钩子中更新 IPHONEOS_DEPLOYMENT_TARGET。但我不得不稍微调整这个解决方案,因为我的项目使用的 pods 已经有更高的部署目标,而提供的解决方案会将它们降级,导致它们的构建失败(例如,当 pods 使用较新的 API 时)。
因此,这是我的修补方法,只有在部署目标太低时才更改它:
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
英文:
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
答案16
得分: 7
为解决这个问题,您必须确保您的pod的iOS部署目标是11.0;对于我来说,具有iOS部署目标为8.0的pod会引发问题。
示例: 将iOS部署目标设置为8.0的pod:leveldb-library、nanopb。
在构建时,对于任何设置为8.0的pod,您将收到此错误,因此要么手动将它们更改为11.0,要么使用Podfile中的后安装脚本。
英文:
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.
答案17
得分: 3
什么都对我没用。我只是将Xcode降级到14.2,然后它就正常工作了!
英文:
Nothing worked for me. I just downgraded Xcode to 14.2 and it worked!
答案18
得分: 3
如果您正在使用Swift/Objective-C,只需执行以下操作,无需进一步操作:
- 导航到项目导航器中的**[Pods]**项目。
- 选择其下的**"each"目标**并执行下面的第3步。
- 将下拉列表中的最低可用版本更改为最小部署版本(请勿手动输入)。
之后,从产品菜单中清除构建文件夹,希望您能够成功构建项目。
英文:
If you are working in swift/objective-c, No further action is needed except:
- Navigate to [Pods] project in the Project Navigator.
- Select "each" target under it and perform the step 3 below.
- Change the Minimum Deployments value to the lowest available version in the drop-down list therein. (DO NOT type in, manually)
Thereafter, clean build folder from Product Menu, and hopefully you'll be able to build the project successfully.
答案19
得分: 3
你可以尝试将此代码添加到 Pod 文件中
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
不要使用这段代码
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
英文:
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
答案20
得分: 3
有些文件似乎在 Xcode 14.3 及以上版本(包括 Xcode 15)中丢失。 您可以使用以下命令将它们添加回去:
sudo git clone https://github.com/MojtabaHs/xcode-arc `xcode-select -p`/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc
这将把它们添加到当前选择的 Xcode。 您可以使用 xcode-select
命令选择另一个 Xcode,并再次运行上述命令,以使其生效。</sub>
英文:
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
<sub>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.</sub>
答案21
得分: 2
1. 首先更新 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
根据您的需求更新目标。对我来说,11.0
是最低要求。这实际上将“最低部署”从您目前的版本更新到 11.0
,因此您不需要手动更新。
现在必须修复 Missing file libarclite_iphoneos.a
。但是,在生成构建时可能会出现其他问题。如果出现其他问题,请按照以下步骤操作。
2. 无法生成构建?
.sh 路径: flutter-project-folder/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh
步骤
- 从 Sublime(或其他编辑器)打开
Pods-Runner-frameworks.sh
文件。 - 搜索
source="$(readlink "${source}")"
并将其替换为source="$(readlink -f "${source}")"
。 - 运行
flutter build ipa --release
。 [重要]
现在再次打开 Sublime。您会看到它将删除-f
。此时立即再次添加-f
并保存文件。现在构建应该成功。
这对我有用,希望对您有所帮助。
谢谢
英文:
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
- Open
Pods-Runner-frameworks.sh
file from sublime (or any other) - Search for
source="$(readlink "${source}")"
and replace it withsource="$(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
答案22
得分: 2
对于我的 macOS 项目,增加该目标的最低部署版本。
英文:
For me, macOS project, increase the minimum deployments version for that target.
答案23
得分: 2
已修复于Flutter 3.7.11
flutter upgrade
https://github.com/flutter/flutter/issues/124340
https://github.com/flutter/flutter/wiki/Hotfixes-to-the-Stable-Channel
英文:
Fixed in Flutter 3.7.11
flutter upgrade
https://github.com/flutter/flutter/issues/124340
https://github.com/flutter/flutter/wiki/Hotfixes-to-the-Stable-Channel
答案24
得分: 1
我想改进moveFastLink的解决方案。
我认为有两个可以改进的地方:
- 在moveFastLink的解决方案中,如果其中一个Pod已经具有更高的部署目标,它将被“降级”为
13.0
。 - OP要求提供解决他的问题的解决方案。为了解决问题,没有必要将每个Pod的目标版本都设置为
13.0
。相反,11.0
完全足够。
因此,出于这些原因,我建议将以下内容添加到您项目的Podfile
中:
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
这段代码检查当前的IPHONEOS_DEPLOYMENT_TARGET
是否低于wanted_project_target
,只有在这种情况下才重新分配给wanted_project_target
。
英文:
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.
答案25
得分: 1
只搜索“iphoneos_deployment_target”在你的Xcode中,将任何低于11.0的目标更改为11.0。
英文:
In one line:
Just search for "iphoneos_deployment_target" in your xcode and and change any target lower than 11.0 to 11.0.
答案26
得分: 1
更新Flutter SDK到3.7.12以修复问题。
英文:
update flutter sdk to 3.7.12 to fix
答案27
得分: 1
100%有效并经过测试
对于我的情况,我遇到了以下错误:
当我更新了Xcode到最新版本后,我的正在运行的项目出现了错误。
可执行路径是一个目录
后来,我在Xcode中看到以下错误:
这是我是如何解决的:
通过终端,我添加了arc目录并更改了其权限
-
在您的Mac上打开终端应用程序。
-
输入命令:
sudo mkdir arc
- 如果您以前没有为应用程序管理设置权限,它将要求权限。
- 在终端中输入以下命令:
cd arc
- 在终端中输入以下命令:
sudo git clone https://github.com/kamyarelyasi/Libarclite-Files.git .
一旦执行了这个命令,现在是更改权限的时候了
sudo chmod +x *
几乎完成了。
在Xcode中简单搜索以下内容:
source="$(readlink "${source}")"
然后只需用以下内容替换它:
source="$(readlink -f "${source}")"
看起来像这样:
完成。您可以生成构建并在模拟器中运行。
英文:
100% Working and Tested
For my case I was getting error like below:
When I have updated my Xcode with latest version, my running project was getting error.
Executable path is a directory
later I saw in Xcode below error:
This is how I resolved this:
By using terminal I have added arc directory and change its permission
-
Open the Terminal app in your Mac.
-
Enter command:
sudo mkdir arc
- It will ask for permission if you haven't set permission previously for access in App Management.
4.Enter command in terminal:
cd arc
- Enter command in terminal:
sudo git clone https://github.com/kamyarelyasi/Libarclite-Files.git .
Once this command fired now this time to change permission
sudo chmod +x *
Almost done.
Simply search in Xcode for following:
source="$(readlink "${source}")"
and just replace it by following:
source="$(readlink -f "${source}")"
its look like:
DONE. You are able to generate build and also can able to run in simulator.
答案28
得分: 0
如果您在使用LevelDB CocoaPod(FirebaseFirestore和FirebaseDatabase的依赖项)时遇到此问题,我们已发布了一个版本的*leveldb-library*(1.22.2),其中更新了最低Apple平台版本,以与Xcode 14兼容。运行 pod update
以获取1.22.2。
英文:
If you're running into this issue with the LevelDB CocoaPod (a dependency of FirebaseFirestore and FirebaseDatabase), we've published a version of leveldb-library (1.22.2), with updated minimum Apple platform versions to be compatible with Xcode 14. Run pod update
to get 1.22.2.
答案29
得分: 0
Inside script "Pods-${TARGET}-frameworks.sh"
在脚本 "Pods-${TARGET}-frameworks.sh" 内部
Inside function install_framework()
在函数 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
使用过滤器而不是排除,以防丢失的模式引发错误。
1. 修复 $source 变量中的框架路径
在脚本位置找不到框架
source="${1}"
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}""
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
2. 用 --copy-links 替换 rsync --links 标志
rsync 将复制文件和目录而不是符号链接
如果不这样做,稍后在尝试对符号链接进行代码签名时会失败
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}"
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
这就是全部,按下 ctrl+s 并存档
英文:
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=""
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
答案30
得分: 0
你可以在错误信息中看到有问题的 pod(黄色)。我刚刚将它更改为我的目标(14)。
英文:
You can see the offending pod in the errors (yellow). I just changed that to my target (14)
答案31
得分: 0
我在使用Pods为我的应用添加Firebase时遇到了这个问题。对我来说解决它的方法是:在左侧文件导航中选择“Pods”项目,然后选择“General”选项卡,选择“leveldb-library”目标,将最低部署版本设置为iOS 11.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.
答案32
得分: 0
我刚刚通过将FMBD的iOS最低部署版本(对我来说是8)升级到Pods general内的11来解决了这个问题。
英文:
I just fix this issue by upgrading FMBD ios minimum deployment (8 for me) to 11 inside Pods general.
答案33
得分: 0
选择iOS版本11.0或更高版本解决了我的问题。!!!
答案34
得分: -1
你可以将 'libarclite_iphoneos.a' 从 Xcode 14.2 复制到 Xcode 14.3。这对我有效。
英文:
You can copy ‘libarclite_iphoneos.a’ from Xcode 14.2 to Xcode 14.3. It worked for me.
答案35
得分: -2
你只需要将你的 pods 更新到最新版本。
我使用 rvm 重新安装了 Ruby 并更新了 CocoaPods。
之后,我将我的 pods 更新到最新版本,一切都正常(对我来说)。
英文:
You just need to update your pods to the newest version.
I reinstalled ruby with rvm and updated cocoapods.
After that I updated my pods to the newest version and everything works fine (for me).
答案36
得分: -2
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论