iOS Sales force CHAT SDK crash when the sales force agent accepts the call.

I'm using the SF SDK version: 224.0.2. The app is breaking in Urban Airship side. Not clear to me why this is happening. It looks like Urban Airship is trying to process a push notification without data, just after the SF agent accepts the chat request on the web.

The error: Thread 1: Swift runtime failure: Unexpectedly found nil while unwrapping an Optional value

File: PushPayload.swift

1 Answer 1


I was able to solve the problem by turning off the background notifications from the chat configuration object.

if let config = SCSChatConfiguration(liveAgentPod: "something-salesforceliveagent.com",
                                         orgId: "your_orgid",
                                         deploymentId: "your_deplymentid",
                                         buttonId: "your_button_id"
                                         ) {
        config.allowBackgroundNotifications = false
        ServiceCloud.shared().chatUI.showChat(with: config)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .