grab / grab/cocoapods-binary-cache

Podfile pre_install hook does not run when prebuild

Open
#114 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
488
Forks
69
PR merge metrics
No merged PRs in 30d

Description

### Checklist

- [x] I've read the [Contribution Guidelines](https://github.com/grab/cocoapods-binary-cache/blob/master/CONTRIBUTING.md)
- [x] I've searched for [existing GitHub issues](https://github.com/grab/cocoapods-binary-cache/issues) if there was such a request before.

### Description
Sometimes we have a outdated library, or a library that doesn't compile when a new Xcode is released, and we want to do a temporary `pre_install` hook that modify the lib source code. When `cocoapods-binary-cache` run its `prebuild` step, it will run pod install again without running `pre_install` hook, and it will fail to build the lib.

For example, old version of [`Charts`](https://github.com/danielgindi/Charts) doesn't compile with Xcode 14. I added a hook to modify its source and log a message.

Output of `$ bundle exec pod install`:

![image](https://user-images.githubusercontent.com/4200743/197435339-f29e7bd3-655e-4455-9e61-e6df1072e73a.png)

Output of `$ bundle exec pod binary prebuild`:

![image](https://user-images.githubusercontent.com/4200743/197435630-a194482b-56bf-405a-8132-ddd8330eaffa.png)

Notice it builds frameworks without running the hook, and later will fail.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.