Skip to content

Commit

Permalink
fix: 푸시 알림 물어보는 타이밍 조정
Browse files Browse the repository at this point in the history
  • Loading branch information
enebin committed Oct 18, 2023
1 parent 5416b6a commit 117222d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Projects/Keyme/Sources/KeymeApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ struct KeymeApp: App {
class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate {
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
@Dependency(\.notificationManager) var notificationManager

Messaging.messaging().apnsToken = deviceToken
Messaging.messaging().token { token, error in
if let error = error {
Expand All @@ -46,6 +46,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
@Dependency(\.notificationManager) var notificationManager
Task { try await notificationManager.registerPushNotification() }

if let kakaoAPIKey = Bundle.main.object(forInfoDictionaryKey: "KAKAO_API_KEY") as? String {
KakaoSDK.initSDK(appKey: kakaoAPIKey)
}
Expand Down
2 changes: 1 addition & 1 deletion Tuist/ProjectDescriptionHelpers/Project+App.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ extension Project {
infoPlist: .extendingDefault(with: Project.infoPlist),
sources: ["Sources/**"],
resources: [.glob(pattern: "Resources/**", excluding: [])],
entitlements: .relativeToRoot("Keyme.entitlements"),
entitlements: .file(path: .relativeToRoot("Keyme.entitlements")),
scripts: Project.lintScript + Project.encryptionScript,
dependencies: internalDependencies + externalDependencies,
settings: .settings(base: .baseSettings, configurations: XCConfig.project)
Expand Down

0 comments on commit 117222d

Please sign in to comment.