Skip to content

Instantly share code, notes, and snippets.

@Yoloabdo
Last active June 4, 2020 20:00
Show Gist options
  • Select an option

  • Save Yoloabdo/c236723cc7e7f810be1b1e7d255ad76b to your computer and use it in GitHub Desktop.

Select an option

Save Yoloabdo/c236723cc7e7f810be1b1e7d255ad76b to your computer and use it in GitHub Desktop.
extension PreferredAuthMethod {
func getService(source: UIViewController?, delegate: AuthServiceDelegate?) -> AuthService {
switch self {
case .apple:
if #available(iOS 13.0, *) {
return AppleAuthService(source, delegate: delegate)
} else {
return EmptyAuthService()
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment