Skip to content

fix: cap OneTrust SDK versions to avoid ObjC selector mismatch#773

Merged
denischilik merged 4 commits into
mainfrom
fix/onetrust-version-cap-for-objc-ci
May 19, 2026
Merged

fix: cap OneTrust SDK versions to avoid ObjC selector mismatch#773
denischilik merged 4 commits into
mainfrom
fix/onetrust-version-cap-for-objc-ci

Conversation

@denischilik
Copy link
Copy Markdown
Contributor

@denischilik denischilik commented May 19, 2026

Background

CI started failing after newer OneTrust SDK releases were resolved by default.
Those versions no longer expose the Objective-C selector expected by the OneTrust kit integration.

What Has Changed

  • Added an upper-only cap for OneTrust SPM dependencies (< 202503.0.0) in the kit package manifest.
  • Added an upper-only cap for CocoaPods OneTrust dependencies (< 202503.0.0) in the kit podspec.
  • Kept runtime integration code unchanged and scoped the fix to dependency constraints only.

Screenshots/Video

N/A

Checklist

  • I have performed a self-review of my own code.
  • I have made corresponding changes to the documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have tested this locally.

Additional Notes

This update is intended to stabilize CI by preventing automatic resolution to OneTrust SDK versions where the ObjC selector mismatch occurs.

Prevent OneTrust releases from 202503+ from being resolved by default, where the selector used by the Objective-C kit integration is not available and CI builds fail.
@denischilik denischilik requested a review from a team as a code owner May 19, 2026 19:13
@cursor
Copy link
Copy Markdown

cursor Bot commented May 19, 2026

PR Summary

Low Risk
Low risk: this only tightens SPM/CocoaPods dependency version constraints to avoid resolving incompatible OneTrust releases, with no runtime code changes.

Overview
Prevents CI/build breakages from newer OneTrust releases by capping resolved OneTrust SDK versions.

Updates Package.swift to limit both iOS/tvOS OTPublishersHeadlessSDK* SPM dependencies to < 202503.0.0, and updates mParticle-OneTrust.podspec to apply the same < 202503.0.0 upper bound for the CocoaPods OneTrust-CMP-* dependencies.

Reviewed by Cursor Bugbot for commit 4485712. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown

@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.

Fix All in Cursor

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

Reviewed by Cursor Bugbot for commit 9c3176b. Configure here.

Comment thread Kits/onetrust/onetrust/Package.swift
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 19, 2026

📦 SDK Size Impact Report

Measures how much the SDK adds to an app's size (with-SDK minus without-SDK).

Metric Target Branch This PR Change
App Bundle Impact 1.77 MB 1.77 MB +N/A
Executable Impact 848 bytes 848 bytes +N/A
XCFramework Size 6.44 MB 6.44 MB +N/A

➡️ SDK size impact change is minimal.

Raw measurements

Target branch (main):

{"baseline_app_size_kb":84,"baseline_executable_size_bytes":75464,"with_sdk_app_size_kb":1896,"with_sdk_executable_size_bytes":76312,"sdk_impact_kb":1812,"sdk_executable_impact_bytes":848,"xcframework_size_kb":6596}

This PR:

{"baseline_app_size_kb":84,"baseline_executable_size_bytes":75464,"with_sdk_app_size_kb":1896,"with_sdk_executable_size_bytes":76312,"sdk_impact_kb":1812,"sdk_executable_impact_bytes":848,"xcframework_size_kb":6596}

Set the SPM lower bound to 202502.1.0 so SPM and CocoaPods resolve the same safe OneTrust range and avoid selecting older incompatible SDK releases.
Limit CocoaPods resolution to versions below 202503.0.0 while leaving the lower bound open, matching the intended policy to pin only the upper OneTrust version.
Limit SPM OneTrust dependencies to versions below 202503.0.0 while leaving the lower bound open, matching the upper-bound-only version policy.
@denischilik denischilik merged commit f7a6b58 into main May 19, 2026
74 checks passed
@denischilik denischilik deleted the fix/onetrust-version-cap-for-objc-ci branch May 19, 2026 19:47
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.

2 participants