Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
d6237c7
refactor: clean unused packages on sample app
brunogabriel Apr 23, 2026
efdf87a
feat(core): add MobileCore.setPushIdentifier API
brunogabriel Apr 24, 2026
16a3147
feat(core): add MobileCore.setPushIdentifierWithData for raw APNs token
brunogabriel Apr 24, 2026
0489770
chore: remove IDE-generated Eclipse/Buildship files from tracking
brunogabriel Apr 24, 2026
a6fcf79
chore: remove ephemeral Flutter iOS files from tracking
brunogabriel Apr 24, 2026
3f1c58c
fix(core): unify setPushIdentifier API and fix iOS hex-to-NSData conv…
brunogabriel May 13, 2026
880c83d
chore: restore .gitignore to match main (no trailing newline)
brunogabriel May 14, 2026
1b5dba3
chore: restore example/pubspec.lock to match main
brunogabriel May 14, 2026
bcfbe9a
docs(core): decouple setPushIdentifier docs from Firebase references
brunogabriel May 14, 2026
f512808
fix(core/ios): log error and return on malformed APNs token instead o…
brunogabriel May 25, 2026
8ed495b
fix(core/ios): validate hex characters in APNs token conversion loop
brunogabriel May 26, 2026
0959605
chore: remove changelog entry (will be added by Adobe on release)
brunogabriel Jun 2, 2026
87b2aa3
[MOB-24978] refresh InApp bug fix
Harjot1508 Jun 3, 2026
db9e1cf
Update macOS version for iOS build job
navratan-soni Jun 3, 2026
f2dd450
Merge pull request #158 from brunogabriel/feat/custom-ids
navratan-soni Jun 3, 2026
6bf2ad0
Merge pull request #160 from Harjot1508/hsk/inappFix
navratan-soni Jun 3, 2026
4a380bb
release versions update
Harjot1508 Jun 3, 2026
5d2989e
Merge pull request #161 from Harjot1508/dev-5.1.0
akhiljain1907 Jun 5, 2026
3c1d9e3
xcode version updated
Harjot1508 Jun 5, 2026
45c5faf
Merge pull request #163 from Harjot1508/macOSFix
navratan-soni Jun 5, 2026
657b8a9
Merge pull request #162 from adobe/dev-5.1.0
navratan-soni Jun 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ jobs:

job2:
name: Build iOS example app
runs-on: macos-13
runs-on: macos-15

steps:
- uses: actions/checkout@v1

- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "15.0.1"
xcode-version: "16.4.0"

- uses: actions/setup-java@v1
with:
Expand Down Expand Up @@ -189,4 +189,4 @@ jobs:
- name: Unit test
working-directory: ./plugins/flutter_aepuserprofile
run: flutter test


1 change: 0 additions & 1 deletion example/lib/core.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import 'package:flutter/material.dart';
import 'dart:developer';
import 'package:flutter/services.dart';
import 'package:flutter_aepcore/flutter_aepcore.dart';
import 'package:flutter_aepcore/flutter_aepcore_data.dart';
import 'package:flutter_aepcore/flutter_aeplifecycle.dart';
import 'package:flutter_aepcore/flutter_aepsignal.dart';
import 'util.dart';
Expand Down
1 change: 0 additions & 1 deletion example/lib/identity.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ governing permissions and limitations under the License.
import 'dart:developer';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_aepcore/flutter_aepcore_data.dart';
import 'package:flutter_aepcore/flutter_aepidentity.dart';
import 'util.dart';

Expand Down
2 changes: 0 additions & 2 deletions example/lib/messaging.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ governing permissions and limitations under the License.

import 'dart:developer';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_aepcore/flutter_aepcore.dart';
import 'package:flutter_aepcore/flutter_aepcore_data.dart';
import 'package:flutter_aepmessaging/flutter_aepmessaging.dart';
import 'util.dart';

Expand Down
3 changes: 3 additions & 0 deletions plugins/flutter_aepcore/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 5.1.0
* Added `MobileCore.setPushIdentifier` API to the Flutter wrapper.

## 5.0.1

* Add `MobileCore.setApplication` call in Android FlutterPlugin's `onAttachedToEngine` to accurately register lifecycle callbacks for launcher activity.
Expand Down
20 changes: 20 additions & 0 deletions plugins/flutter_aepcore/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,26 @@ static Future<void> trackState
MobileCore.trackState("myState", data: {"key1": "value1"});
```

### setPushIdentifier
Register a push notification token with the Adobe SDK. Pass `null` to clear a previously registered token.

On **Android**, pass the push token string provided by your push notification service.
On **iOS**, pass the APNs device token as a lowercase hex string. The native bridge converts it to the raw bytes expected by the AEP SDK internally.

**Syntax**
```dart
static Future<void> setPushIdentifier(String? token)
```

**Example**
```dart
// Register a push token
MobileCore.setPushIdentifier(token);

// Clear the push token
MobileCore.setPushIdentifier(null);
```

### Identity

For more information on the Core Identity APIs, visit the documentation [here](https://developer.adobe.com/client-sdks/documentation/mobile-core/identity/).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ public void onMethodCall(MethodCall call, @NonNull Result result) {
} else if ("setAdvertisingIdentifier".equals(call.method)) {
handleSetAdvertisingIdentifier(call.arguments);
result.success(null);
} else if ("setPushIdentifier".equals(call.method)) {
handleSetPushIdentifier(call.arguments);
result.success(null);
} else if ("dispatchEvent".equals(call.method)) {
handleDispatchEvent(result, call.arguments);
} else if ("dispatchEventWithResponseCallback".equals(call.method)) {
Expand Down Expand Up @@ -191,6 +194,16 @@ private void handleSetAdvertisingIdentifier(final Object arguments) {
}
}

private void handleSetPushIdentifier(final Object arguments) {
if (arguments == null) {
MobileCore.setPushIdentifier(null);
}

if (arguments instanceof String) {
MobileCore.setPushIdentifier((String) arguments);
}
}

private void handleDispatchEvent(final Result result, final Object arguments) {
if (!(arguments instanceof Map)) {
Log.e(TAG, "Dispatch event failed because arguments were invalid");
Expand Down
32 changes: 32 additions & 0 deletions plugins/flutter_aepcore/ios/Classes/FlutterAEPCorePlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ - (void)handleMethodCall:(FlutterMethodCall *)call
NSString *aid = call.arguments;
[AEPMobileCore setAdvertisingIdentifier:aid];
result(nil);
} else if ([@"setPushIdentifier" isEqualToString:call.method]) {
[self handleSetPushIdentifier:call];
result(nil);
} else if ([@"dispatchEvent" isEqualToString:call.method]) {
[self handleDispatchEvent:call result:result];
} else if ([@"dispatchEventWithResponseCallback"
Expand Down Expand Up @@ -198,6 +201,35 @@ - (void)handleResetIdentities:(FlutterMethodCall *)call {
[AEPMobileCore resetIdentities];
}

- (void)handleSetPushIdentifier:(FlutterMethodCall *)call {
if (call.arguments == nil || call.arguments == [NSNull null]) {
[AEPMobileCore setPushIdentifier:nil];
return;
}

// The Dart layer sends the APNs token as a lowercase hex string (e.g. "a1b2c3d4...").
// Convert it back to the original NSData bytes that AEP SDK expects.
NSString *hexString = call.arguments;
NSUInteger length = hexString.length;
if (length % 2 != 0) {
NSLog(@"[FlutterAEPCore] setPushIdentifier - Invalid APNs token: hex string has odd length (%lu), skipping.", (unsigned long)length);
return;
}
NSMutableData *tokenData = [NSMutableData dataWithCapacity:length / 2];
for (NSUInteger i = 0; i < length; i += 2) {
NSString *byteString = [hexString substringWithRange:NSMakeRange(i, 2)];
NSScanner *scanner = [NSScanner scannerWithString:byteString];
unsigned int byte = 0;
if (![scanner scanHexInt:&byte] || !scanner.isAtEnd) {
NSLog(@"[FlutterAEPCore] setPushIdentifier - Invalid APNs token: non-hex character found at index %lu, skipping.", (unsigned long)i);
return;
}
uint8_t byteValue = (uint8_t)byte;
[tokenData appendBytes:&byteValue length:1];
}
[AEPMobileCore setPushIdentifier:tokenData];
}

- (FlutterError *)flutterErrorFromNSError:(NSError *)error {
return [FlutterError
errorWithCode:[NSString stringWithFormat:@"%ld", (long)error.code]
Expand Down
2 changes: 1 addition & 1 deletion plugins/flutter_aepcore/ios/flutter_aepcore.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'flutter_aepcore'
s.version = '5.0.0'
s.version = '5.1.0'
s.summary = 'Adobe Experience Platform support for Flutter apps.'
s.homepage = 'https://developer.adobe.com/client-sdks'
s.license = { :file => '../LICENSE' }
Expand Down
15 changes: 14 additions & 1 deletion plugins/flutter_aepcore/lib/flutter_aepcore.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ class MobileCore {
/// Initializes the AEP Mobile SDK with the provided initialization options.
/// @param initOptions The [InitOptions] to configure the SDK.
static Future<void> initialize({required InitOptions initOptions}) {
return _channel.invokeMethod<void>('initialize', {'initOptions': initOptions.toMap()});
return _channel
.invokeMethod<void>('initialize', {'initOptions': initOptions.toMap()});
}

/// Initializes the AEP Mobile SDK with the provided App ID.
Expand Down Expand Up @@ -69,6 +70,18 @@ class MobileCore {
static Future<void> setAdvertisingIdentifier(String aid) =>
_channel.invokeMethod<void>('setAdvertisingIdentifier', aid);

/// Submits a generic event containing the provided push token with event type `generic.identity`.
///
/// On **Android**, pass the push token string as provided by your push notification service.
/// On **iOS**, pass the APNs device token as a lowercase hex string. The native bridge
/// converts it to the raw bytes expected by the AEP SDK internally.
///
/// Pass `null` to clear a previously registered token.
///
/// @param token The push notification token string. Pass `null` to clear the identifier.
static Future<void> setPushIdentifier(String? token) =>
_channel.invokeMethod<void>('setPushIdentifier', token);

/// Called by the extension public API to dispatch an event for other extensions or the internal SDK to consume. Any events dispatched by this call will not be processed until after `start` has been called.
static Future<void> dispatchEvent(Event event) =>
_channel.invokeMethod<void>('dispatchEvent', event.data);
Expand Down
2 changes: 1 addition & 1 deletion plugins/flutter_aepcore/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_aepcore
description: Official Adobe Experience Platform support for Flutter apps. The Mobile Core represents the core Adobe Experience Platform SDK that is required for every app implementation.
version: 5.0.1
version: 5.1.0
homepage: https://developer.adobe.com/client-sdks
repository: https://github.com/adobe/aepsdk-flutter/tree/main/plugins/flutter_aepcore

Expand Down
Loading
Loading