Skip to content

Commit

Permalink
🔧 Updated on foreground observer
Browse files Browse the repository at this point in the history
  • Loading branch information
joaodordio committed Jan 16, 2025
1 parent d3c7526 commit 6111e5f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions swift-sdk/Internal/InternalIterableAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,11 @@ final class InternalIterableAPI: NSObject, PushTrackerProtocol, AuthProvider {
}

@objc private func onAppDidBecomeActiveNotification(notification: Notification) {
handlePushNotificationState()
handleMatchingCriteriaState()
}

private func handlePushNotificationState() {
guard config.autoPushRegistration else { return }

notificationStateProvider.isNotificationsEnabled { [weak self] systemEnabled in
Expand All @@ -928,6 +933,12 @@ final class InternalIterableAPI: NSObject, PushTrackerProtocol, AuthProvider {
}
}

private func handleMatchingCriteriaState() {
guard !config.disableOnForegroundCriteriaFetching else { return }

// TODO: Implement criteria fetching
}

private func handle(launchOptions: [UIApplication.LaunchOptionsKey: Any]?) {
guard let launchOptions = launchOptions else {
return
Expand Down

0 comments on commit 6111e5f

Please sign in to comment.