Closed gsbernstein closed 2 years ago
Hi @gsbernstein,
Thanks for filing this issue. You should be able to customize when to listen to the "dark mode" system setting and when you wish to override it on a per-in-app-message-basis by using the enableDarkTheme
property. You can set a class to conform to the ABKInAppMessageControllerDelegate
, and then within your beforeInAppMessageDisplayed
method, you can decide whether or not to manually override the "dark mode" system setting. You can find an example of this here.
Please let us know if you run into any further issues with this customization, or feel free to contact us at support@braze.com with more specific details.
Thanks!
Thanks! I'll try that out. I realized when working on a different issue that you actually present everything in a different window, so this behavior makes sense.
It looks like the example is using both overrideUserInterfaceStyle
and enableDarkTheme
. Should I set both?
Seems to work well with just overrideUserInterfaceStyle, I'll stick to that
Platform
iOS
Platform Version
iOS 15.1 (but likely iOS 13+)
Braze SDK Version
4.1.0
Xcode Version
13.1 and 13.2.1
Integration Method
Cocoapods
Computer Processor
Intel
Repro Rate
100%
Steps To Reproduce
Example:
pod 'Appboy-iOS-SDK'
to the Podspec file.[Appboy startWithApiKey:inApplication:withLaunchOptions:];
method inapplication:didFinishLaunchingWithOptions:
method inAppDelegate.m
and all the other in-app message integrationsoverrideUserInterfaceStyle
on the window, in our casewindow.overrideUserInterfaceStyle = DarkModeSettings().current
but without our settings manager it would just be.light
or.dark
Expected Behavior
In-app message modal appearance should be based on window's appearance, which may be overridden from system setting.
Actual Incorrect Behavior
In-app message modal appearance is based on system setting.
https://user-images.githubusercontent.com/6655924/151599313-6287f362-0a3f-4358-862b-7d380474a61c.MP4
Verbose Logs
No response
Additional Information
We let users choose between "always dark", "always light", and "system setting"