так что это работает в Android, когда приложение находится на переднем плане или в фоновом режиме, но не работает в фоновом режиме iOS.
вот шаг, которому я следую для настройки.
на флаттере: https://github.com/hiennguyen92/flutter ... ob/master/ example/lib/main.dart
в делегате приложения: https://github.com/hiennguyen92/flutter ... gate.swift
и для iOS: https://github.com/hiennguyen92/flutter ... PUSHKIT.md
Код: Выделить всё
//lisent notificaiton in background and trigger call kit.
Future _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
debugPrint("-----[FIREBASE-BACK]------>Handling a background message: ${message.data}");
if (message.data['topic'] == 'screen.sharing.invite') {
showCallkitIncoming(data: message.data);
}
}
Код: Выделить всё
//Here is full implimentation of showCallKitIncomeing function
Future showCallkitIncoming({required Map data}) async {
CallKitParams params = CallKitParams(
id: const Uuid().v4(),
nameCaller: 'APP Screen Sharing Call',
appName: 'APP Title', ///
Подробнее здесь: [url]https://stackoverflow.com/questions/78390457/flutter-callkit-incoming-not-working-in-ios-when-app-is-in-terminated[/url]
Мобильная версия