Skip to content

feat(in-app): add dark mode support for in-app messages#1131

Open
BernardGatt wants to merge 7 commits into
mainfrom
INAPP-14506
Open

feat(in-app): add dark mode support for in-app messages#1131
BernardGatt wants to merge 7 commits into
mainfrom
INAPP-14506

Conversation

@BernardGatt

@BernardGatt BernardGatt commented Jun 30, 2026

Copy link
Copy Markdown
Contributor
ios-darkmode.mov

Summary

  • Adds ColorScheme enum (.light, .dark, .auto) as a public API on MessagingInAppConfigOptions
  • .auto (the default) resolves the current app dark mode state via UITraitCollection.userInterfaceStyle and sends "light" or "dark" to the Gist renderer via the existing postMessage protocol
  • Modal messages: Sets overrideUserInterfaceStyle on the modal UIWindow to control WKWebView's CSS prefers-color-scheme. For .auto, inherits the app window's override if present (supports apps with in-app dark mode toggles)
  • Inline messages: Sets overrideUserInterfaceStyle on the WKWebView directly, since inline views live in the app's own window
  • Live theme changes are detected via GistView.traitCollectionDidChange and pushed to active WebViews
  • Exposes MessagingInApp.shared.setColorScheme() for runtime changes — stored synchronously to avoid async Task race conditions, then dispatched to the state store for consistency
  • Color scheme flows through the state store (initialize action → InAppMessageState) for consistency and testability

Companion to Android PR: customerio/customerio-android#761

Usage

// Default: follows app dark mode automatically
let config = MessagingInAppConfigBuilder(siteId: siteId, region: .US).build()

// Force light or dark at init
let config = MessagingInAppConfigBuilder(siteId: siteId, region: .US)
    .setColorScheme(.dark)
    .build()

// Change at runtime (persists for the session)
MessagingInApp.shared.setColorScheme(.dark)

Test plan

  • AUTO mode: in-app message follows system dark mode toggle
  • AUTO mode with app window override (.overrideUserInterfaceStyle = .dark): message matches app, ignores system
  • AUTO mode with Info.plist UIUserInterfaceStyle = Dark: message renders dark, ignores system
  • .dark via builder: message always dark regardless of system
  • .dark via runtime setColorScheme(): message always dark regardless of system
  • Toggling system dark mode while message displayed: message updates live (AUTO) or stays locked (LIGHT/DARK)

Note

Low Risk
Additive UI/theming on the in-app display path; default .auto keeps existing appearance unless integrators opt in.

Overview
Adds light / dark / auto theming for in-app messages via a new public ColorScheme API on config (MessagingInAppConfigBuilder.setColorScheme) and at runtime (MessagingInApp.shared.setColorScheme), with wrapper SDK dictionary parsing for colorScheme.

The chosen mode is stored in InAppMessageState and resolved to "light" or "dark" for the Gist renderer (initial EngineWebConfiguration plus live updateColorScheme postMessage). WKWebView overrideUserInterfaceStyle is applied for inline content; modal overlays set the same on a dedicated UIWindow (with .auto inheriting the app window when needed). Live updates react to store changes and GistView.traitCollectionDidChange when system or app appearance changes.

Reviewed by Cursor Bugbot for commit 79a754d. Bugbot is set up for automated code reviews on this repo. Configure here.

Introduce ColorScheme enum (.light, .dark, .auto) to control how in-app
messages adapt to dark mode. AUTO (the default) reads the app's
userInterfaceStyle and sends the resolved "light" or "dark" value to the
Gist renderer via the existing postMessage protocol.

Live theme changes are handled two ways:
- System trait changes: GistView detects traitCollectionDidChange and
  notifies BaseMessageManager to push the update
- Runtime setColorScheme() calls: BaseMessageManager subscribes to
  colorScheme state changes and pushes to the active EngineWeb

Also exposes MessagingInApp.setColorScheme() for runtime changes that
persist for the session.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@BernardGatt BernardGatt requested a review from a team as a code owner June 30, 2026 12:45
@github-actions

Copy link
Copy Markdown

Sample app builds 📱

Below you will find the list of the latest versions of the sample apps.
It's recommended to always download the latest builds to test this PR accurately.

Comment thread Sources/MessagingInApp/Gist/EngineWeb/EngineWeb.swift
Comment thread Sources/MessagingInApp/MessagingInAppImplementation.swift
@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown

SDK binary size reports 📊

SDK binary size of this PR
    FILE SIZE        VM SIZE    
 --------------  -------------- 
   3.0%  27.4Ki   3.0%  27.4Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingPush/MessagingPush.swift
   2.7%  24.7Ki   2.7%  24.7Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Communication/Event.swift
   2.7%  24.7Ki   2.7%  24.7Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Managers/AnonymousMessageManager.swift
   2.5%  23.3Ki   2.5%  23.3Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/State/InAppMessageMiddleware.swift
   2.5%  22.7Ki   2.5%  22.7Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/DataPipeline/DataPipeline.swift
   2.4%  22.0Ki   2.4%  22.0Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Network/SSE/SseConnectionManager.swift
   1.9%  17.9Ki   1.9%  17.9Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Managers/MessageManager.swift
   1.9%  17.9Ki   1.9%  17.9Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/State/InAppMessageAction.swift
   1.9%  17.4Ki   1.9%  17.4Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/EngineWeb/AnyEncodable.swift
   1.9%  17.4Ki   1.9%  17.4Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/CustomerIOInstance.swift
   1.9%  17.1Ki   1.9%  17.1Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Network/SSE/SseEventParser.swift
   1.7%  15.6Ki   1.7%  15.6Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Inbox/DefaultNotificationInbox.swift
   1.6%  14.9Ki   1.6%  14.9Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Background Queue/QueueStorage.swift
   1.6%  14.5Ki   1.6%  14.5Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Gist.swift
   1.5%  13.9Ki   1.5%  13.9Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/autogenerated/AutoDependencyInjection.generated.swift
   1.5%  13.6Ki   1.5%  13.6Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/EngineWeb/EngineWeb.swift
   1.5%  13.4Ki   1.5%  13.4Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Service/Push/PendingPushDeliveryStore.swift
   1.4%  13.0Ki   1.4%  13.0Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/State/InAppMessageState.swift
   1.4%  12.6Ki   1.4%  12.6Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Communication/CombinedCacheEventBusHandler.swift
   1.3%  12.3Ki   1.3%  12.3Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/autogenerated/AutoDependencyInjection.generated.swift
   1.3%  12.1Ki   1.3%  12.1Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Communication/EventStorage.swift
   1.3%  12.1Ki   1.3%  12.1Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/DataPipeline/DataPipelineImplementation.swift
   1.3%  11.9Ki   1.3%  11.9Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Network/SSE/SseService.swift
   1.3%  11.7Ki   1.3%  11.7Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Communication/EventMemoryStorage.swift
   1.2%  11.2Ki   1.2%  11.2Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Managers/QueueManager.swift
   1.2%  11.1Ki   1.2%  11.1Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Utilities/SseLifecycleManager.swift
   1.2%  10.9Ki   1.2%  10.9Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Service/Request/TrackDeliveryEventRequestBody.swift
   1.1%  9.98Ki   1.1%  9.98Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/State/InAppMessageReducer.swift
   1.0%  9.58Ki   1.0%  9.58Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingPush/MessagingPushImplementation.swift
   1.0%  9.47Ki   1.0%  9.47Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Util/JsonAdapter.swift
   1.0%  9.44Ki   1.0%  9.44Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/State/InAppMessageManager.swift
   1.0%  9.44Ki   1.0%  9.44Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingPush/PushHandling/NSEPushCoordinator.swift
   1.0%  8.80Ki   1.0%  8.80Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingPush/Type/PushNotification.swift
   1.0%  8.77Ki   1.0%  8.77Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/DataPipeline/DataPipelineImplementation+BGQ.swift
   0.9%  8.39Ki   0.9%  8.39Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/State/InAppMessageStore.swift
   0.9%  8.30Ki   0.9%  8.30Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Utilities/URLComponents.swift
   0.9%  8.16Ki   0.9%  8.16Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Location/CoreLocationProvider.swift
   0.9%  7.94Ki   0.9%  7.94Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Views/GistInlineInAppMessageView.swift
   0.9%  7.86Ki   0.9%  7.86Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/DIGraphShared.swift
   0.8%  7.83Ki   0.8%  7.83Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Network/SSE/SseRetryHelper.swift
   0.8%  7.59Ki   0.8%  7.59Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Managers/ModalViewManager.swift
   0.8%  7.34Ki   0.8%  7.34Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/MessagingInAppImplementation.swift
   0.8%  7.15Ki   0.8%  7.15Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Util/KeyValueStorage.swift
   0.8%  7.07Ki   0.8%  7.07Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingPush/RichPush/RichPushHttpClient.swift
   0.8%  6.99Ki   0.8%  6.99Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Location/Coordinator/FileLastLocationStateStore.swift
   0.7%  6.87Ki   0.7%  6.87Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Migration/DataPipelineMigrationAssistant.swift
   0.7%  6.75Ki   0.7%  6.75Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/DataPipeline/Plugins/AutoTrackingScreenViews.swift
   0.7%  6.54Ki   0.7%  6.54Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Location/Coordinator/LastLocationState.swift
   0.7%  6.41Ki   0.7%  6.41Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Location/LocationServices.swift
   0.7%  6.25Ki   0.7%  6.25Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Views/UIKitInline.swift
   0.7%  6.10Ki   0.7%  6.10Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Inbox/Type/InboxMessage.swift
   0.6%  5.99Ki   0.6%  5.99Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingPush/Integration/CioProviderAgnosticAppDelegate.swift
   0.6%  5.70Ki   0.6%  5.70Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Background Queue/Type/QueueTaskMetadata.swift
   0.6%  5.41Ki   0.6%  5.41Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Service/Push/PendingPushDeliveryMetric.swift
   0.6%  5.11Ki   0.6%  5.11Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Views/SwiftUIInline.swift
   0.6%  5.08Ki   0.6%  5.08Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Background Queue/Type/QueueTask.swift
   0.5%  5.07Ki   0.5%  5.07Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingPush/UserNotificationsFramework/Wrappers.swift
   0.5%  4.95Ki   0.5%  4.95Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Service/Response/ErrorMessageResponse.swift
   0.5%  4.81Ki   0.5%  4.81Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/DataPipeline/Config/SDKConfigBuilder.swift
   0.5%  4.81Ki   0.5%  4.81Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Managers/ModalMessageManager.swift
   0.5%  4.78Ki   0.5%  4.78Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Migration/TrackEventMigrationType.swift
   0.5%  4.62Ki   0.5%  4.62Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Network/SSE/HeartbeatTimer.swift
   0.5%  4.53Ki   0.5%  4.53Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Managers/Models/Message.swift
   0.5%  4.17Ki   0.5%  4.17Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingPush/Config/MessagingPushConfigBuilder.swift
   0.4%  4.13Ki   0.4%  4.13Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Background Queue/Queue.swift
   0.4%  4.05Ki   0.4%  4.05Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Views/InlineMessageBridgeView.swift
   0.4%  4.02Ki   0.4%  4.02Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Location/Coordinator/LastLocationStorage.swift
   0.4%  3.93Ki   0.4%  3.93Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingPush/RichPush/RichPushRequestHandler.swift
   0.4%  3.81Ki   0.4%  3.81Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Service/Request/MetricRequest.swift
   0.4%  3.48Ki   0.4%  3.48Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Service/HttpRequestRunner.swift
   0.4%  3.47Ki   0.4%  3.47Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Util/Log.swift
   0.4%  3.45Ki   0.4%  3.45Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Inbox/Network/InboxMessageResponse.swift
   0.4%  3.39Ki   0.4%  3.39Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Util/Atomic.swift
   0.4%  3.38Ki   0.4%  3.38Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Synchronized/Synchronized+Collections.swift
   0.4%  3.36Ki   0.4%  3.36Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Util/AsyncOperation.swift
   0.4%  3.35Ki   0.4%  3.35Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingPush/Integration/CioNotificationCenterDelegate.swift
   0.4%  3.34Ki   0.4%  3.34Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/GistDelegate.swift
   0.4%  3.32Ki   0.4%  3.32Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Views/GistModalViewController.swift
   0.4%  3.26Ki   0.4%  3.27Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Location/LocationModuleState.swift
   0.4%  3.26Ki   0.4%  3.26Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingPush/PushHandling/NSEPushCoordinatorState.swift
   0.4%  3.25Ki   0.4%  3.25Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Managers/MessageTracking.swift
   0.3%  3.23Ki   0.3%  3.23Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Extensions/StringExtensions.swift
   0.3%  3.20Ki   0.3%  3.20Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Network/BaseNetwork.swift
   0.3%  3.16Ki   0.3%  3.16Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Module/ModuleTopLevelObject.swift
   0.3%  3.15Ki   0.3%  3.15Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/EngineWeb/EngineWebConfiguration.swift
   0.3%  3.14Ki   0.3%  3.14Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingPush/PushHandling/RichPushDeliveryTracking.swift
   0.3%  3.12Ki   0.3%  3.12Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Util/LockManager.swift
   0.3%  3.12Ki   0.3%  3.12Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Managers/InlineMessageManager.swift
   0.3%  3.11Ki   0.3%  3.11Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/DataPipeline/Plugins/DeviceContexualAttributes.swift
   0.3%  2.99Ki   0.3%  2.99Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Network/GistQueueNetwork.swift
   0.3%  2.96Ki   0.3%  2.96Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingPush/PushHandling/ManualPushHandling+UserNotifications.swift
   0.3%  2.94Ki   0.3%  2.94Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Communication/CioEventBus.swift
   0.3%  2.93Ki   0.3%  2.93Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Util/FileStorage.swift
   0.3%  2.84Ki   0.3%  2.84Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Util/StringAnyEncodable.swift
   0.3%  2.74Ki   0.3%  2.74Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Util/DeviceInfo.swift
   0.3%  2.68Ki   0.3%  2.68Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/MessagingInApp.swift
   0.3%  2.57Ki   0.3%  2.57Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Service/HttpRequestError.swift
   0.3%  2.56Ki   0.3%  2.56Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Service/HttpRequestParams.swift
   0.3%  2.52Ki   0.3%  2.52Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Extensions/DateExtensions.swift
   0.3%  2.50Ki   0.3%  2.50Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Location/Type/LocationProviderTypes.swift
   0.3%  2.49Ki   0.3%  2.49Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Inbox/Type/InboxMessageFactory.swift
   0.3%  2.45Ki   0.3%  2.45Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Background Queue/Task Data/DeletePushNotificationQueueTaskData.swift
   0.3%  2.40Ki   0.3%  2.40Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Synchronized/Synchronized+Dictionaries.swift
   0.3%  2.35Ki   0.3%  2.35Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/DataPipeline/Plugins/IdentifyContextPlugin.swift
   0.2%  2.30Ki   0.2%  2.30Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/EngineWeb/EngineEventHandler.swift
   0.2%  2.27Ki   0.2%  2.27Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/DataPipeline/Plugins/Context.swift
   0.2%  2.25Ki   0.2%  2.25Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingPush/autogenerated/AutoDependencyInjection.generated.swift
   0.2%  2.23Ki   0.2%  2.23Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/DataPipeline/Util/DeviceAttributesProvider.swift
   0.2%  2.22Ki   0.2%  2.22Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/State/Core/Subscription.swift
   0.2%  2.20Ki   0.2%  2.20Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Util/SystemLogger.swift
   0.2%  2.11Ki   0.2%  2.11Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/DataPipeline/Plugins/DataPipelinePublishedEvents.swift
   0.2%  2.08Ki   0.2%  2.08Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Background Queue/Task Data/IdentifyProfileQueueTaskData.swift
   0.2%  2.06Ki   0.2%  2.06Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Util/SdkCommonLoggerLogger.swift
   0.2%  2.02Ki   0.2%  2.02Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Background Queue/Task Data/RegisterPushNotificationQueueTaskData.swift
   0.2%  2.00Ki   0.2%  2.00Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingPushAPN/Integration/CioAppDelegateAPN.swift
   0.2%  1.97Ki   0.2%  1.97Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Util/KeyValueStorageKey.swift
   0.2%  1.95Ki   0.2%  1.95Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/DIGraphShared+PendingPushDeliveryStore.swift
   0.2%  1.92Ki   0.2%  1.92Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Synchronized/Synchronized.swift
   0.2%  1.86Ki   0.2%  1.86Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Background Queue/Type/QueueTaskRunResults.swift
   0.2%  1.82Ki   0.2%  1.82Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/DataPipeline/CustomerIO+Events.swift
   0.2%  1.80Ki   0.2%  1.80Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Views/GistView.swift
   0.2%  1.79Ki   0.2%  1.79Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Config/MessagingInAppConfigBuilder.swift
   0.2%  1.74Ki   0.2%  1.74Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Network/Models/InAppMessageResponse.swift
   0.2%  1.65Ki   0.2%  1.65Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/DataPipeline/Util/DictionarySanitizer.swift
   0.2%  1.63Ki   0.2%  1.63Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingPush/PushHandling/NSEDeliveryContinuationBox.swift
   0.2%  1.58Ki   0.2%  1.58Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Background Queue/Type/QueueTaskType.swift
   0.2%  1.55Ki   0.2%  1.55Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Location/LocationLifecycleObserver.swift
   0.2%  1.46Ki   0.2%  1.46Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Communication/Event+Location.swift
   0.2%  1.43Ki   0.2%  1.43Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Extensions/DictionaryExtension.swift
   0.2%  1.41Ki   0.2%  1.41Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Background Queue/Task Data/TrackEventQueueTaskData.swift
   0.1%  1.38Ki   0.1%  1.38Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Service/Request/PushMetric.swift
   0.1%  1.34Ki   0.1%  1.34Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/DataPipeline/CustomerIO.swift
   0.1%  1.31Ki   0.1%  1.31Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Extensions/GistExtensions.swift
   0.1%  1.28Ki   0.1%  1.28Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Util/UIKitWrapper.swift
   0.1%  1.25Ki   0.1%  1.25Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Utilities/UIColor+Hex.swift
   0.1%  1.24Ki   0.1%  1.24Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Util/ThreadUtil.swift
   0.1%  1.23Ki   0.1%  1.23Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Store/QueueInventoryMemoryStore.swift
   0.1%  1.20Ki   0.1%  1.20Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Managers/LogManager.swift
   0.1%  1.15Ki   0.1%  1.15Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingPush/RichPush/RichPushRequest.swift
   0.1%  1.14Ki   0.1%  1.14Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Network/Models/QueueMessagesResponse.swift
   0.1%  1.12Ki   0.1%  1.12Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Service/Request/InAppMetric.swift
   0.1%  1.11Ki   0.1%  1.11Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Location/RealAppLifecycleNotifying.swift
   0.1%  1.09Ki   0.1%  1.09Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/DataPipeline/CustomerIO+Segment.swift
   0.1%  1.06Ki   0.1%  1.08Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Extensions/DeviceExtension.swift
   0.1%  1.07Ki   0.1%  1.08Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingPushAPN/MessagingPushAPN.swift
   0.1%  1.06Ki   0.1%  1.06Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/DataPipeline/Util/ProfileEnrichmentAttributesMerger.swift
   0.1%  1.04Ki   0.1%  1.04Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Location/Coordinator/LocationFilter.swift
   0.1%  1.03Ki   0.1%  1.03Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Network/Endpoints/LogEndpoint.swift
   0.1%  1.01Ki   0.1%  1.01Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Type/ScreenView.swift
   0.1%  1.00Ki   0.1%  1.00Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Util/MockCollection.swift
   0.1%    1008   0.1%    1008    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Store/GlobalDataStore.swift
   0.1%    1008   0.1%    1008    /Users/runner/work/customerio-ios/customerio-ios/Sources/DataPipeline/Config/DataPipelineConfigOptions.swift
   0.1%     980   0.1%     980    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Util/SdkClient.swift
   0.1%     980   0.1%     980    /Users/runner/work/customerio-ios/customerio-ios/Sources/DataPipeline/Util/DataPipelinesLogger.swift
   0.1%     980   0.1%     980    /Users/runner/work/customerio-ios/customerio-ios/Sources/Location/Coordinator/LocationProfileEnrichmentProvider.swift
   0.1%     956   0.1%     956    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Service/Push/AppGroupIdentifier.swift
   0.1%     924   0.1%     924    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Service/CIOApiEndpoint.swift
   0.1%     876   0.1%     876    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Service/UserAgentUtil.swift
   0.1%     836   0.1%     836    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Managers/InboxMessageCacheManager.swift
   0.1%     828   0.1%     828    /Users/runner/work/customerio-ios/customerio-ios/Sources/Location/Logger+Location.swift
   0.1%     792   0.1%     792    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Util/AnyEncodable.swift
   0.1%     784   0.1%     784    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Store/SdkConfig.swift
   0.1%     768   0.1%     768    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingPush/Util/PushNotificationLogger.swift
   0.1%     740   0.1%     740    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingPushAPN/MessagingPushAPN+PushConfigs.swift
   0.1%     732   0.1%     732    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingPush/Type/CustomerIOParsedPushPayload.swift
   0.1%     724   0.1%     724    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Util/RingBuffer.swift
   0.1%     672   0.1%     672    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/ProfileEnrichment/ProfileEnrichmentRegistryImpl.swift
   0.1%     664   0.1%     664    /Users/runner/work/customerio-ios/customerio-ios/Sources/Location/Coordinator/LocationSyncCoordinator.swift
   0.1%     656   0.1%     656    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingPush/RichPush/RichPushDeliveryTracker.swift
   0.1%     636   0.1%     636    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Type/InAppMessage.swift
   0.1%     612   0.1%     612    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Util/DeepLinkUtil.swift
   0.1%     596   0.1%     596    /Users/runner/work/customerio-ios/customerio-ios/Sources/DataPipeline/Plugins/ScreenFilterPlugin.swift
   0.1%     596   0.1%     596    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingPush/Config/MessagingPushConfigOptions.swift
   0.1%     596   0.1%     596    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingPush/UserNotificationsFramework/UserNotificationsFrameworkAdapter.swift
   0.1%     592   0.1%     592    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingPushAPN/MessagingPush+APN.swift
   0.1%     580   0.1%     580    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Utilities/Environment.swift
   0.1%     564   0.1%     564    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Extensions/UIViewExtensions.swift
   0.1%     548   0.1%     548    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Service/Request/EmptyRequestBody.swift
   0.1%     524   0.1%     524    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingPush/RichPush/RichPushRequestHandling.swift
   0.1%     520   0.1%     520    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Type/Region.swift
   0.1%     516   0.1%     516    /Users/runner/work/customerio-ios/customerio-ios/Sources/DataPipeline/Plugins/Logger.swift
   0.1%     508   0.1%     508    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Extensions/UIKitExtensions.swift
   0.1%     492   0.1%     492    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Background Queue/Type/QueueStatus.swift
   0.0%     468   0.0%     468    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Utilities/Encodable.swift
   0.0%     464   0.0%     464    /Users/runner/work/customerio-ios/customerio-ios/Sources/Location/LocationModule.swift
   0.0%     444   0.0%     444    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Synchronized/Synchronized+Hashable.swift
   0.0%     440   0.0%     440    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Store/ProfileStore.swift
   0.0%     436   0.0%     436    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Network/Utilities/HTTPMethod.swift
   0.0%     416   0.0%     416    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Network/Utilities/ElapsedTimer.swift
   0.0%     404   0.0%     404    /Users/runner/work/customerio-ios/customerio-ios/Sources/DataPipeline/autogenerated/AutoDependencyInjection.generated.swift
   0.0%     400   0.0%     400    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/State/Core/Store.swift
   0.0%     392   0.0%     392    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Synchronized/Synchronized+Equatable.swift
   0.0%     380   0.0%     380    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Extensions/ArrayExtensions.swift
   0.0%     380   0.0%     380    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/State/Core/StoreSubscriber.swift
   0.0%     372   0.0%     372    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Communication/RegistrationToken.swift
   0.0%     352   0.0%     352    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Extensions/UserDefaultExtensions.swift
   0.0%     352   0.0%     352    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Config/MessagingInAppConfigOptions.swift
   0.0%     324   0.0%     324    /Users/runner/work/customerio-ios/customerio-ios/Sources/Location/RegistrationToken.swift
   0.0%     284   0.0%     284    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Inbox/NoOpNotificationInbox.swift
   0.0%     236   0.0%     236    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Network/SSE/RetryDecision.swift
   0.0%     228   0.0%     236    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Network/SessionManager.swift
   0.0%     204   0.0%     204    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Synchronized/Synchronized+Arithmetic.swift
   0.0%     196   0.0%     196    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Inbox/NotificationInbox.swift
   0.0%     180   0.0%     180    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Extensions/LoggerExtensions.swift
   0.0%     164   0.0%     164    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Network/Endpoints/QueueEndpoint.swift
   0.0%     152   0.0%     152    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Util/Timer.swift
   0.0%     140   0.0%     140    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Util/Lock.swift
   0.0%     136   0.0%     136    /Users/runner/work/customerio-ios/customerio-ios/Sources/Location/CustomerIO+Location.swift
   0.0%     120   0.0%     120    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Extensions/DataExtensions.swift
   0.0%     116   0.0%     116    /Users/runner/work/customerio-ios/customerio-ios/Sources/DataPipeline/Plugins/CustomerIODestination.swift
   0.0%     116   0.0%     116    /Users/runner/work/customerio-ios/customerio-ios/Sources/Location/Config/LocationConfig.swift
   0.0%     116   0.0%     116    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/State/Aliases.swift
   0.0%     112   0.0%     112    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Synchronized/Synchronized+Bool.swift
   0.0%      92   0.0%      92    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingPush/PushHandling/PushClickHandler.swift
   0.0%      84   0.0%      84    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Service/DownloadFileType.swift
   0.0%      84   0.0%      84    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Network/Endpoints/Utilities/GistNetworkRequestError.swift
   0.0%      84   0.0%      84    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Network/SSE/SseConnectionState.swift
   0.0%      84   0.0%      84    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Type/ColorScheme.swift
   0.0%      68   0.0%      68    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Network/NetworkSettings.swift
   0.0%      36   0.0%      36    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Util/DateUtil.swift
   0.0%      36   0.0%      36    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Util/Time.swift
   0.0%      32   0.0%      32    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Util/DeviceMetricsGrabber.swift
   0.0%      32   0.0%      32    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Util/SingleScheduleTimer.swift
   0.0%      32   0.0%      32    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/EngineWeb/EngineWebProvider.swift
   0.0%      28   0.0%      28    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Version.swift
   0.0%      16   0.0%      16    /Users/runner/work/customerio-ios/customerio-ios/Sources/Location/ApplicationStateProvider.swift
   0.0%      16   0.0%      16    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Network/SSE/Sleeper.swift
   0.0%      16   0.0%      16    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Utilities/ApplicationStateProvider.swift
   0.0%      12   0.0%      12    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/State/Core/Synchronized.swift
   0.0%       8   0.0%       8    /Users/runner/work/customerio-ios/customerio-ios/Sources/Common/Extensions/ErrorExtension.swift
 100.0%   921Ki 100.0%   921Ki    TOTAL

SDK binary size diff report vs. main branch
    FILE SIZE        VM SIZE    
 --------------  -------------- 
   +44% +4.15Ki   +44% +4.15Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/EngineWeb/EngineWeb.swift
   +77% +3.20Ki   +77% +3.20Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/MessagingInAppImplementation.swift
   +53% +1.68Ki   +53% +1.68Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Managers/ModalMessageManager.swift
   +18% +1.18Ki   +18% +1.18Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Managers/ModalViewManager.swift
   +37%    +492   +37%    +492    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Config/MessagingInAppConfigBuilder.swift
  +1.7%    +464  +1.7%    +464    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingPush/MessagingPush.swift
  +2.3%    +408  +2.3%    +408    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Managers/MessageManager.swift
   +27%    +396   +27%    +396    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Views/GistView.swift
  +633%    +304  +633%    +304    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Config/MessagingInAppConfigOptions.swift
  +2.0%    +296  +2.0%    +296    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Gist.swift
  +1.1%    +264  +1.1%    +264    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/Managers/AnonymousMessageManager.swift
  +7.8%    +232  +7.8%    +232    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/EngineWeb/EngineWebConfiguration.swift
  +1.5%    +196  +1.5%    +196    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/State/InAppMessageState.swift
  +0.7%    +132  +0.7%    +132    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/State/InAppMessageAction.swift
  [NEW]     +84  [NEW]     +84    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Type/ColorScheme.swift
 -99.9%     +44 -99.9%     +44    [5 Others]
  -0.4%     -44  -0.4%     -44    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/State/InAppMessageReducer.swift
  -0.4%     -76  -0.4%     -76    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/EngineWeb/AnyEncodable.swift
  -2.7%    -264  -2.7%    -264    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/State/InAppMessageManager.swift
  -7.4%    -272  -7.4%    -272    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/Gist/GistDelegate.swift
 -43.8% -2.09Ki -43.8% -2.09Ki    /Users/runner/work/customerio-ios/customerio-ios/Sources/MessagingInApp/MessagingInApp.swift
  +1.2% +10.7Ki  +1.2% +10.7Ki    TOTAL

