Я использую библиотеку реагирования-native-callkeep в проекте React Native для обработки отображения входящих вызовов при получении уведомления от Firebase. Библиотека работает отлично, когда приложение активно, но не может отображать входящие вызовы или разбудить приложение, когда оно находится в фоновом режиме или завершено на iOS.
PS: уведомление Firebase работает нормально для обоих Android и ios
Вот соответствующая часть моего кода:
AppDelegate.m:
BGTaskSchedulerPermittedIdentifiers
com.docmoonlight.app.fetch-updates
CFBundleDevelopmentRegion
en
CFBundleDisplayName
Docmoonlight
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
APPL
CFBundleShortVersionString
$(MARKETING_VERSION)
CFBundleSignature
????
CFBundleVersion
$(CURRENT_PROJECT_VERSION)
LSRequiresIPhoneOS
NSAppTransportSecurity
NSExceptionDomains
localhost
NSExceptionAllowsInsecureHTTPLoads
NSBluetoothPeripheralUsageDescription
We will use your Bluetooth to access your Bluetooth headphones.
NSCameraUsageDescription
For people to see you during meetings, we need access to your camera.
NSDocumentsFolderUsageDescription
Docmoonlight's app requires access to your Documents Folder to allow you to upload necessary documents and files, such as proof of medical licensing or certifications, during the registration process
NSLocationWhenInUseUsageDescription
Docmoonlight's app requires access to your location while in use to provide accurate clock-in and clock-out times for payment purposes.
NSMicrophoneUsageDescription
For people to hear you during meetings, we need access to your microphone.
NSPhotoLibraryUsageDescription
Docmoonlight's app requires access to your Photo Library and file storage to allow you to upload necessary documents and files, such as proof of medical licensing or certifications, during the registration process
UIAppFonts
Poppins-Medium.ttf
Poppins-Regular.ttf
Poppins-SemiBold.ttf
AntDesign.ttf
Entypo.ttf
EvilIcons.ttf
Feather.ttf
FontAwesome.ttf
FontAwesome5_Brands.ttf
FontAwesome5_Regular.ttf
FontAwesome5_Solid.ttf
Foundation.ttf
Ionicons.ttf
MaterialIcons.ttf
MaterialCommunityIcons.ttf
SimpleLineIcons.ttf
Octicons.ttf
Zocial.ttf
FontAwesome6_Regular.ttf
FontAwesome6_Solid.ttf
FontAwesome6_Brands.ttf
UIBackgroundModes
audio
fetch
remote-notification
voip
UILaunchStoryboardName
LaunchScreen
UIRequiredDeviceCapabilities
armv7
UISupportedInterfaceOrientations
UIInterfaceOrientationPortrait
UISupportedInterfaceOrientations~ipad
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
UIInterfaceOrientationPortrait
UIViewControllerBasedStatusBarAppearance
Я использую библиотеку реагирования-native-callkeep в проекте React Native для обработки отображения входящих вызовов при получении уведомления от Firebase. Библиотека работает отлично, когда приложение активно, но не может отображать входящие вызовы или разбудить приложение, когда оно находится в фоновом режиме или завершено на iOS. PS: уведомление Firebase работает нормально для обоих Android и ios Вот соответствующая часть моего кода: AppDelegate.m: [code]#import "AppDelegate.h" #import "Adjust.h" #import "Firebase.h" #import #import #import "FirebaseCore.h" #import #import #import "RNCallKeep.h" #import #import #import "RNVoipPushNotificationManager.h" #import
CallKeep.setup(options).then(() => {}); CallKeep.setAvailable(true); [/code] это код, используемый для обработки вызовов дисплея или обычных уведомлений [code]async function onMessageReceived(remoteMessage) { if (remoteMessage.data?.type === 'video_call') { const callUUID = uuidv4();
linkage = ENV['USE_FRAMEWORKS'] if linkage != nil Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green use_frameworks! :linkage => linkage.to_sym end
target 'DocMoonlight' do config = use_native_modules!
pod 'Firebase', :modular_headers => true pod 'FirebaseCoreInternal', :modular_headers => true pod 'GoogleUtilities', :modular_headers => true pod 'FirebaseCore', :modular_headers => true
pod 'RNPermissions', :path => '../node_modules/react-native-permissions' permissions_path = '../node_modules/react-native-permissions/ios' pod 'FirebaseInstallations', :modular_headers => true pod 'FirebaseCoreExtension', :modular_headers => true pod 'GoogleDataTransport', :modular_headers => true pod 'nanopb', :modular_headers => true pod 'RNCallKeep', :path => '../node_modules/react-native-callkeep'
# Flags change depending on the env values. flags = get_default_flags()
NSBluetoothPeripheralUsageDescription We will use your Bluetooth to access your Bluetooth headphones. NSCameraUsageDescription For people to see you during meetings, we need access to your camera. NSDocumentsFolderUsageDescription Docmoonlight's app requires access to your Documents Folder to allow you to upload necessary documents and files, such as proof of medical licensing or certifications, during the registration process NSLocationWhenInUseUsageDescription Docmoonlight's app requires access to your location while in use to provide accurate clock-in and clock-out times for payment purposes. NSMicrophoneUsageDescription For people to hear you during meetings, we need access to your microphone. NSPhotoLibraryUsageDescription Docmoonlight's app requires access to your Photo Library and file storage to allow you to upload necessary documents and files, such as proof of medical licensing or certifications, during the registration process UIAppFonts