dd-sdk-ios
dd-sdk-ios copied to clipboard
Fix Session Replay ObjC interface
What and why?
The current Objective-C interface for Session Replay doesn't adhere to the internal guidelines for Objective-C interoperability (see RFC).
How?
- Applied
@_spi(objc)to hide the ObjC interfaces from Swift consumers while keeping them accessible to ObjC clients. - Prefixed types with
objc_*to differentiate them from Swift-native types. - Updated the ObjC interface for
SessionReplay,SessionReplayConfiguration, and the different privacy levels following the modular interface guidelines. - Moved
DDSessionReplayTeststo the Session Replay module
Review checklist
- [x] Feature or bugfix MUST have appropriate tests (unit, integration)
- [ ] Make sure each commit and the PR mention the Issue number or JIRA reference
- [ ] Add CHANGELOG entry for user facing changes
Datadog Report
Branch report: fix-sr-objc-interface
Commit report: ce213b9
Test service: dd-sdk-ios
:white_check_mark: 0 Failed, 3479 Passed, 0 Skipped, 2m 21.39s Total Time :small_red_triangle_down: Test Sessions change in coverage: 5 decreased, 4 increased, 5 no change
:small_red_triangle_down: Code Coverage Decreases vs Default Branch (5)
Is the following a potentially backward-incompatible change?
Prefixed types with objc_* to differentiate them from Swift-native types.
It is changing the name of the exported symbols, right?
Is the following a potentially backward-incompatible change?
Prefixed types with objc_* to differentiate them from Swift-native types.
It is changing the name of the exported symbols, right?
This won't cause any backward compatibility issues. ObjC users will still use DDSessionReplay and and DDSessionReplayConfiguration thanks to the @objc(xxx) annotation. The exported symbols will stay the same.