@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 43.07692% with 111 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.00%. Comparing base (8aacf3a) to head (79a754d).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...rces/MessagingInApp/Gist/EngineWeb/EngineWeb.swift 2.94% 33 Missing ⚠️
...essagingInApp/Gist/Managers/ModalViewManager.swift 0.00% 30 Missing ⚠️
.../MessagingInApp/Gist/Managers/MessageManager.swift 62.50% 15 Missing ⚠️
...gingInApp/Config/MessagingInAppConfigBuilder.swift 50.00% 9 Missing ⚠️
Sources/MessagingInApp/Gist/Views/GistView.swift 0.00% 6 Missing ⚠️
...rces/MessagingInApp/State/InAppMessageAction.swift 0.00% 5 Missing ⚠️
.../MessagingInApp/MessagingInAppImplementation.swift 42.85% 4 Missing ⚠️
Sources/MessagingInApp/MessagingInApp.swift 0.00% 3 Missing ⚠️
...agingInApp/Gist/Managers/ModalMessageManager.swift 92.85% 2 Missing ⚠️
Sources/MessagingInApp/Type/ColorScheme.swift 80.00% 2 Missing ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1131      +/-   ##
==========================================
- Coverage   69.26%   69.00%   -0.26%     
==========================================
  Files         225      226       +1     
  Lines       11524    11702     +178     
