Skip to content

[Bug]: Stream is changing my app's accent color #3680

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mbac19 opened this issue May 27, 2025 · 4 comments
Closed

[Bug]: Stream is changing my app's accent color #3680

mbac19 opened this issue May 27, 2025 · 4 comments
Labels
🐞 Bug An issue or PR related to a bug

Comments

@mbac19
Copy link

mbac19 commented May 27, 2025

Actual behaviour

Importing Appearance object in SwiftChatUI is overriding my app's accent color.

  • I have an accent color in my app set to purple
  • Just by adding the following line of code, it changes to blue:
import SwiftChatUI

func setupApp() {
  _ = Appearance.default
}

Expected behaviour

Stream Chat does not mess with my app's accent color settings.

Steps to reproduce

1. Create a new app
2. Go to the "Assets" file
3. Change the asset color (to something like red)
4. Import the `SwiftChatUI` package
5. Add the following code snippet inside the scene setup: `_ = Appearance.default`
6. Display a tab bar with some system icons
7. Notice the system icon color is tinted using Stream's blue tint color (instead of the app's red)

Which packages are you using?

StreamChat and StreamChatUI

Which SDK version are you using?

4.78.0

Which iOS version is the issue reproducible?

iOS 18.4.1

Which iPhone Device is the issue reproducible?

iPhone 16

Which Xcode version are you using?

Xcode 16.3

@mbac19 mbac19 added the 🐞 Bug An issue or PR related to a bug label May 27, 2025
@mbac19 mbac19 changed the title [Bug]: [Bug]: Stream is changing my app's accent color May 27, 2025
@laevandus
Copy link
Contributor

Hi @mbac19, we followed the steps above, but failed to reproduce this issue. Could you please share your sample app with us where you can reproduce it.

Thank you

@mbac19
Copy link
Author

mbac19 commented Jun 2, 2025

@laevandus - Sure! Here's a bare-bones project with the bug being reproduced.

Details are in the README

@laevandus
Copy link
Contributor

Hi @mbac19,

Seems like an issue in Apple frameworks. If I create a sample app without importing Stream SDK and changed it to:

@main
struct TestMoreApp: App {
    var body: some Scene {
        WindowGroup {
            ContentView()
        }
    }
    
    init() {
        print(UIImage(named: "1")) // <-- issue trigger by this
    }
}

Then the accent color in the asset catalog is ignored.

Therefore, the recommendation is to change the integration in a way where Stream SDK is configured after app's init runs.

@mbac19
Copy link
Author

mbac19 commented Jun 4, 2025

@laevandus - hmm ok, that's good to know. Thanks for investigating, seems like it's not a stream issue then. Closing this out.

@mbac19 mbac19 closed this as completed Jun 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 Bug An issue or PR related to a bug
Projects
None yet
Development

No branches or pull requests

2 participants