Skip to content

Conversation

melekr
Copy link
Contributor

@melekr melekr commented Sep 15, 2025

Changes summary

This PR migrates the Unity native integration from the legacy cocoa static libraries to dynamic backtrace-cocoa frameworks:

  • iOS: link Backtrace.xcframework (dynamic) + CrashReporter.xcframework (static), embed Backtrace, set Swift/platform flags via a post-build.
  • macOS: Update plugin bundle (BacktraceMacUnity.bundle) that exports the native C API and nests Backtrace.framework for runtime. PLCrashReporter is linked statically.

The public C# API remains unchanged, only NativeClient and build steps are updated.

Why this change

  • Modern packaging: XCFramework is Apple’s native distribution format for binary SDKs. Bundles device & simulator slices + correct slice selection at build time and Privacy & resources packaging.
  • Stability/maintainability: Native standard Apple linking/embedding semantics + Swift runtime embedding of Swift stdlibs.
  • Parity: aligns Unity integration with Backtrace’s official iOS/macOS SDK expectations.

Footprint

size

Sample Reports

What's next

  • Expose more cocoa settings & expand configuration
  • Offload/remove frameworks and bundle from repo

@melekr melekr marked this pull request as draft September 15, 2025 23:25
@melekr melekr changed the title Feature/update cocoa dylib Migrate Unity iOS/macOS native integration Sep 16, 2025
@melekr melekr self-assigned this Sep 16, 2025
@melekr melekr marked this pull request as ready for review September 16, 2025 03:25
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