==========================================
+ Hits         7982     8075      +93     
- Misses       3542     3627      +85     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Re-resolve colorScheme from the webView's trait collection at render
time instead of using UITraitCollection.current during init.

When showing a modal, copy the app window's overrideUserInterfaceStyle
(or root VC's) to the modal window so in-app messages match the app's
appearance when it forces light or dark mode.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment thread Sources/MessagingInApp/Gist/Managers/MessageManager.swift
WKWebView determines prefers-color-scheme from its window's trait
collection, not the view's. Set overrideUserInterfaceStyle on the modal
window based on the SDK's color scheme setting:
- .light/.dark: force the window to match
- .auto: inherit the app window's override if present

The color scheme flows from the state store through ModalMessageManager
to ModalViewManager, which applies it to the window before adding the
view controller.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment thread Sources/MessagingInApp/Gist/Managers/ModalViewManager.swift
Comment thread Sources/MessagingInApp/Gist/Managers/MessageManager.swift
Store the color scheme synchronously on MessagingInAppImplementation
so it's immediately available regardless of async Task ordering. This
fixes the race condition where setColorScheme() dispatches to the store
but the message displays before the store processes it.

Also applies overrideUserInterfaceStyle on the WKWebView itself for
inline messages, where there's no separate modal window to override.

ModalMessageManager subscribes to colorScheme state changes and updates
the modal window when the store catches up, handling mid-display
setColorScheme() calls.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment thread Sources/MessagingInApp/Gist/Managers/MessageManager.swift
- Replace unused closure parameter with _
- Use keypath syntax for flatMap
- Regenerate API docs with new ColorScheme public surface

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 3 total unresolved issues (including 2 from previous reviews).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 59a15f4. Configure here.

Comment thread Sources/MessagingInApp/Gist/Managers/ModalViewManager.swift
Bernard Gatt and others added 2 commits July 1, 2026 14:56
…de on auto

- Add .setColorScheme to the middleware allowlist so it isn't blocked
  before userId/anonymousId is set
- Reset window overrideUserInterfaceStyle to .unspecified before
  inheriting app style in auto mode, preventing a stale forced override
  from persisting after switching back to auto

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
endpoint: currentConfiguration.endpoint,
messageId: currentConfiguration.messageId,
properties: currentConfiguration.properties,
colorScheme: colorSchemeMode.resolve(with: webView.traitCollection)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we reuse resolvedScheme here?

import Foundation

class MessagingInAppImplementation: MessagingInAppInstance {
@Atomic static var currentColorScheme: ColorScheme = .auto

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we avoid this and keep only one in InAppMessageState as single source of truth?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants