build: Update fcm shared isolate

This commit is contained in:
Christian Kußowski 2026-03-15 07:43:47 +01:00
commit 2ad2b1e52c
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
5 changed files with 10 additions and 8 deletions

View file

@ -128,10 +128,7 @@ jobs:
run: sudo xcode-select --switch /Applications/Xcode_16.4.app
- run: brew install sqlcipher
- uses: moonrepo/setup-rust@v1
- name: Add Firebase Messaging
run: |
flutter pub add fcm_shared_isolate:0.1.0
sed -i '' 's,//<GOOGLE_SERVICES>,,g' lib/utils/background_push.dart
- run: ./scripts/add-firebase-messaging.sh
- run: flutter pub get
- run: flutter build ios --no-codesign

View file

@ -12,5 +12,7 @@ import Flutter
func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
}
// From https://pub.dev/packages/flutter_local_notifications#-ios-setup
UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate }
}

View file

@ -122,7 +122,7 @@ class BackgroundPush {
//<GOOGLE_SERVICES>firebase.setListeners(
//<GOOGLE_SERVICES> onMessage: (message) => pushHelper(
//<GOOGLE_SERVICES> PushNotification.fromJson(
//<GOOGLE_SERVICES> Map<String, dynamic>.from(message['data'] ?? message),
//<GOOGLE_SERVICES> message.tryGetMap<String, Object>('data') ?? message,
//<GOOGLE_SERVICES> ),
//<GOOGLE_SERVICES> client: client,
//<GOOGLE_SERVICES> l10n: l10n,
@ -351,6 +351,9 @@ class BackgroundPush {
Future<void> setupFirebase() async {
Logs().v('Setup firebase');
if (_fcmToken?.isEmpty ?? true) {
if (PlatformInfos.isIOS) {
//<GOOGLE_SERVICES>await firebase.requestPermission();
}
try {
//<GOOGLE_SERVICES>_fcmToken = await firebase.getToken();
if (_fcmToken == null) throw ('PushToken is null');

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash
flutter pub add fcm_shared_isolate:0.2.0
flutter pub add fcm_shared_isolate
flutter pub get
if [[ "$OSTYPE" == "darwin"* ]]; then

View file

@ -1,5 +1,5 @@
#!/bin/sh -ve
flutter pub add fcm_shared_isolate:0.2.0
flutter pub add fcm_shared_isolate
sed -i '' 's,//<GOOGLE_SERVICES>,,g' lib/utils/background_push.dart
flutter clean
flutter pub get