cask "whatsapp" do version "2.24.22.84" sha256 "042580b801e6881d4d2ed44c62a40588f3ac27970d10e34a3e51644c88c284a1" url "https://web.whatsapp.com/desktop/mac_native/release/?version=#{version}&extension=zip&configuration=Release&branch=relbranch" name "WhatsApp" desc "Native desktop client for WhatsApp" homepage "https://www.whatsapp.com/" livecheck do url "https://web.whatsapp.com/desktop/mac_native/updates/?branch=relbranch&configuration=Release" regex(/version=v?(\d+(?:\.\d+)+)/i) strategy :sparkle do |item, regex| item.url.scan(regex).map(&:first) end end auto_updates true conflicts_with cask: [ "whatsapp@beta", "whatsapp@legacy", ] depends_on macos: ">= :big_sur" app "WhatsApp.app" zap trash: [ "~/Library/Application Scripts/net.whatsapp.WhatsApp*", "~/Library/Caches/net.whatsapp.WhatsApp", "~/Library/Containers/net.whatsapp.WhatsApp*", "~/Library/Group Containers/group.com.facebook.family", "~/Library/Group Containers/group.net.whatsapp*", "~/Library/Saved Application State/net.whatsapp.WhatsApp.savedState", ] end