diff --git a/Projects/App/Sources/Reducer/AppCoordinator.swift b/Projects/App/Sources/Reducer/AppCoordinator.swift index 48920747..50a7359c 100644 --- a/Projects/App/Sources/Reducer/AppCoordinator.swift +++ b/Projects/App/Sources/Reducer/AppCoordinator.swift @@ -171,6 +171,10 @@ struct AppCoordinator { pushClient: pushClient, notificationClient: notificationClient ), + requestNotificationAuthorizationIfNeededEffect( + pushClient: pushClient, + notificationClient: notificationClient + ), subscribeTokenRefreshEffect( pushClient: pushClient, notificationClient: notificationClient @@ -348,7 +352,7 @@ private func registerFCMTokenEffect( // 1. 현재 권한 상태 확인 let settings = await UNUserNotificationCenter.current().notificationSettings() - // 이미 권한이 허용된 경우에만 등록 (notDetermined/denied는 온보딩 완료 시점에서 처리) + // 이미 권한이 허용된 경우에만 등록 (notDetermined는 별도 fallback/온보딩에서 처리) guard settings.authorizationStatus == .authorized else { return } // 3. APNS 등록 및 FCM 토큰 획득 @@ -364,6 +368,29 @@ private func registerFCMTokenEffect( } } +private func requestNotificationAuthorizationIfNeededEffect( + pushClient: PushClient, + notificationClient: NotificationClient +) -> Effect { + .run { send in + let settings = await UNUserNotificationCenter.current().notificationSettings() + guard settings.authorizationStatus == .notDetermined else { return } + + let granted = (try? await pushClient.requestAuthorization()) ?? false + guard granted else { return } + + await pushClient.registerForRemoteNotifications() + + guard let token = try? await pushClient.getFCMToken(), + let deviceId = await UIDevice.current.identifierForVendor?.uuidString else { + return + } + + try? await notificationClient.registerFCMToken(token, deviceId) + await send(.registerFCMTokenCompleted) + } +} + private func subscribeTokenRefreshEffect( pushClient: PushClient, notificationClient: NotificationClient diff --git a/Projects/Feature/Settings/Sources/Settings/SettingsView.swift b/Projects/Feature/Settings/Sources/Settings/SettingsView.swift index 4f93deee..fdb14a13 100644 --- a/Projects/Feature/Settings/Sources/Settings/SettingsView.swift +++ b/Projects/Feature/Settings/Sources/Settings/SettingsView.swift @@ -124,9 +124,7 @@ private extension SettingsView { } label: { Image.Icon.Symbol.edit .resizable() - .renderingMode(.template) .frame(width: 24, height: 24) - .foregroundStyle(Color.Gray.gray500) } .frame(width: 44, height: 44) } @@ -139,17 +137,18 @@ private extension SettingsView { nicknameTextField .frame(maxWidth: .infinity) } + .padding(.bottom, Spacing.spacing9) } var nicknameTextField: some View { TXTextField( text: $store.nickname, placeholderText: "닉네임을 입력해 주세요.", + isFocused: $isTextFieldFocused, submitLabel: .done, tintColor: Color.Gray.gray500, subText: .init(text: "닉네임 2-8자", state: validationState) ) - .focused($isTextFieldFocused) .onAppear { isTextFieldFocused = true } diff --git a/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Illustration/icon_profile.imageset/icon_profile.png b/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Illustration/icon_profile.imageset/icon_profile.png index 9b6213fd..7ef194de 100644 Binary files a/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Illustration/icon_profile.imageset/icon_profile.png and b/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Illustration/icon_profile.imageset/icon_profile.png differ diff --git a/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Illustration/icon_profile.imageset/icon_profile@2x.png b/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Illustration/icon_profile.imageset/icon_profile@2x.png index 3680c3c9..8312353c 100644 Binary files a/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Illustration/icon_profile.imageset/icon_profile@2x.png and b/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Illustration/icon_profile.imageset/icon_profile@2x.png differ diff --git a/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Illustration/icon_profile.imageset/icon_profile@3x.png b/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Illustration/icon_profile.imageset/icon_profile@3x.png index ba42ffe3..3c7670bc 100644 Binary files a/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Illustration/icon_profile.imageset/icon_profile@3x.png and b/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Illustration/icon_profile.imageset/icon_profile@3x.png differ diff --git a/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Symbol/ic_edit.imageset/Contents.json b/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Symbol/ic_edit.imageset/Contents.json index c596a82d..454d698d 100644 --- a/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Symbol/ic_edit.imageset/Contents.json +++ b/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Symbol/ic_edit.imageset/Contents.json @@ -1,15 +1,23 @@ { "images" : [ { - "filename" : "ic_edit.svg", - "idiom" : "universal" + "filename" : "ic_edit.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ic_edit@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ic_edit@3x.png", + "idiom" : "universal", + "scale" : "3x" } ], "info" : { "author" : "xcode", "version" : 1 - }, - "properties" : { - "preserves-vector-representation" : true } } diff --git a/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Symbol/ic_edit.imageset/ic_edit.png b/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Symbol/ic_edit.imageset/ic_edit.png new file mode 100644 index 00000000..f4b0064f Binary files /dev/null and b/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Symbol/ic_edit.imageset/ic_edit.png differ diff --git a/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Symbol/ic_edit.imageset/ic_edit.svg b/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Symbol/ic_edit.imageset/ic_edit.svg deleted file mode 100644 index 84f24af7..00000000 --- a/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Symbol/ic_edit.imageset/ic_edit.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Symbol/ic_edit.imageset/ic_edit@2x.png b/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Symbol/ic_edit.imageset/ic_edit@2x.png new file mode 100644 index 00000000..ee567a0b Binary files /dev/null and b/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Symbol/ic_edit.imageset/ic_edit@2x.png differ diff --git a/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Symbol/ic_edit.imageset/ic_edit@3x.png b/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Symbol/ic_edit.imageset/ic_edit@3x.png new file mode 100644 index 00000000..97637a2e Binary files /dev/null and b/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Symbol/ic_edit.imageset/ic_edit@3x.png differ