Skip to content

Commit

Permalink
[FIX] fcm 옵셔널로 받아옴
Browse files Browse the repository at this point in the history
  • Loading branch information
kimscastle committed Jul 21, 2023
1 parent 6d06cea commit ebec3ea
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion LionHeart-iOS/LionHeart-iOS/Application/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

extension AppDelegate: MessagingDelegate {
func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String?) {
guard let fcmToken else { return }
// guard let fcmToken else { return }
print("✅✅✅✅✅✅✅✅✅✅✅✅✅fcmToken받아오기 성공✅✅✅✅✅✅✅✅✅✅✅✅✅✅")
print("fcmToken: ", fcmToken)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Foundation
struct UserDefaultToken: AppData, Codable {
var refreshToken: String?
var accessToken: String?
let fcmToken: String
let fcmToken: String?

var isExistJWT: Bool {
return !(self.refreshToken == nil)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ final class AuthService: Serviceable {
func login(type: LoginType, kakaoToken: String) async throws {
// 1. UserDefault에서 토큰 가져오기
guard let fcmToken = UserDefaultsManager.tokenKey?.fcmToken else {
throw NetworkError.clientError(code: "", message: UserDefaultsManager.tokenKey)
throw NetworkError.clientError(code: "", message: "\(UserDefaultsManager.tokenKey)")
}
let loginRequest = LoginRequest(socialType: type.raw, token: kakaoToken, fcmToken: fcmToken)

Expand Down

0 comments on commit ebec3ea

Please sign in to comment.