Skip to content

Instantly share code, notes, and snippets.

Manu Rodríguez MRodSebastian

  • iOS Developer at WeFish
  • Murcia (Spain)
View GitHub Profile
View AppleSignCheckCredentials.swift
private func checkCredentialsState(_ userID :String, functionOK :@escaping(() -> Void), functionError :@escaping((Error) -> Void)){
let authProvider = ASAuthorizationAppleIDProvider()
authProvider.getCredentialState(forUserID: userID, completion: {state, error in
switch state{
case .authorized:
functionOK()
case .notFound, .revoked:
functionError(error)
default:
break
@MRodSebastian
MRodSebastian / AppleSignInExample.swift
Last active Mar 19, 2020
Sign In with Apple example
View AppleSignInExample.swift
import UIKit
import AuthenticationServices
class AppleSignInViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
setAppleSignButton()
}
You can’t perform that action at this time.