Skip to content

Instantly share code, notes, and snippets.

@litoarias
Created October 13, 2021 12:08
Show Gist options
  • Save litoarias/f7c77138e04a9b588060bdc954d95ba2 to your computer and use it in GitHub Desktop.
Save litoarias/f7c77138e04a9b588060bdc954d95ba2 to your computer and use it in GitHub Desktop.
Keychain manager for fastlane
def delete_temp_keychain(name)
delete_keychain(
name: name
) if File.exist? File.expand_path("~/Library/Keychains/#{name}-db")
end
def create_temp_keychain(name, password)
create_keychain(
name: name,
password: password,
unlock: false,
timeout: 0
)
end
def ensure_temp_keychain(name, password)
delete_temp_keychain(name)
create_temp_keychain(name, password)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment