ios - 为什么我得到一个 ld:framework not foundpod repo推送期间构建错误?
问题描述
我有一个为 iOS 构建的框架,动态框架带有用于 x86_64 (iosSimulator)、arm64 和 arm64e 的通用二进制文件。
当我将它拖到应用程序并使用它时,该框架工作正常。
当我在我的机器上使用包含框架的 repo 和我机器上的另一个 specs repo 时,Pod repo push 工作正常。我使用 git init --bare 创建了存储库
当我使用 github 并将规范指向 github 存储库而不是我的本地存储库时,它会以ld:framework not found <frameworkName>
. 当我跳过验证并推送并最终在使用 pod 文件的应用程序中使用它时,我得到相同的错误,ld:framework not found <frameworkName>
.
唯一的区别是我已经从保存框架的本地 git 存储库转移到 Github 上的一个。
编辑:
在下面粘贴 podspec
Pod::Spec.new do |s|
s.name = "frameworkName"
s.version = "0.51.0"
s.summary = "A brief description of frameworkName project."
s.description = <<-DESC
An extended description of frameworkName project.
DESC
s.homepage = "http://your.homepage/here"
s.license = { :type => 'Copyright', :text => <<-LICENSE
Copyright 2018
Permission is granted to...
LICENSE
}
s.author = { "myname" => "" }
s.source = { :git => "<git hub repo>", :tag => "#{s.version}", :branch => "iOS_Framework" }
s.ios.vendored_frameworks = "frameworkName.framework"
s.vendored_frameworks = "frameworkName.framework"
s.ios.deployment_target = '12.0'
s.pod_target_xcconfig = { 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }
s.user_target_xcconfig = { 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }
end
解决方案
它最终成为一个区分大小写的问题。repo 上的框架被命名为 frameworkName.Framework 而不是 frameworkName.framework。改了之后就可以用了。
不知道为什么本地 git repo 没有问题。
推荐阅读
- python - 如何使用模仿此 R 代码行为的 Python 将文件发布到服务器?
- databricks - Aws S3 到 Databricks 挂载不起作用
- python - 将分割图矢量化为 RGB 颜色
- python-3.x - 谷歌分析管理 API
- flutter - 如何导入颤振(不是飞镖)收藏库?
- react-native - 为什么 hitSlop 在这个嵌套的 TouchableOpacity 组件中不起作用?
- python - 向量和标量之间的元素乘法与两个矩阵
- python - 从父目录导入 .py 文件
- tensorflow - 为什么 flatten() 在 co-lab 中不起作用,而在其他用户发布的 kaggle-notebook 中起作用?
- c# - 在 LINQ 中动态添加左连接/列