Skip to content

feat: dynamic xcframeworks shipped in package#416

Open
mario-launchdarkly wants to merge 6 commits intomainfrom
fix/spm-dependencies-sr-rn
Open

feat: dynamic xcframeworks shipped in package#416
mario-launchdarkly wants to merge 6 commits intomainfrom
fix/spm-dependencies-sr-rn

Conversation

@mario-launchdarkly
Copy link
Contributor

@mario-launchdarkly mario-launchdarkly commented Mar 6, 2026

Summary

Build LaunchDarklyObservability.xcframework and LaunchDarklySessionReplay.xcframework as
dynamic frameworks from swift-launchdarkly-observability at release time and ship them in
ios/Frameworks/ inside the package


Note

Medium Risk
Changes iOS packaging/linking by moving from SPM to shipped binary XCFrameworks and adding an Xcode project patch, which can impact app build/link behavior across Xcode/iOS environments.

Overview
Switches the iOS integration from spm_dependency (SPM at pod install time) to vendored prebuilt XCFrameworks shipped inside ios/Frameworks/, and updates the podspec to reference those frameworks (and enable BUILD_LIBRARY_FOR_DISTRIBUTION).

Adds a release-time build pipeline (scripts/build-xcframeworks.sh, build:xcframeworks, updated prepack/files) to generate and publish the required LaunchDarkly*, OpenTelemetry*, and SwiftProtobuf xcframeworks, and introduces an optional Expo config plugin (plugin/, app.plugin.js) to set ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=YES in Xcode projects. Also updates ignores/clean scripts and refreshes the example Podfile.lock/yarn deps accordingly.

Written by Cursor Bugbot for commit cd7815d. This will update automatically on new commits. Configure here.

@mario-launchdarkly mario-launchdarkly requested a review from a team as a code owner March 6, 2026 22:24
- Bump @launchdarkly/observability-android to 0.29.0, adding MAUI hook proxy and fixing fullsnapshot nodeId reset.
- Bump @launchdarkly/observability-react-native to 0.7.1, addressing ldclient dependency issues.
- Bump @launchdarkly/session-replay-react-native to 0.2.2, fixing ldclient dependencies and updating workspace dependency on observability-react-native.
Copy link

@cursor cursor bot left a comment

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.

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

KSCrashFilters \
KSCrashInstallations \
KSCrashRecording \
URLSessionInstrumentation
Copy link

Choose a reason for hiding this comment

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

Incomplete strip list may leave unresolvable imports in swiftinterface

Medium Severity

The comment at line 225 says "fold in all internal / ObjC-only deps whose imports we will strip," and line 257 says "strip KSCrash*" (wildcard). However, strip_imports for LaunchDarklyObservability only strips 4 of the 8 merged KSCrash modules — KSCrashCore, KSCrashRecordingCore, KSCrashReportingCore, and KSCrashSinks are missing. Similarly, NetworkStatus and ObjCBridge are merged but not stripped. If any of these modules appear in the generated .swiftinterface, consumers would get "missing module" compile errors since these aren't shipped as separate xcframeworks. Adding them to the strip list is harmless (a no-op if absent) and more robust.

Additional Locations (1)

Fix in Cursor Fix in Web

build_xcframework "LaunchDarklyObservability" \
Common \
NetworkStatus \
ObjCBridge \
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see SessionReplayC here.

Do we need such fragile way of handling in itemized way in .sh. script. Can we consume as the whole delegating decision what should be included to XCode tools.

Copy link
Contributor

@Vadman97 Vadman97 left a comment

Choose a reason for hiding this comment

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

Shipping prebuilt dynamic XCFrameworks eliminates flaky SPM resolution at build time and gives consumers a deterministic, version-locked binary that just works.

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.

3 participants