-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Remove redundant code and add token setup functionality
- Removed redundant code related to token handling in SceneDelegate. - Added TokenSetting struct with setup function for token management. - Created TokenSetting.swift file to handle token setup logic.
- Loading branch information
Showing
4 changed files
with
28 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
22 changes: 22 additions & 0 deletions
22
Projects/Noffice/Noffice/Sources/Setting/TokenSetting.swift
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// | ||
// TokenSetting.swift | ||
// Noffice | ||
// | ||
// Created by DOYEON LEE on 8/28/24. | ||
// | ||
|
||
import KeychainUtility | ||
import Router | ||
|
||
@MainActor | ||
struct TokenSetting { | ||
static func setup() { | ||
let tokenKeychainManager = KeychainManager<Token>() | ||
if let token = tokenKeychainManager.get() { | ||
print(token) | ||
} else { | ||
print("has no token") | ||
Router.shared.presentFullScreen(.signup, animated: false) | ||
} | ||
} | ||
} |
This file contains 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