Created
November 2, 2020 19:48
-
-
Save meyusufdemirci/f19896952538c9d08de232cdb81aeb9b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if let userId: String = KeychainManager.shared["userId"], !userId.isEmpty { | |
| // found an userId, which means the user already has opened the app before | |
| // next step: open the home screen or whatever you want | |
| } else { | |
| // the user launches the app for the first time | |
| let newUserId = uniqueId(length: 10) | |
| KeychainManager.shared["userId"] = newUserId | |
| // next step: open the home screen or whatever you want | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment