Answered

Intercom changing SwiftUI app's accent color?

  • 17 May 2024
  • 7 replies
  • 119 views

I am working on a SwiftUI iOS app.  Building with the latest SDK (Xcode 15.4) to run on iOS 16 and above. We set our App’s accent color using the Global Accent Color Name build setting.  As soon as I include the Intercom Package via SPM our accent color is changed to the default blue.  Why is Intercom changing the accent color?

icon

Best answer by Ebenezer.Laleye 22 May 2024, 17:28

View original

7 replies

Userlevel 2
Badge +3

Hi @Tom Wagner ! Ebenezer here from Engineering Support👋.

I see you were able to get in touch with my colleague Bernice and get an answer concerning this.

Our R&D team is working on a fix for this and will hopefully have one soon

I’ll re-share the explanation and workaround that was sent.

It appears that the accent color for mobile is controlled separately from the web settings, which is why you're seeing a different color on your iOS app. To change the accent color for mobile, you can adjust the settings in the Intercom mobile SDK styling section. You can find this option here: Intercom mobile SDK styling.

Additionally, if you are using SwiftUI and encountering issues with the accent color, there is a known bug at the moment and a temporary workaround is in place to set the color programmatically using the .tint(_:) ViewModifier.

I don’t understand why Intercom is setting the accent color for the App at all. That is not a feature we need or want.

Further investigation shows that the work around kind of works but ends up affecting far more things that you would expect.

 

I suspect the problem is you are changing UIKit appearance stuff and if that is done after appDidFinishLanching in a SwiftUI app it appears to have the exact impact we are seeing with the accentColor not being honored. 
 

Perhaps you could stop using this all together or provide a call we could make at the right time to force it to happen in a way that doesn’t trigger the SwiftUI issue. 
 

This is really impacting the look and feel of our App in a negative way. 

@Ebenezer.Laleye  We have this same issue and the workaround is not really fixing this as using .tint() modifier changes (=breaks) lot more things than just fixing the issue. This is actually a blocker for usage of this Intercom SDK version for us and hopefully can be fixed soon.

My team is working on a SwiftUI app and we’re experiencing the behavior described by @Tom Wagner. The behavior is nearly a show-stopper for us and we’d love it if this were fixed.

@Ebenezer.Laleye could we get an estimate when fix will be released for this? This is currently blocking an app release for us.

@Ebenezer.Laleye any updates?

Reply