feat: [SDK-4998] enable KMP logger on Mac Catalyst - #1714
Conversation
There was a problem hiding this comment.
Multimodal adversarial review (interrogate)
Verdict: request changes. The Catalyst enablement is not self-consistent at this head: CI already fails, and the next steps would fail for independent reasons.
Intent
Enable the shared KMP remote logger on Mac Catalyst by removing
#if !targetEnvironment(macCatalyst)no-ops, linking the Catalyst XCFramework slice, and adding CI that verifies the slice, archivesOneSignalOSCorefor Catalyst, and runs a host through log/flush/shutdown.
Reviewers
- A:
claude-fable-5-thinking-xhigh— 9 findings - B:
gpt-5.6-sol-xhigh— 3 findings - C:
cursor-grok-4.5-high-fast— 7 findings - D:
claude-opus-5-thinking-high— 10 findings
Act On
- KMP gitlink not bumped (A/B/C/D). Head still pins
OneSignal-KMP-SDK@72581f3, which only buildsiosX64/iosArm64/iosSimulatorArm64. Noios-arm64_x86_64-maccatalystslice exists. CI run31646971241already dies atlipoon the missing path. Removing the Catalyst stubs also means Catalyst archives (includingbuild_all_frameworks.sh) will fail to importOneSignalKMPuntil the pin includes KMP #18. - Host target arch ≠ runner arch (A/B/C/D). Job is
macos-15-large(Intel; confirmed viaJAVA_HOME_17_X64in the failed run). Host is hardcoded toarm64-apple-ios14.0-macabi, then executed. After the slice exists, this step fails with bad CPU type. - No shared
OneSignalOSCorescheme (C; verified). Shared schemes have Core / UnitTestApp / etc., but notOneSignalOSCore. Archive uses-scheme OneSignalOSCoreand will fail on a clean CI checkout once the prior step passes. - Host never calls
start()(A/B/C/D). HTTP send is gated bylifecycle.performIfTransportActive(isStarted). Withoutstart(), flush completes as disabled while the semaphore still succeeds — false green for the stated log/flush/shutdown exercise.
Consider
- Drop or co-land
kotlinVersion/swiftVersion/additionalVersionAttributeswith the KMP pin that actually declares them (A/C/D). - Move Catalyst Mach-O checks into KMP
verifyOneSignalKMPXCFrameworkinstead of duplicating lipo/ar/vtool in YAML (A/C/D). - Put
FRAMEWORK_SEARCH_PATHS[sdk=macosx*]onOneSignalOSCorenext to the iOS keys, not only project-level configs (A/C/D). - Prefer
xcodebuild testofOneSignalOSCoreTestson Catalyst over a bespoke host (A/D). - Add a Catalyst platform discriminator so logs are not indistinguishable from iPad (
sdkBase/UIDevicevskern.osversion) (A/D).
Noted
"unavailable"preconditions are tautological after stub removal (A/D).- Leftover no-op
OSRemoteLoggerProtocol.start()default (A). - Hardcoded slice path proliferation /
[sdk=macosx*]broader than Catalyst (D). - Import/format leftovers from
#ifdeletion (D).
Agreement map
All four models independently flagged the unpinned Catalyst slice and the host disabled/start() gap. Three+ flagged the Intel-vs-arm64 host target. Scheme absence and protocol-stub drift were lower fan-out but verified in-repo. No reviewer found the PR ready to merge as-is.
Skill: Cursor interrogate (pstack).
Sent by Cursor Automation: Untitled
Pin the Catalyst-capable KMP artifact and exercise the active logger lifecycle on the CI runner architecture through a shared archive scheme. Co-authored-by: Cursor <cursoragent@cursor.com>


Description
One Line Summary
Enables the shared KMP logger when the iOS SDK is built for Mac Catalyst.
Details
Motivation
Mac Catalyst builds currently use a no-op remote logger because the KMP XCFramework does not expose a Catalyst slice. With the Catalyst slice added in OneSignal-KMP-SDK#18, the iOS SDK can compile, link, and run the shared logging pipeline on Catalyst.
Scope
OneSignalKMP.xcframework.OneSignalOSCorefor Catalyst and runs a small host that exercises log, flush, and shutdown.Testing
Unit testing
No new unit tests are needed for the platform guards and Xcode link settings. CI adds a Catalyst runtime host that exercises the KMP logger adapters end to end.
Manual testing
OneSignalOSCoreforgeneric/platform=macOS,variant=Mac Catalyst.Affected code checklist
Checklist
Overview
Testing
Final pass
Made with Cursor