Cocoa: Apple native-client update - #303
Merged
Merged
Conversation
- Use the backtrace-cocoa native artifacts and the shared V3 Apple bridge, UTF-8 allocation handling, and process-lifetime session ownership. - Isolate new macOS pending reports with the flat universal plugin while preserving the existing iOS pending store and OOM Light behaviour. - Initialize native capture independently of the managed offline database. - Wire iOS framework linking, embedding, privacy resources, and bridge-only compiler flags without linking a second static PLCrashReporter runtime. - Preserve native bytes, importer identities, and host project settings.
- Cover shared ownership, UTF-8 interop, shutdown, and repeated iOS postprocessing with focused runtime and Editor regression tests. - Validate approved native inputs and the packaged artifact round trip. - Build macOS Mono/IL2CPP players and compile device/ARM64 Simulator iOS exports with the explicit Apple toolchain configuration. - Run iOS EditMode tests in the existing iOS build path, retain their XML and logs, and fail when required tests are absent or skipped. - Preserve all existing non-Apple CI lanes and the generic result checker.
- Append .app when GameCI supplies output basename without an an extension. - Preserve direct .app paths and existing build validation.
- Select Test Framework 1.4.6 for Unity 2022.3 and 1.6.0 for Unity 6 so the iOS fixtures support SaveResultToFile. - Queue build and test jobs sharing UNITY_SERIAL without cancelling pending matrix entries.
melekr
marked this pull request as ready for review
September 16, 2026 01:14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Integrate Cocoa 2.2.0 across Unity's Apple native clients
Summary
Update Backtrace Unity to backtrace-cocoa ver. 2.2.0, fix macOS native pending-report isolation, and use one managed interop/lifecycle implementation for macOS and iOS.
Why
The previous macOS integration used PLCrashReporter's default pending-report namespace, which Unity also inspects during startup. Backtrace reports could be consumed before the SDK initialized. The affected Unity 6000.3 reproduction could also crash during relaunch in
CrashReporting::CrashReporter::CheckPendingNativeCrash.The old macOS plugin additionally depended on symlinks in a nested versioned framework. The new plugin is a flat, self-contained universal bundle.
The iOS update consumes the dedicated device/simulator Cocoa XCFrameworks and brings the managed/native boundary under the same explicit allocation and lifecycle rules, while preserving the existing iOS pending-report path and OOM Light behavior.
Implementation
Shared managed Apple integration
AppleNativeBridge,AppleNativeSession, andAppleNativeClient. Retain the platform-specific factories and small macOS/iOS adapters.ReportPerMin, including0for unlimited native admission.GetAttributesmemory through nativeFreeAttributes, including failure paths; do not free native-owned allocations with the managed allocator.Refresh()calls.macOS
BacktraceMacUnity.bundle.iOS
-fobjc-arc -fobjc-exceptions -fno-autolink.iOS Xcode integration
UnityFrameworkand embed it in the application.Packaging, tooling and tests
ref: BT-7562
ref: BT-7522