*** Install Xcode first for save the time *** Homebrew need xcode command line tools first
Install Git and bash-completion:
brew install git && brew install bash-completion
*** Install Xcode first for save the time *** Homebrew need xcode command line tools first
Install Git and bash-completion:
brew install git && brew install bash-completion
public protocol Localizable { | |
func localize() | |
} | |
public extension Localizable { | |
public func localize(_ string: String?) -> String? { | |
guard let term = string, term.hasPrefix("@") else { | |
return string | |
} |
import UserNotifications | |
// 1. Request Permission | |
func requestAuthorization() { | |
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound]) { (granted, error) in | |
if granted { | |
// Success | |
} else { | |
// Error | |
print(error?.localizedDescription) |