podspec 中的 CocoaPod post_install 未执行
CocoaPod post_install in podspec isn't executed
我有一个带有 pod_install 动作的 cocoapod podspec,但我没有看到它被 pod install
执行
这是 podspec
Pod::Spec.new do |spec|
spec.name = '<NAME>'
...
def spec.post_install(target_installer)
puts "\nRUNNING POST_INSTALL hook \n"
system 'echo `pwd` > /tmp/e.log'
end
end
虽然没有消息输出或/tmp/e.log文件
在 post_install 中调用 system
的目的是在 pod 安装后解压大文件
谢谢!
终于有了解决方案:
spec.prepare_command = <<-CMD
...
CMD
工作做得好
我有一个带有 pod_install 动作的 cocoapod podspec,但我没有看到它被 pod install
这是 podspec
Pod::Spec.new do |spec|
spec.name = '<NAME>'
...
def spec.post_install(target_installer)
puts "\nRUNNING POST_INSTALL hook \n"
system 'echo `pwd` > /tmp/e.log'
end
end
虽然没有消息输出或/tmp/e.log文件
在 post_install 中调用 system
的目的是在 pod 安装后解压大文件
谢谢!
终于有了解决方案:
spec.prepare_command = <<-CMD
...
CMD
工作做得好