ios - 自定义 Cocoapod 总是返回“No such module XXX”
问题描述
我按照这里找到的指南
这是我的.podspec
文件
Pod::Spec.new do |s|
s.name = "iOSUtils"
s.version = "0.0.1"
s.summary = "A really short description of MyFramework."
s.description = <<-DESC
A much much much longer description of MyFramework.
DESC
s.homepage = "https://github.com/xxxxxxx/ios-utils"
s.license = "MIT"
s.author = { "xxxxxxx" => "xxxxxxx@xxxxxxx.io" }
s.source = { :path => '.' }
# s.source = { :git => "https://github/samwize/MyFramework", :tag => "#{s.version}" }
s.source_files = "Source/**/*.swift"
end
出于测试目的,我创建了一个简单的服务
public class TestService {
static public let shared = TestService()
private init() { }
public func foo() {
print("bar")
}
}
我的Podfile
项目将使用这个新框架pod 'iOSUtils', :path => '../iOSUtils'
,运行 install 返回成功消息。
但是,当我尝试导入我的模块时,我收到no such module
错误并且无法构建。
还查看我的项目,我看不到开发 pod 下包含的源代码
解决方案
尝试将您的包名称添加到s.source_files
您的iOSUtils.podspec
文件中。
s.source_files = "iOSUtils/Source/**/*.swift"
推荐阅读
- r - 在 R 中使用“extRemes”拟合广义极值 (GEV) 时出错?
- python - 改进一个简单的 1 层神经网络
- swift - Swift,翠鸟缓存无法正常工作?
- windows - seek_cur 命令将光标设置在文件中的未知位置
- automator - 授权 UNIX 命令控制应用程序
- windows - 什么是二进制 STR_FILE_SYS_BIND_DATA_WIN7_FORMAT PIDL 格式?
- excel - 如何使用自动筛选数据更新列表框?
- firebase - 在页面卸载之前提出请求
- c# - OWIN 外部 Cookie 消失
- ruby-on-rails - 为什么我得到 MongoID::Criteria 的未定义方法页面