Skip to content

[NT-2874] Create iOS SDK#196

Open
Alex Freas (akfreas) wants to merge 32 commits intomainfrom
NT-2874-create-ios-sdk
Open

[NT-2874] Create iOS SDK#196
Alex Freas (akfreas) wants to merge 32 commits intomainfrom
NT-2874-create-ios-sdk

Conversation

@akfreas
Copy link
Copy Markdown
Collaborator

iOS SDK using JavaScriptCore bridge

Adds an iOS SDK according to the RFC. Uses the JavaScriptCore that is standard with iOS to create a bridge to our existing JS SDK.

I've added the SwiftUI portions to the SDK and the implementation in order to reach parity with the RN SDK. We have in this PR the same passing e2e tests that exist in the RN SDK.

@wiz-inc-38d59fb8d7
Copy link
Copy Markdown

wiz-inc-38d59fb8d7 bot commented Mar 31, 2026

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings 18 Medium 2 Low
Software Management Finding Software Management Findings -
Total 18 Medium 2 Low

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

… them in a variable before executing scripts.
Colors, spacing, border radius, typography, and opacity values matching the React Native preview panel design system.
Includes Badge, ActionButton, AudienceToggle (three-state), SearchBar, SectionCard, QualificationIndicator, JsonViewer, ListItemRow, VariantSelector, ExperienceCard, AudienceItem, and AudienceItemHeader.
Protocol, built-in HTTP implementation using URLSession, batch pagination, and parallel fetching of nt_audience and nt_experience entries.
Audience/experience definition types, variant distribution extraction, and variant name resolution from included entries matching the React Native entryMappers implementation.
…rride tracking

View model fetches Contentful definitions and combines them with SDK state. Includes header with consent badge, search filtering, collapsible audience items with experience cards, profile section, overrides section, and reset-to-actual-state footer.
…ul client

Changes FAB from blue gear to purple slider icon on light purple background, and threads the contentfulClient parameter through to PreviewPanelContent.
Adds isPreviewPanelOpen published property to OptimizationClient and uses it in OptimizedEntry to bypass variant locking, so override changes from the preview panel are reflected immediately.
OS.Logger-backed logger gated by OptimizationConfig.debug flag, with deferred string interpolation for zero-cost when disabled.
Enables DiagnosticLogger output when set to true, defaults to false.
Logs request method/URL, response status/size, and error details through DiagnosticLogger.
Provides the same first-variant locking behavior as OptimizedEntry but for UIKit-based apps.
Sets debug: true in the OptimizationConfig for the demo app.
Rebuilt UMD bundle with latest bridge changes.
Ensures the screen name is set in both context.screen and properties for the Experience API.
Validates screen context and properties.name are correctly populated.
Track audience and variant overrides in Maps alongside the existing signal
mutations, snapshot natural defaults on first override, and expose both via
getPreviewState(). Add resetAudienceOverride, resetVariantOverride, and
resetAllOverrides methods.
Expose resetAudienceOverride, resetVariantOverride, and resetAllOverrides on
OptimizationClient. Extend PreviewState to decode the bridge's override tracking
fields.
…acking

Remove local audienceOverrides, variantOverrides, and initial snapshot
dictionaries from PreviewViewModel. Derive all override state from the bridge's
getPreviewState() so overrides survive panel close and reopen.
Test the full round-trip through the JS bridge: setting overrides, reading them
back, persistence across panel close/reopen, single and bulk reset, default
snapshot immutability, and edge cases.
@akfreas Alex Freas (akfreas) marked this pull request as ready for review April 13, 2026 12:48
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.

1 participant