feat(core): add MobileCore.setPushIdentifier API#158
Open
brunogabriel wants to merge 9 commits into
Open
Conversation
Expose setPushIdentifier on Android and iOS so Flutter apps can register a push notification token directly through the Dart API without dropping down to native code. - Dart: MobileCore.setPushIdentifier(String? token) - Android: handleSetPushIdentifier follows handleSetAdvertisingIdentifier pattern - iOS: converts NSString token to NSData via NSUTF8StringEncoding before calling [AEPMobileCore setPushIdentifier:] - Tests: added group covering token and null cases - Docs: CHANGELOG 5.0.2 entry and README API section
Add a second method that accepts Uint8List? and passes the bytes directly to [AEPMobileCore setPushIdentifier:] as NSData on iOS, without any UTF-8 or hex encoding — which is the correct behaviour for raw APNs device tokens. On Android the method is a no-op with a debug log; developers should use setPushIdentifier(String?) with the FCM token there. - Dart: import dart:typed_data, add setPushIdentifierWithData(Uint8List?) - iOS: handleSetPushIdentifierWithData uses FlutterStandardTypedData.data - Android: no-op handler with debug log - Tests: 25/25 passing
ZeckWork
approved these changes
Apr 24, 2026
reberthkss
approved these changes
Apr 24, 2026
paulovitorns
approved these changes
Apr 24, 2026
…ersion - Remove setPushIdentifierWithData; a single setPushIdentifier(String?) now handles both Android (FCM token) and iOS (APNs hex token) - Fix iOS bridge: convert hex string to NSData internally instead of UTF-8 encoding, which was registering wrong bytes with the AEP SDK - Fix corrupted .gitignore line that merged two entries into one - Update CHANGELOG, README and tests accordingly
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
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.
Add `MobileCore.setPushIdentifier(String? token) API to the Flutter wrapper for the Adobe Experience Platform Core SDK.
Related Issue
Motivation and Context
Flutter developers using Adobe Journey Optimizer are forced to write native Android/iOS code to call
setPushIdentifier, since the method was missing from the Flutter wrapper. This was reported in the Experience League community:https://experienceleaguecommunities.adobe.com/adobe-journey-optimizer-15/flutter-and-push-notifications-116363
How Has This Been Tested?
Added unit tests in
plugins/flutter_aepcore/test/flutter_aepcore_test.dartcovering both methods (token and null cases). All 25 tests influtter_aepcore_test.dartpass. All tests across all plugins pass (flutter testin each plugin directory).Tested in both platforms Android and iOS to receive a push.
Screenshots (if appropriate):
Types of changes
Checklist: