我使用的是 cocoapods 1.1.1,在我的 podfile 中,我有不止一个 post_install 钩子。我收到此错误:
[!] Invalid `Podfile` file: [!] Specifying multiple `post_install` hooks is unsupported..
-------------------------------------------
#
> post_install do |installer|
# installer.pods_project.targets.each do |target|
Run Code Online (Sandbox Code Playgroud)
以前有人遇到过同样的问题吗?是的!我的 1 个目标中有 1 个 post_install,全局范围中有另一个。我可以搬进去一个,但为什么呢?
当我从我的主要目标中删除我的代码并移动到全局范围的 post_install 块中时,它就像魅力一样。
出于某种原因,如果您添加多个 post_install(例如全局和 1 个目标)将它们移动到同一个全局块中并添加 if-else 语句来管理目标。
| 归档时间: |
|
| 查看次数: |
7098 次 |
| 最近记录: |