在单个项目中使用 Swift Package Manager 和 CocoaPods 的问题
我们决定将SPM用于我们的新内部框架。我们的应用程序(目前)在某些可可录中具有许多依赖关系。因此,我认为添加SPM非常容易。
我创建了一个本地的Swift软件包,并将其与该项目链接在一起。一切都很好,直到我将新软件包导入到swift
文件中,
然后尝试在iOS模拟器上构建,我将面临以下编译器错误:
找不到Module'Corekit “针对目标” x86_64-Apple-ios-Simulator';
我能够构建到设备,没问题。只是不是模拟器。
我们面临类似的豆荚问题。这导致我们在podfile
中添加以下内容
installer_representation.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
,因为我们使用M1机器。
我已经尝试了以下操作:
- 从
排除架构
- 设置
仅构建Active Archives
是是YAS/no - 添加添加
x86_64
to架构
- 从
ARM64
中删除podfile
的配置,
以开放有关我们如何解决此问题的任何建议。
谢谢
We've decided to use SPM for our new internal frameworks. Our app has many dependencies (for the moment) on some CocoaPods. So, I figured adding SPM would be easy enough.
I created a local Swift Package and linked it against the project. All good, until I import the new Package into a Swift
file
Once I do that and try build on the iOS simulator, I am faced with the following compiler error:
could not find module 'CoreKit' for target 'x86_64-apple-ios-simulator';
I am able to build to a device, no problem. Just not the simulator.
We faced a similar issue for Pods; which resulted us adding the following in our Podfile
installer_representation.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
We had to do this, since we use M1 Machines.
I have tried the following:
- Removing
arm64
from theExcluded Architectures
- Setting
Build Active Archives only
toYES/NO
- Adding
x86_64
toArchitectures
- Removing the config for
arm64
from thePodfile
Open to any suggestions on how we can resolve this.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论