cask 'appcode' do version '2019.3.1,193.5233.146' sha256 '170d1f4ea8e82a963ab90bf5e0cd74c15b6f6554a6fc41b4fcc998d4967cb525' url "https://download.jetbrains.com/objc/AppCode-#{version.before_comma}.dmg" appcast 'https://data.services.jetbrains.com/products/releases?code=AC&latest=true&type=release' name 'AppCode' homepage 'https://www.jetbrains.com/objc/' auto_updates true app 'AppCode.app' uninstall_postflight do ENV['PATH'].split(File::PATH_SEPARATOR).map { |path| File.join(path, 'appcode') }.each { |path| File.delete(path) if File.exist?(path) && File.readlines(path).grep(%r{# see com.intellij.idea.SocketLock for the server side of this interface}).any? } end zap trash: [ "~/Library/Application Support/AppCode#{version.major_minor}", "~/Library/Caches/AppCode#{version.major_minor}", "~/Library/Logs/AppCode#{version.major_minor}", "~/Library/Preferences/AppCode#{version.major_minor}", ] end