我正在尝试使用嵌套的git子模块创建一个CocoaPod.我可以创建pod,但是,我无法完全安装它.
当我运行时,pod install --verbose我可以看到git submodule update --init正在运行而不是git submodule update --init --recursive没有拉动嵌套的子模块.
CocoaPods是否支持嵌套子模块,或者不支持?我已经在网上搜索潜在的潜在客户,但找不到任何东西!
我还应该提到我lint传递pod lib lint但不pod spec lint. pod spec lint抱怨它无法在嵌套子模块中找到头文件.我不确定这是否与上述问题有关.
(另请注意,我正在研究的这个特定的Pod只是一个概念证明.我将创建一个更复杂的Pod,它依赖于socket.IO-objc.不幸的是socket.IO-objc不能用作Pod ,并依赖于SocketRocket作为子模块.)
这是我的PodSpec:
Pod::Spec.new do |s|
s.name = "DebugTools"
s.version = "0.1.0"
s.summary = "Awesome tools for debugging iOS apps."
s.homepage = "https://github.com/robertcrabtree/DebugTools"
s.license = 'MIT'
s.author = { "Robert Crabtree" => "me@gmail.com" }
s.source = { :git => "https://github.com/robertcrabtree/DebugTools.git", :tag => s.version.to_s, :submodules => true }
s.platform …Run Code Online (Sandbox Code Playgroud) 我正在尝试运行此代码,但它产生了意想不到的结果。
class Test: NSObject {
@objc var property: Int = 0
}
var t = Test()
t.perform(#selector(setter: Test.property), with: 100)
print(t.property)
Run Code Online (Sandbox Code Playgroud)
正在打印的值是一些垃圾数字-5764607523034233277。如何使用 perform 方法设置属性的值?