美文网首页
执行 pod install 后 Package.resolve

执行 pod install 后 Package.resolve

作者: zackzheng | 来源:发表于2024-09-03 12:46 被阅读0次

新建ruby脚本文件xxx.rb

# 用于执行 pod install 后恢复被删除的 Package.resolved 文件
# 逻辑是:
# 新开进程,避免当前进程结束导致逻辑未执行
# 睡眠 3s,待 xxx.xcworkspace 生成后,执行 git 命令恢复 Package.resolved 文件

pid = Process.spawn("sleep 3 && git restore HLHS.xcworkspace/xcshareddata/swiftpm/Package.resolved")

添加执行脚本逻辑

Podfile文件末尾添加:

post_install do |installer|
    system "ruby xxx/xxx.rb"
end

执行pod install,问题解决。

相关文章

网友评论

      本文标题:执行 pod install 后 Package.resolve

      本文链接:https://www.haomeiwen.com/subject/ygvkljtx.html