@@ -357,7 +357,9 @@ final class IterableAPIInternal: NSObject, PushTrackerProtocol, AuthProvider {
357
357
358
358
private var config : IterableConfig
359
359
360
+ // Following are needed for handling pending notification and deep link.
360
361
static var pendingNotificationResponse : NotificationResponseProtocol ?
362
+ static var pendingUniversalLink : URL ?
361
363
362
364
private let dateProvider : DateProviderProtocol
363
365
private let inAppDisplayer : InAppDisplayerProtocol
@@ -516,7 +518,10 @@ final class IterableAPIInternal: NSObject, PushTrackerProtocol, AuthProvider {
516
518
517
519
handle ( launchOptions: launchOptions)
518
520
519
- handlePendingNotifications ( )
521
+
522
+ handlePendingNotification ( )
523
+
524
+ handlePendingUniversalLink ( )
520
525
521
526
requestProcessor. start ( )
522
527
@@ -540,7 +545,7 @@ final class IterableAPIInternal: NSObject, PushTrackerProtocol, AuthProvider {
540
545
}
541
546
}
542
547
543
- private func handlePendingNotifications ( ) {
548
+ private func handlePendingNotification ( ) {
544
549
if let pendingNotificationResponse = Self . pendingNotificationResponse {
545
550
if #available( iOS 10 . 0 , * ) {
546
551
IterableAppIntegration . implementation? . userNotificationCenter ( nil , didReceive: pendingNotificationResponse, withCompletionHandler: nil )
@@ -549,6 +554,13 @@ final class IterableAPIInternal: NSObject, PushTrackerProtocol, AuthProvider {
549
554
}
550
555
}
551
556
557
+ private func handlePendingUniversalLink( ) {
558
+ if let pendingUniversalLink = Self . pendingUniversalLink {
559
+ handleUniversalLink ( pendingUniversalLink)
560
+ Self . pendingUniversalLink = nil
561
+ }
562
+ }
563
+
552
564
private func checkForDeferredDeepLink( ) {
553
565
guard config. checkForDeferredDeeplink else {
554
566
return
0 commit comments