이상한 문제가 있습니다. 아래 코드를 사용하여 didFinishLaunchingWithOptions 내에서 원격 알림 승인을 요청하면 내 서버 (Firebase Messaging)에서 밀어 넣기 원격 알림을받을 수 있지만 나중에 승인을 요청하려고 할 때 안쪽 didFinishLaunchingWithOptions ' 통지를받을 수 없습니다.앱의 수명주기에서 다른 시간에 원격 알림 인증을 요청 하시겠습니까?
출시시 승인을 요청하고 싶지 않습니다. 예를 들어 사용자가 로그인 한 후 승인을 요청하고 싶습니다.
애플 문서는 말한다 :이 문제에
Always call this method before scheduling any local notifications and before registering with the Apple Push Notification Service. Typically, you call this method at launch time when configuring your app's notification support. However, you may call it at another time in your app's life cycle, providing that you call it before performing any other notification-related tasks.
// For iOS 10 display notification (sent via APNS)
UNUserNotificationCenter.current().delegate = self
let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound]
UNUserNotificationCenter.current().requestAuthorization(
options: authOptions,
completionHandler: {_, _ in })
UIApplication.shared.registerForRemoteNotifications()
어떤 제안/솔루션?
앱 정보 : 배포 대상 : 아이폰 OS 10.3 iOS 기기 : 아이폰 OS와 아이폰 OS 10/아이폰 7 아이폰 6 그래서 여기에 11
여기서 다른 지점은 어디입니까? – TNguyen
무슨 뜻이야?! – Jad
또 어디서 권한 부여를 요청합니까? 또한 궁금한 점이 있다면 나중에 왜 다시 등록해야합니까? 아니면 나중에 등록하길 원합니다 – TNguyen