提问人:Vatsal Bhatt 提问时间:10/12/2023 更新时间:10/13/2023 访问量:99
XCode 15 收到错误,项目中甚至没有这样的模块“YOChartImageKit”框架
XCode 15 getting error of No such module 'YOChartImageKit' even framework is there in Project
问:
- 使用 YOChartImageKit 的 pod 仍然收到 No such module 的错误。 (https://i.stack.imgur.com/fuqw0.png)
多次执行以下步骤,但未获得结果。 我尝试删除 pod 并重新安装。 清理项目 -> 删除 DerivedData ->打开的项目。
答:
0赞
Zoli
10/12/2023
#1
“YOChartImageKit”框架很可能不会构建。这是因为这是一个非常古老的图书馆。podspec 指示最低部署目标是 iOS 7.0。基于此(https://developer.apple.com/forums/thread/728021),较新的 Xcode 版本不再支持为此类旧部署目标进行构建。
我建议将以下代码片段添加到您的 podfile 中:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
end
end
end
然后,您必须执行一个操作,并且可能必须在目标的构建设置中将用户脚本沙盒构建选项设置为 NO。pod install
我能够以这种方式成功构建它。但是,我想指出的是,这个库非常古老(废弃软件)。请在使用前考虑到这一点。
评论
0赞
Vatsal Bhatt
10/12/2023
好的,谢谢,我尝试了与您提到的相同的方法,但仍然遇到如下错误。1. 未定义符号:_OBJC_CLASS_$_YOBarChartimage 2.链接器命令失败,退出代码为 1(使用 -v 查看调用)
0赞
Zoli
10/12/2023
请检查我的更新
评论