Intercom Push Notification does not open the chat when cold start in SwiftUI | Community
Skip to main content
Question

Intercom Push Notification does not open the chat when cold start in SwiftUI

  • February 16, 2026
  • 3 replies
  • 114 views

Hello everyone,

I am facing an issue with Intercom Push Notification when it is a cold start (App is terminated, you receive a Push Notification and this notification will wake the App). While testing on Simulator that, if i am running my app from Xcode, terminate the App (on Simulator, not on Xcode), send a message to my test user, wait the push notification, receive it, tap on it but when i tap on it, Intercom Messenger does not opens the modal chat, it keeps me on my WorkListView (WorkList is a subview of RootView, that appears after SplashViews finish animation and transit to WorkListView).

I have already made installation (API Key, API ID and Push Notifications are enabled on Settings > Channel > Messenger > Install > Install for Mobiles), Apple Developer is already configured, when i open the Messenger on my App, i can send and receive messages. When App is open but in background i am able to receive and wake the app in the correct modal Intercom window chat, but only the cold start is not opening in the Modal Window Chat when Push Notification is tapped when App is terminated (not open on iOS)

Here is a little of the architecture of my App:

Simulator: iPhone 17 Pro with iOS 26

Intercom dependency version: 19.5.1

Issue is similar to (at least, the title):

and (at least, the title):

The Info.plist of the App has Push Notifications (IntercomAutoIntegratePushNotifications = NO), Remote Notifications, also Camera and Microphone (this both is not interesting but just saying i have it enabled)
Push Notifications capability is enabled also app has the entitlement file

FYI: I have a legacy App written in Obj-c. It was updated to version 19.4.1 some time ago. Cold start on this legacy app is working fine. I tested, just in case, use version 19.4.1 in the problematic SwiftUI App presenting the cold start problem but did not worked too.

3 replies

In case you guys need:
IntercomManager:
 

import Foundation
import Intercom

final class IntercomManager {
static let shared = IntercomManager()

private let apiKey = "xxxxxxx"
private let appId = "xxxxxxx"

private init() {}

var isUserLoggedIn: Bool {
Intercom.isUserLoggedIn()
}

// MARK: Setup
func configure() {
Intercom.setApiKey(apiKey, forAppId: appId)
Intercom.setThemeOverride(.light) // TODO: Change to .system when we implement Dark Mode

#if DEBUG
Intercom.enableLogging()
#endif
}

// MARK: User Management
func loginUser(email: String) {
let attributes = ICMUserAttributes()
attributes.email = email

Intercom.loginUser(with: attributes) { result in
switch result {
case .success:
#if DEBUG
debugPrint("💬 🔓 ✅ Intercom Login successful with email: \(email)")
#endif
case .failure(let error):
#if DEBUG
debugPrint("💬 🔒 ❌ Intercom Error when logging in: \(error.localizedDescription)")
#endif
}
}
}

func logout() {
Intercom.logout()
#if DEBUG
debugPrint("💬 👋 Intercom Logout")
#endif
}

// MARK: Messenger
func presentMessenger() {
// Ensure push notification registration if user authorized after initial app launch
PushNotificationManager.shared.requestPermissionIfNeeded()

// Always present Intercom messenger, regardless of push notification permission status
Intercom.present()
}

// MARK: Push Notifications
// Called from AppDelegate when device token is received
func registerDeviceToken(_ deviceToken: Data) {
Intercom.setDeviceToken(deviceToken) { result in
switch result {
case .success:
#if DEBUG
debugPrint("💬 🔑 ✅ Device token registered successfully with Intercom")
#endif
case .failure(let error):
#if DEBUG
debugPrint("💬 🔑 ❌ Failed to register device token with Intercom: \(error.localizedDescription)")
#endif
}
}
}
}



AppDelegate:

 

import Intercom

class AppDelegate: NSObject, UIApplicationDelegate, UNUserNotificationCenterDelegate {
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
) -> Bool {
IntercomManager.shared.configure()

if SessionManager.shared.isSessionActive,
let email = SessionManager.shared.authEmail {
IntercomManager.shared.loginUser(email: email)
}

UNUserNotificationCenter.current().delegate = self

// Request push notification permission at app launch
PushNotificationManager.shared.requestPermissionIfNeeded()

return true
}

// MARK: UNUserNotificationCenterDelegate
// Handle notification tap (app in background or terminated)
func userNotificationCenter(
_ center: UNUserNotificationCenter,
didReceive response: UNNotificationResponse,
withCompletionHandler completionHandler: @escaping () -> Void
) {
let userInfo = response.notification.request.content.userInfo

if Intercom.isIntercomPushNotification(userInfo) {
Intercom.handlePushNotification(userInfo)
}

completionHandler()
}

// MARK: Push Notifications
func application(
_ application: UIApplication,
didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data
) {
// Register device token with Intercom
IntercomManager.shared.registerDeviceToken(deviceToken)
}

func application(
_ application: UIApplication,
didFailToRegisterForRemoteNotificationsWithError error: Error
) {
#if DEBUG
debugPrint("🔔 📝 ❌ Failed to register for remote notifications: \(error.localizedDescription)")
#endif
}
}



Startup file:

import SwiftUI
import BackgroundTasks

@main
struct ProduttivoiOSApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
@StateObject private var syncManager = SyncManager.shared

init() {
URLProtocol.registerClass(NetworkLoggingProtocol.self)

_ = AppDatabase.shared

BackgroundSyncHandler.shared.registerBackgroundTask()

Task { @MainActor in
SyncManager.shared.setupSyncTasks([
BaseSyncTask(entity: WorkSyncTask(), identifier: StepSyncDescription.downloadWork)
])
}
}

var body: some Scene {
WindowGroup {
RootView()
.environmentObject(syncManager)
}
}
}

 


Somethings i changed from yesterday (small changes but, the overall problem still NOT fixed): I moved IntercomManager.shared.configure() from startup init file to first line inside didFinishLaunchingWithOptions of AppDelegate
Also, noticed that, i was not making using sessionManager login information to login on Intercom in cases that user has already used app before and there was information about his account in the app on Defaults, so now, also on didFinishLaunchingWithOptions, after IntercomManager.shared.configure(), i use my SessionManager information to login the user on Intercom


It seems that RootView > SplashView > WorkList flow somehow is breaking presentation of the chat conversation (not confirmed, i am still investigating). The bottom ballon preview shows everytime, but the chat does not