Cocoapod“pod spec lint”CompileSwift返回了一个不成功的退出代码

问题描述 投票:0回答:1

我正在尝试创建我的第一个Cocoapod,到目前为止我已经设置了我的pod,但是当我尝试lint或push时,我得到了一堆构建错误。包含swift代码的pod使用sqlite3库。我已将它链接到Xcode pod项目的构建阶段,我可以从那里构建好,但是当我在我的pod上运行pod repo push时,它会尝试构建并失败并出现一堆“使用未解析的标识符”错误,大概来自没有依赖。我还在我的podspec文件中添加了s.library = 'sqlite3',但没有运气。

这是一个片段

- ERROR | [iOS] xcodebuild:  SQLift/SQLift/Classes/PreparedStatement.swift:51:16: error: value of type 'String' has no member 'isValid'
- ERROR | [iOS] xcodebuild:  SQLift/SQLift/Classes/PreparedStatement.swift:61:16: error: use of unresolved identifier 'sqlite3_bind_null'
- ERROR | [iOS] xcodebuild:  SQLift/SQLift/Classes/PreparedStatement.swift:61:55: error: use of unresolved identifier 'SQLITE_OK'
- ERROR | [iOS] xcodebuild:  SQLift/SQLift/Classes/PreparedStatement.swift:62:41: error: use of unresolved identifier 'sqlite3_errmsg'
- ERROR | [iOS] xcodebuild:  SQLift/SQLift/Classes/PreparedStatement.swift:67:16: error: use of unresolved identifier 'sqlite3_bind_int'
- ERROR | [iOS] xcodebuild:  SQLift/SQLift/Classes/PreparedStatement.swift:67:76: error: use of unresolved identifier 'SQLITE_OK'
- ERROR | [iOS] xcodebuild:  SQLift/SQLift/Classes/PreparedStatement.swift:68:41: error: use of unresolved identifier 'sqlite3_errmsg'
- ERROR | [iOS] xcodebuild:  SQLift/SQLift/Classes/PreparedStatement.swift:73:16: error: use of unresolved identifier 'sqlite3_bind_text'
- ERROR | [iOS] xcodebuild:  SQLift/SQLift/Classes/PreparedStatement.swift:73:95: error: use of unresolved identifier 'SQLITE_OK'
- ERROR | [iOS] xcodebuild:  SQLift/SQLift/Classes/PreparedStatement.swift:74:41: error: use of unresolved identifier 'sqlite3_errmsg'
- ERROR | [iOS] xcodebuild:  SQLift/SQLift/Classes/PreparedStatement.swift:79:16: error: use of unresolved identifier 'sqlite3_bind_double'

我仍然是创建豆荚的新手,我不太确定如何解决这个问题,任何帮助都会受到赞赏。

swift xcode sqlite cocoapods
1个回答
1
投票

--no-clean选项添加到pod spec lint命令以获取Xcode工作区,您可以在其中重现和调试构建问题。

© www.soinside.com 2019 - 2024. All rights reserved.