Merge pull request #2710 from krille-chan/krille/release-update-fcm-shared-isolate

build: Update fcm shared isolate
pull/2770/head rc2.5.1-1
Krille-chan 2 months ago committed by GitHub
commit d4b12af61e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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

@ -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 }
}

@ -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');

@ -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

@ -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

Loading…
Cancel
Save