I am trying to distribute my app through homebrew-cask, but I have encountered an issue. The problem is that homebrew-cask doesn't support separate builds for Apple silicon and Intel processor macOS. Instead, we need a universal binary. My question is, does homebrew-cask provide architecture-based distribution support for the same app?
A solution except for universal binary and asking for help in creating the cask file.
I read at "Cask Cookbook / Conditional statements":
So try and create a Cask file with architecture conditional: you can specify different URLs and SHA-256 hashes for ARM (Apple Silicon) and Intel architectures.
Replace
sha256_arm64_versionandsha256_x86_64_versionwith the actual SHA-256 hashes of your ARM and Intel builds.Adjust the
urlto point to where your different architecture builds are hosted.Test the cask locally to make sure it works correctly on both architectures. Once tested, you can submit your cask to the Homebrew-Cask repository for inclusion.
An alternative approach would be to use the
lipotool to combine your separate Apple Silicon and Intel builds into a single universal binary.Then fork the homebrew-cask repository on GitHub, and create a new cask file in the
Casksdirectory.