-
Notifications
You must be signed in to change notification settings - Fork 71
refactor: replace static methods in mp notification controller and mp state machine #434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
nickolas-dimitrakas
merged 15 commits into
test/add-test-coverage-for-application-notifications-methods
from
refactor/replace-static-methods-in-MPNotificationController-and-MPStateMachine
Oct 28, 2025
Conversation
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
switched from static methods
25707f8 to
0ca99c9
Compare
0ca99c9 to
16a454d
Compare
BrandonStalnaker
requested changes
Oct 27, 2025
BrandonStalnaker
approved these changes
Oct 28, 2025
denischilik
approved these changes
Oct 28, 2025
a028908
into
test/add-test-coverage-for-application-notifications-methods
10 of 11 checks passed
nickolas-dimitrakas
added a commit
that referenced
this pull request
Oct 30, 2025
* refactor: remove static methods in MPNotificationController and deprecate MPStateMachine (#434) * Created app environment provider * replaced usage of static methods in mP.m * Create protocol for MPNotificationController * switched from static methods * replaced usage of notif controller static methods * removed initialization from methods to class init * fixed compilation issue * Update mParticle_iOS_SDKTests-Bridging-Header.h * make properties nonnull * Revert removal of static method and mark deprecation instead * put back deprecated static methods in implementation * cleaned up duplicated code * marked isAppExtension static method for deprecation * Update build-and-lint.yml * Revert to commit 0277379 * mark for deprecated method BREAKING CHANGE: Static methods in MPNotificationController have been fully removed. Use the new instance-based MPNotificationControllerProtocol implementation instead. DEPRECATED: Static methods in MPStateMachine are deprecated and will be removed in a future release. Migrate to the new instance-based approach. * Create mocks * Update AppEnvironmentProviderMock.swift * covered pushNotificationToken * covered setPushNotificationToken * Create protocol for MPAppNotificationHandler * Create MPAppNotificationHandlerMock * replace singleton usage of appNotificationHandler * covered didReceiveRemoteNotification * covered didFailToRegisterForRemoteNotificationsWithError * covered didRegisterForRemoteNotificationsWithDeviceToken * covered handleActionWithIdentifierForRemoteNotification * covered handleActionWithIdentifierForRemoteNotificationWithResponseInfo * covered openURL methods * covered continueUserActivity * Update MPAppNotificationHandlerMock.swift
nickolas-dimitrakas
added a commit
that referenced
this pull request
Oct 30, 2025
…cate MPStateMachine (#434) * Created app environment provider * replaced usage of static methods in mP.m * Create protocol for MPNotificationController * switched from static methods * replaced usage of notif controller static methods * removed initialization from methods to class init * fixed compilation issue * Update mParticle_iOS_SDKTests-Bridging-Header.h * make properties nonnull * Revert removal of static method and mark deprecation instead * put back deprecated static methods in implementation * cleaned up duplicated code * marked isAppExtension static method for deprecation * Update build-and-lint.yml * Revert to commit 0277379 * mark for deprecated method BREAKING CHANGE: Static methods in MPNotificationController have been fully removed. Use the new instance-based MPNotificationControllerProtocol implementation instead. DEPRECATED: Static methods in MPStateMachine are deprecated and will be removed in a future release. Migrate to the new instance-based approach.
mparticle-automation
added a commit
that referenced
this pull request
Jan 14, 2026
### Bug Fixes * Crash on launch when upgrading due to NSInvalidUnarchiveOperationException ([#469](#469)) ([5241667](5241667)) * Flakey test testLoggingCommerceEventToUpload ([#475](#475)) ([6cb3475](6cb3475)) * Handle Parenthesis in Release Notes ([#487](#487)) ([a9ab226](a9ab226)) * Rokt User Attribute Mapping Fix ([#478](#478)) ([9f56a05](9f56a05)) * Simulator not found failing CI ([#472](#472)) ([33df791](33df791)) * Use awk for changelog ([#488](#488)) ([16fa905](16fa905)) ### Features * Add IntegrationTests project with Tuist and WireMock setup ([#451](#451)) ([a1e51fc](a1e51fc)) * Add trunk rule to detect mParticle API keys ([#481](#481)) ([d78a8ec](d78a8ec)) * Implement Manual Scene Delegate Support ([#462](#462)) ([71fe8b7](71fe8b7)) * Implement Manual SceneDelegate Support ([#453](#453)) ([e5cbe84](e5cbe84)) * SDKE-528 Implement Script To Preprocess Request Recordings ([#452](#452)) ([69a8ed3](69a8ed3)) * SDKE-529 Implement Verification Script ([#454](#454)) ([d5e25e0](d5e25e0)) ### Reverts * Revert "feat: Implement Manual SceneDelegate Support ([#453](#453))" ([#455](#455)) ([d13601e](d13601e)) ### Tests * add test coverage for application notifications methods ([#436](#436)) ([d2243aa](d2243aa)), closes [#434](#434) ### BREAKING CHANGES * Static methods in MPNotificationController have been fully removed. Use the new instance-based MPNotificationControllerProtocol implementation instead. DEPRECATED: Static methods in MPStateMachine are deprecated and will be removed in a future release. Migrate to the new instance-based approach. * Create mocks * Update AppEnvironmentProviderMock.swift * covered pushNotificationToken * covered setPushNotificationToken * Create protocol for MPAppNotificationHandler * Create MPAppNotificationHandlerMock * replace singleton usage of appNotificationHandler * covered didReceiveRemoteNotification * covered didFailToRegisterForRemoteNotificationsWithError * covered didRegisterForRemoteNotificationsWithDeviceToken * covered handleActionWithIdentifierForRemoteNotification * covered handleActionWithIdentifierForRemoteNotificationWithResponseInfo * covered openURL methods * covered continueUserActivity * Update MPAppNotificationHandlerMock.swift
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.
Background
MPNotificationControllerandMPStateMachinemade it difficult to mock or test functionality related to push notification handling. This also created tight coupling between components and limited flexibility when integrating with other parts of the SDK.What Has Changed
Screenshots/Video
Checklist
Additional Notes
Reference Issue (For employees only. Ignore if you are an outside contributor)