Skip to content

Conversation

@BrandonStalnaker
Copy link
Collaborator

Background

  • The AppDelegateProxy feature allowed the mParticle SDK to automatically intercept UIApplicationDelegate messages using NSProxy to handle application notifications (push notifications, URL handling, user activities, etc.) without requiring developers to manually call SDK methods from their app delegate.
  • This feature added complexity and was often disabled by customers who preferred explicit control over their app delegate lifecycle.
  • Removing this feature simplifies the SDK, reduces potential edge cases, and aligns with the expectation that developers will explicitly forward app delegate events to the SDK.

What Has Changed

  • Removed MPAppDelegateProxy class (proxy that intercepted app delegate messages)
  • Removed MPSurrogateAppDelegate class (surrogate that implemented delegate methods)
  • Removed proxyAppDelegate property from MParticleOptions
  • Removed proxiedAppDelegate property from MParticle
  • Removed proxyOriginalAppDelegate and unproxyOriginalAppDelegate methods from MPBackendController
  • Updated MPBackendController.startWithKey: to no longer accept a proxyAppDelegate parameter
  • Updated documentation for app notification methods (didReceiveRemoteNotification:, didRegisterForRemoteNotificationsWithDeviceToken:, etc.) to reflect that they should always be called manually
  • Removed the automatic early-return behavior in notification methods that previously skipped processing when the proxy was active
  • Updated unit tests to remove proxy-related test cases and assertions
  • The SDK now behaves as if proxyAppDelegate was always set to NO - developers must explicitly call the SDK's notification methods from their app delegate

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.

Reference Issue (For employees only. Ignore if you are an outside contributor)

@BrandonStalnaker BrandonStalnaker self-assigned this Jan 20, 2026
@BrandonStalnaker BrandonStalnaker requested a review from a team as a code owner January 20, 2026 20:30
@BrandonStalnaker BrandonStalnaker changed the title refactor: Remove AppDelegateProxy and Relate Code refactor: Remove AppDelegateProxy and Related Code Jan 20, 2026
@github-actions
Copy link

github-actions bot commented Jan 21, 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.67 MB 1.64 MB -24 KB
Executable Impact 896 bytes 896 bytes +N/A
XCFramework Size 9.12 MB 9.06 MB -60 KB

➡️ SDK size impact change is minimal.

Raw measurements

Target branch (workstation/9.0-Release):

{"baseline_app_size_kb":84,"baseline_executable_size_bytes":75464,"with_sdk_app_size_kb":1792,"with_sdk_executable_size_bytes":76360,"sdk_impact_kb":1708,"sdk_executable_impact_bytes":896,"xcframework_size_kb":9336}

This PR:

{"baseline_app_size_kb":84,"baseline_executable_size_bytes":75464,"with_sdk_app_size_kb":1768,"with_sdk_executable_size_bytes":76360,"sdk_impact_kb":1684,"sdk_executable_impact_bytes":896,"xcframework_size_kb":9276}

Copy link
Contributor

@nickolas-dimitrakas nickolas-dimitrakas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, TBD on whether to remove trunk rules for MIGRATING.md

@BrandonStalnaker BrandonStalnaker merged commit 646c804 into workstation/9.0-Release Jan 21, 2026
12 of 13 checks passed
@BrandonStalnaker BrandonStalnaker deleted the refactor/remove-appdelegsteproxy branch January 21, 2026 19:01
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.

4 participants