Skip to main content
Answered

Crash on CarPlay


Hi, the SDK crash if I try to start a CarPlay app.

 

The error is

 

[CPTemplateApplicationScene windows]: unrecognized selector sent to instance 0x1228ef470

 

The error is thrown from login method:

 

Intercom.loginUser(with: attributes, completion: nil)

Best answer by User1891

I believe this issue is caused by the SDK assuming that all scenes returned from `UIApplication.shared.connectedScenes` are `UIWindowScene`’s, but that is not the case.

I suspect that this issue could be fixed by filtering to only the connected scenes like so:

let windowScenes = UIApplication.shared.connectedScenes.compactMap { $0 as? UIWindowScene }

// Now each window scene will have a windows property
// which you can access without crashing.
_ = windowScenes.first?.windows

Here is a temporary workaround that consumers of the SDK can use while waiting for a fix:

extension CPTemplateApplicationScene {
    @objc var windows: UIWindow? { nil }
}

It works by defining the missing property and exposing it to Objective-C.

View original
Did this topic help you find an answer to your question?

11 replies

  • Author
  • New Participant
  • 4 replies
  • August 19, 2022

Hi, I created a simple project to replicate the problem. You can find it here https://github.com/cbarbera80/carplay_test_issue/p>


Racheal
Intercom Team
Forum|alt.badge.img+5
  • Customer Support Engineer
  • 512 replies
  • August 23, 2022

Hey @claudio​ Racheal from the Support Engineer team 👋🏼

 

After doing some more digging on my end, I see that this is a bug that our engineers have been notified of and are currently looking into. Could you write into the team via the Messenger or team@intercom.io so we can get you added to the issue? This way we can notify you with any updates!

 

I appreciate your patience as we look into this.


  • Author
  • New Participant
  • 4 replies
  • September 20, 2022

hi @racheal​ , are there any updates regarding the crash that occurs on carplay?


  • New Participant
  • 1 reply
  • September 28, 2022

Hi folks,

 

We at Zetland are also experiencing this issue.

As it stands right now, we're actually blocked on releasing our CarPlay-integration because of this, so we're really looking forward to a solution.

 

Thank you.

Anders


  • New Participant
  • 2 replies
  • October 5, 2022

We've also been running into the same issue ever since migrating our CarPlay app to the new Apple framework. Unfortunately it seems Intercom has no urgency in making their product usable on iOS so we've started researching alternatives.


Daniel M15
Employee
  • Employee
  • 240 replies
  • October 5, 2022

Hey everyone, Daniel from Customer Support Engineering here 👋

 

I can confirm that our engineers are continually working towards a solution to resolve the current issue with our SDK and CarPlay. Our team are currently working on a number of items, such as other bug fixes, forthcoming releases, updates, and helping out Support members with customer queries, so it is not currently possible for me to give an exact ETA on this issue.

 

I totally understand how problematic this bug is, and we know that this is an urgent request for many of our users. Please be assured that this is currently being developed and we hope to see a resolution for this ASAP. Thank you all for your continued patience in the meantime, it has not gone unnoticed and it is much appreciated 🙏


  • Author
  • New Participant
  • 4 replies
  • October 6, 2022

https://forum.intercom.com/s/question/0D52G00004r3ii9SAA/intercom-causes-crash-on-ios-if-carplay-is-started/p>

 

Hi thanks for the reply. As you can see from this other report, this problem dates back to two years ago. It is not acceptable that such a bug has been around for that long, especially if it has already been reported. We will also evaluate different alternatives to your platform that will ensure greater stability and readiness for bug resolution.


  • New Participant
  • 2 replies
  • November 8, 2022

This crash still happens on Intercom 14.0.0.

 

Congrats to everyone involved in this release! 😐


  • New Participant
  • 4 replies
  • Answer
  • September 15, 2023

I believe this issue is caused by the SDK assuming that all scenes returned from `UIApplication.shared.connectedScenes` are `UIWindowScene`’s, but that is not the case.

I suspect that this issue could be fixed by filtering to only the connected scenes like so:

let windowScenes = UIApplication.shared.connectedScenes.compactMap { $0 as? UIWindowScene }

// Now each window scene will have a windows property
// which you can access without crashing.
_ = windowScenes.first?.windows

Here is a temporary workaround that consumers of the SDK can use while waiting for a fix:

extension CPTemplateApplicationScene {
    @objc var windows: UIWindow? { nil }
}

It works by defining the missing property and exposing it to Objective-C.


  • New Participant
  • 1 reply
  • November 4, 2023

Crash is still happening… what's going on Intercom team?


  • New Participant
  • 2 replies
  • December 14, 2023

Just adding a +1 to this, we are facing the same issue. 

The temp workaround mentioned above by User1891 is working for us at the moment. Thank you so much for suggesting!

extension CPTemplateApplicationScene {
    @objc var windows: UIWindow? { nil }
}

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings