From 95a03434ca4f1a9c00f670eb20dd37645a3973a9 Mon Sep 17 00:00:00 2001 From: JulianAlcala Date: Wed, 15 Apr 2026 11:25:06 +0200 Subject: [PATCH] fix(antelop): route FCM pushes through SDK, per-flavor plist on iOS, unify applicationId - Add AntelopAwareMessagingService so the Antelop SDK gets first dibs on every FCM push before delegating to firebase_messaging. Unblocks SCA wallet activation on Android, which was waiting forever for pushes that the FlutterFirebaseMessagingService was swallowing ever since Firebase was integrated. Remove the stock Antelop and firebase_messaging services via manifest-merge so only the wrapper handles MESSAGING_EVENT. - Add Copy AntelopRelease Build Phase in Xcode to copy Runner/AntelopRelease-{flavor}.plist over the fixed AntelopRelease.plist inside the .app bundle based on CONFIGURATION. Without this the iOS SDK silently used the production plist on every flavor. - Revert the six applicationId values (3 AndroidManifest + 3 AntelopRelease plist) to the sample id 4713640103500149457, which is the only one provisioned in Antelop's backend today. The four env+platform ids they provided all fail with 9999 / cryptography: Error while decrypting data. To be updated once Treezor confirms the real ids. - Add packages/flutter_treezor_entrust_sdk_bridge/example as a pub workspace member and bump its Dart SDK and flutter_lints constraints so 'melos bootstrap' stops failing with 'dependencies for flutter_treezor_entrust_sdk_bridge_example missing'. --- apps/mobile_app/android/app/build.gradle.kts | 6 + .../app/src/development/AndroidManifest.xml | 2 +- .../android/app/src/main/AndroidManifest.xml | 22 +- .../app/AntelopAwareMessagingService.kt | 33 ++ .../app/src/production/AndroidManifest.xml | 2 +- .../app/src/staging/AndroidManifest.xml | 2 +- .../ios/Runner.xcodeproj/project.pbxproj | 19 + .../Runner/AntelopRelease-development.plist | 2 +- .../ios/Runner/AntelopRelease-staging.plist | 2 +- .../ios/Runner/AntelopRelease.plist | 2 +- .../ios/scripts/copy-antelop-release-plist.sh | 46 +++ .../example/pubspec.lock | 331 ------------------ .../example/pubspec.yaml | 5 +- pubspec.lock | 31 ++ pubspec.yaml | 1 + 15 files changed, 166 insertions(+), 340 deletions(-) create mode 100644 apps/mobile_app/android/app/src/main/kotlin/com/savefamily/app/AntelopAwareMessagingService.kt create mode 100755 apps/mobile_app/ios/scripts/copy-antelop-release-plist.sh delete mode 100644 packages/flutter_treezor_entrust_sdk_bridge/example/pubspec.lock diff --git a/apps/mobile_app/android/app/build.gradle.kts b/apps/mobile_app/android/app/build.gradle.kts index fe771d18..206fa5bc 100644 --- a/apps/mobile_app/android/app/build.gradle.kts +++ b/apps/mobile_app/android/app/build.gradle.kts @@ -101,4 +101,10 @@ flutter { dependencies { coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.4") + // Required by AntelopAwareMessagingService to forward FCM pushes to the + // Antelop SDK. The Antelop AAR (com.entrust.antelop:antelop) is brought + // in transitively through the flutter_treezor_entrust_sdk_bridge plugin. + implementation(platform("com.google.firebase:firebase-bom:33.4.0")) + implementation("com.google.firebase:firebase-messaging") + implementation("com.entrust.antelop:antelop:2.6.4") } diff --git a/apps/mobile_app/android/app/src/development/AndroidManifest.xml b/apps/mobile_app/android/app/src/development/AndroidManifest.xml index 473d9979..667a552d 100644 --- a/apps/mobile_app/android/app/src/development/AndroidManifest.xml +++ b/apps/mobile_app/android/app/src/development/AndroidManifest.xml @@ -2,7 +2,7 @@ + android:value="4713640103500149457" /> diff --git a/apps/mobile_app/android/app/src/main/AndroidManifest.xml b/apps/mobile_app/android/app/src/main/AndroidManifest.xml index 787e42db..5038ec9b 100644 --- a/apps/mobile_app/android/app/src/main/AndroidManifest.xml +++ b/apps/mobile_app/android/app/src/main/AndroidManifest.xml @@ -1,4 +1,5 @@ - + @@ -34,6 +35,25 @@ + + + + + + + + + + + + +