firebase auth와 facebook, google oauth를 이용 사용자의 접속을 관리하는 경우. 사용자가 sign out작업을 하면 두단계로 이를 처리한다. 우선 firebase auth 단계에서 처리하고 각각 google, facebook에서도 개별 처리해주어야 한다.

https://stackoverflow.com/a/42002262

facebook의 예시

You don’t need completion blocks, as the method is synchronous.

@IBAction func logOut(_ sender: UIButton) {
    guard FIRAuth.auth()?.currentUser != nil else {
        return
    }            

    do {
       try FIRAuth.auth()?.signOut()
       FBSDKAccessToken.setCurrent(nil)
       loggedIn = false
       storedValuesData.setValue(nil, forKey: "savedLoginEmail")
       storedValuesData.setValue(nil, forKey: "savedLoginPassword")
       jumpToVC1()
    } catch let error as NSError {
        print(error.localizedDescription)
    }
}

https://stackoverflow.com/a/40107017

google 의 예시

Try adding GIDSignIn.sharedInstance().signOut() for signout

firebase auth와 facebook, google oauth를 이용 사용자의 접속을 관리하는 경우. 사용자가 sign out작업을 하면 두단계로 이를 처리한다. 우선 firebase auth 단계에서 처리하고 각각 google, facebook에서도 개별 처리해주어야 한다.

https://stackoverflow.com/a/42002262

facebook의 예시

You don’t need completion blocks, as the method is synchronous.

@IBAction func logOut(_ sender: UIButton) {
    guard FIRAuth.auth()?.currentUser != nil else {
        return
    }            

    do {
       try FIRAuth.auth()?.signOut()
       FBSDKAccessToken.setCurrent(nil)
       loggedIn = false
       storedValuesData.setValue(nil, forKey: "savedLoginEmail")
       storedValuesData.setValue(nil, forKey: "savedLoginPassword")
       jumpToVC1()
    } catch let error as NSError {
        print(error.localizedDescription)
    }
}

https://stackoverflow.com/a/40107017

google 의 예시

Try adding GIDSignIn.sharedInstance().signOut() for signout

Swift: Create Facebook Live Stream Animation

물결치는 하트와 엄지척 만들기

drand48()   –  0-1 random 숫자 만들기

CAKeyFrameAnimation

UIBezierPath

CAMediaTimingFunction