@stream-io/video-react-native-sdk 1.29.1-beta.0 → 1.29.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3133 -0
- package/android/src/main/AndroidManifest.xml +1 -8
- package/android/src/main/AndroidManifestNew.xml +0 -11
- package/android/src/main/java/com/streamvideo/reactnative/StreamVideoReactNativeModule.kt +5 -42
- package/android/src/main/java/com/streamvideo/reactnative/audio/utils/WebRtcAudioUtils.kt +6 -70
- package/android/src/main/java/com/streamvideo/reactnative/callmanager/StreamInCallManagerModule.kt +4 -6
- package/android/src/main/java/com/streamvideo/reactnative/util/CallAliveServiceChecker.kt +95 -0
- package/dist/commonjs/hooks/push/index.js +2 -0
- package/dist/commonjs/hooks/push/index.js.map +1 -1
- package/dist/commonjs/hooks/push/useIosCallkeepWithCallingStateEffect.js +160 -0
- package/dist/commonjs/hooks/push/useIosCallkeepWithCallingStateEffect.js.map +1 -0
- package/dist/commonjs/hooks/push/useIosVoipPushEventsSetupEffect.js +31 -18
- package/dist/commonjs/hooks/push/useIosVoipPushEventsSetupEffect.js.map +1 -1
- package/dist/commonjs/hooks/push/useProcessPushCallEffect.js +67 -0
- package/dist/commonjs/hooks/push/useProcessPushCallEffect.js.map +1 -0
- package/dist/commonjs/hooks/useAndroidKeepCallAliveEffect.js +97 -64
- package/dist/commonjs/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
- package/dist/commonjs/index.js +0 -1
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/modules/call-manager/CallManager.js +0 -26
- package/dist/commonjs/modules/call-manager/CallManager.js.map +1 -1
- package/dist/commonjs/providers/StreamCall/index.js +6 -6
- package/dist/commonjs/providers/StreamCall/index.js.map +1 -1
- package/dist/commonjs/utils/StreamVideoRN/index.js +21 -33
- package/dist/commonjs/utils/StreamVideoRN/index.js.map +1 -1
- package/dist/commonjs/utils/internal/registerSDKGlobals.js +3 -52
- package/dist/commonjs/utils/internal/registerSDKGlobals.js.map +1 -1
- package/dist/commonjs/utils/push/android.js +202 -155
- package/dist/commonjs/utils/push/android.js.map +1 -1
- package/dist/commonjs/utils/push/internal/ios.js +34 -17
- package/dist/commonjs/utils/push/internal/ios.js.map +1 -1
- package/dist/commonjs/utils/push/internal/rxSubjects.js +45 -1
- package/dist/commonjs/utils/push/internal/rxSubjects.js.map +1 -1
- package/dist/commonjs/utils/push/internal/utils.js +20 -32
- package/dist/commonjs/utils/push/internal/utils.js.map +1 -1
- package/dist/commonjs/utils/push/ios.js.map +1 -1
- package/dist/commonjs/utils/push/libs/callkeep.js +17 -0
- package/dist/commonjs/utils/push/libs/callkeep.js.map +1 -0
- package/dist/commonjs/utils/push/libs/index.js +19 -8
- package/dist/commonjs/utils/push/libs/index.js.map +1 -1
- package/dist/commonjs/utils/push/libs/notifee/index.js +19 -0
- package/dist/commonjs/utils/push/libs/notifee/index.js.map +1 -1
- package/dist/commonjs/utils/push/libs/voipPushNotification.js +17 -0
- package/dist/commonjs/utils/push/libs/voipPushNotification.js.map +1 -0
- package/dist/commonjs/utils/push/setupIosCallKeepEvents.js +205 -0
- package/dist/commonjs/utils/push/setupIosCallKeepEvents.js.map +1 -0
- package/dist/commonjs/utils/push/setupIosVoipPushEvents.js +6 -7
- package/dist/commonjs/utils/push/setupIosVoipPushEvents.js.map +1 -1
- package/dist/commonjs/version.js +1 -1
- package/dist/commonjs/version.js.map +1 -1
- package/dist/module/hooks/push/index.js +2 -0
- package/dist/module/hooks/push/index.js.map +1 -1
- package/dist/module/hooks/push/useIosCallkeepWithCallingStateEffect.js +153 -0
- package/dist/module/hooks/push/useIosCallkeepWithCallingStateEffect.js.map +1 -0
- package/dist/module/hooks/push/useIosVoipPushEventsSetupEffect.js +31 -18
- package/dist/module/hooks/push/useIosVoipPushEventsSetupEffect.js.map +1 -1
- package/dist/module/hooks/push/useProcessPushCallEffect.js +60 -0
- package/dist/module/hooks/push/useProcessPushCallEffect.js.map +1 -0
- package/dist/module/hooks/useAndroidKeepCallAliveEffect.js +99 -66
- package/dist/module/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
- package/dist/module/index.js +0 -1
- package/dist/module/index.js.map +1 -1
- package/dist/module/modules/call-manager/CallManager.js +0 -26
- package/dist/module/modules/call-manager/CallManager.js.map +1 -1
- package/dist/module/providers/StreamCall/index.js +6 -6
- package/dist/module/providers/StreamCall/index.js.map +1 -1
- package/dist/module/utils/StreamVideoRN/index.js +21 -33
- package/dist/module/utils/StreamVideoRN/index.js.map +1 -1
- package/dist/module/utils/internal/registerSDKGlobals.js +3 -52
- package/dist/module/utils/internal/registerSDKGlobals.js.map +1 -1
- package/dist/module/utils/push/android.js +204 -157
- package/dist/module/utils/push/android.js.map +1 -1
- package/dist/module/utils/push/internal/ios.js +34 -17
- package/dist/module/utils/push/internal/ios.js.map +1 -1
- package/dist/module/utils/push/internal/rxSubjects.js +44 -0
- package/dist/module/utils/push/internal/rxSubjects.js.map +1 -1
- package/dist/module/utils/push/internal/utils.js +19 -29
- package/dist/module/utils/push/internal/utils.js.map +1 -1
- package/dist/module/utils/push/ios.js.map +1 -1
- package/dist/module/utils/push/libs/callkeep.js +11 -0
- package/dist/module/utils/push/libs/callkeep.js.map +1 -0
- package/dist/module/utils/push/libs/index.js +2 -1
- package/dist/module/utils/push/libs/index.js.map +1 -1
- package/dist/module/utils/push/libs/notifee/index.js +18 -0
- package/dist/module/utils/push/libs/notifee/index.js.map +1 -1
- package/dist/module/utils/push/libs/voipPushNotification.js +11 -0
- package/dist/module/utils/push/libs/voipPushNotification.js.map +1 -0
- package/dist/module/utils/push/setupIosCallKeepEvents.js +199 -0
- package/dist/module/utils/push/setupIosCallKeepEvents.js.map +1 -0
- package/dist/module/utils/push/setupIosVoipPushEvents.js +6 -7
- package/dist/module/utils/push/setupIosVoipPushEvents.js.map +1 -1
- package/dist/module/version.js +1 -1
- package/dist/module/version.js.map +1 -1
- package/dist/typescript/hooks/push/index.d.ts.map +1 -1
- package/dist/typescript/hooks/push/useIosCallkeepWithCallingStateEffect.d.ts +5 -0
- package/dist/typescript/hooks/push/useIosCallkeepWithCallingStateEffect.d.ts.map +1 -0
- package/dist/typescript/hooks/push/useIosVoipPushEventsSetupEffect.d.ts.map +1 -1
- package/dist/typescript/hooks/push/useProcessPushCallEffect.d.ts +8 -0
- package/dist/typescript/hooks/push/useProcessPushCallEffect.d.ts.map +1 -0
- package/dist/typescript/hooks/useAndroidKeepCallAliveEffect.d.ts.map +1 -1
- package/dist/typescript/index.d.ts +0 -1
- package/dist/typescript/index.d.ts.map +1 -1
- package/dist/typescript/modules/call-manager/CallManager.d.ts +0 -5
- package/dist/typescript/modules/call-manager/CallManager.d.ts.map +1 -1
- package/dist/typescript/utils/StreamVideoRN/index.d.ts +2 -20
- package/dist/typescript/utils/StreamVideoRN/index.d.ts.map +1 -1
- package/dist/typescript/utils/StreamVideoRN/types.d.ts +29 -54
- package/dist/typescript/utils/StreamVideoRN/types.d.ts.map +1 -1
- package/dist/typescript/utils/internal/registerSDKGlobals.d.ts.map +1 -1
- package/dist/typescript/utils/push/android.d.ts +2 -1
- package/dist/typescript/utils/push/android.d.ts.map +1 -1
- package/dist/typescript/utils/push/internal/ios.d.ts.map +1 -1
- package/dist/typescript/utils/push/internal/rxSubjects.d.ts +33 -0
- package/dist/typescript/utils/push/internal/rxSubjects.d.ts.map +1 -1
- package/dist/typescript/utils/push/internal/utils.d.ts +1 -8
- package/dist/typescript/utils/push/internal/utils.d.ts.map +1 -1
- package/dist/typescript/utils/push/ios.d.ts +2 -1
- package/dist/typescript/utils/push/ios.d.ts.map +1 -1
- package/dist/typescript/utils/push/libs/callkeep.d.ts +3 -0
- package/dist/typescript/utils/push/libs/callkeep.d.ts.map +1 -0
- package/dist/typescript/utils/push/libs/firebaseMessaging/index.d.ts +2 -16
- package/dist/typescript/utils/push/libs/firebaseMessaging/index.d.ts.map +1 -1
- package/dist/typescript/utils/push/libs/index.d.ts +2 -1
- package/dist/typescript/utils/push/libs/index.d.ts.map +1 -1
- package/dist/typescript/utils/push/libs/notifee/index.d.ts +1 -0
- package/dist/typescript/utils/push/libs/notifee/index.d.ts.map +1 -1
- package/dist/typescript/utils/push/libs/voipPushNotification.d.ts +3 -0
- package/dist/typescript/utils/push/libs/voipPushNotification.d.ts.map +1 -0
- package/dist/typescript/utils/push/setupIosCallKeepEvents.d.ts +6 -0
- package/dist/typescript/utils/push/setupIosCallKeepEvents.d.ts.map +1 -0
- package/dist/typescript/utils/push/setupIosVoipPushEvents.d.ts.map +1 -1
- package/dist/typescript/version.d.ts +1 -1
- package/dist/typescript/version.d.ts.map +1 -1
- package/expo-config-plugin/dist/withAndroidManifest.js +33 -1
- package/expo-config-plugin/dist/withAndroidPermissions.js +7 -2
- package/expo-config-plugin/dist/withAppDelegate.js +197 -19
- package/expo-config-plugin/dist/withMainActivity.js +1 -1
- package/expo-config-plugin/dist/withiOSInfoPlist.js +3 -2
- package/ios/StreamInCallManager.m +0 -2
- package/ios/StreamInCallManager.swift +7 -19
- package/ios/StreamVideoReactNative.h +4 -7
- package/ios/StreamVideoReactNative.m +82 -189
- package/package.json +19 -14
- package/src/hooks/push/index.ts +2 -0
- package/src/hooks/push/useIosCallkeepWithCallingStateEffect.ts +235 -0
- package/src/hooks/push/useIosVoipPushEventsSetupEffect.ts +34 -21
- package/src/hooks/push/useProcessPushCallEffect.ts +108 -0
- package/src/hooks/useAndroidKeepCallAliveEffect.ts +120 -94
- package/src/index.ts +0 -1
- package/src/modules/call-manager/CallManager.ts +0 -36
- package/src/modules/call-manager/native-module.d.ts +0 -7
- package/src/providers/StreamCall/index.tsx +6 -6
- package/src/utils/StreamVideoRN/index.ts +30 -40
- package/src/utils/StreamVideoRN/types.ts +29 -56
- package/src/utils/internal/registerSDKGlobals.ts +4 -47
- package/src/utils/push/android.ts +309 -231
- package/src/utils/push/internal/ios.ts +44 -28
- package/src/utils/push/internal/rxSubjects.ts +61 -0
- package/src/utils/push/internal/utils.ts +26 -45
- package/src/utils/push/ios.ts +6 -1
- package/src/utils/push/libs/callkeep.ts +16 -0
- package/src/utils/push/libs/index.ts +2 -1
- package/src/utils/push/libs/notifee/index.ts +27 -0
- package/src/utils/push/libs/voipPushNotification.ts +17 -0
- package/src/utils/push/setupIosCallKeepEvents.ts +252 -0
- package/src/utils/push/setupIosVoipPushEvents.ts +7 -11
- package/src/version.ts +1 -1
- package/android/src/main/java/com/streamvideo/reactnative/keepalive/KeepAliveNotification.kt +0 -83
- package/android/src/main/java/com/streamvideo/reactnative/keepalive/StreamCallKeepAliveHeadlessService.kt +0 -149
- package/dist/commonjs/hooks/push/useCallingExpWithCallingStateEffect.js +0 -121
- package/dist/commonjs/hooks/push/useCallingExpWithCallingStateEffect.js.map +0 -1
- package/dist/commonjs/utils/internal/callingx/audioSessionPromise.js +0 -58
- package/dist/commonjs/utils/internal/callingx/audioSessionPromise.js.map +0 -1
- package/dist/commonjs/utils/internal/callingx/callingx.js +0 -109
- package/dist/commonjs/utils/internal/callingx/callingx.js.map +0 -1
- package/dist/commonjs/utils/keepCallAliveHeadlessTask.js +0 -48
- package/dist/commonjs/utils/keepCallAliveHeadlessTask.js.map +0 -1
- package/dist/commonjs/utils/push/libs/callingx.js +0 -75
- package/dist/commonjs/utils/push/libs/callingx.js.map +0 -1
- package/dist/commonjs/utils/push/setupCallingExpEvents.js +0 -108
- package/dist/commonjs/utils/push/setupCallingExpEvents.js.map +0 -1
- package/dist/module/hooks/push/useCallingExpWithCallingStateEffect.js +0 -114
- package/dist/module/hooks/push/useCallingExpWithCallingStateEffect.js.map +0 -1
- package/dist/module/utils/internal/callingx/audioSessionPromise.js +0 -51
- package/dist/module/utils/internal/callingx/audioSessionPromise.js.map +0 -1
- package/dist/module/utils/internal/callingx/callingx.js +0 -100
- package/dist/module/utils/internal/callingx/callingx.js.map +0 -1
- package/dist/module/utils/keepCallAliveHeadlessTask.js +0 -42
- package/dist/module/utils/keepCallAliveHeadlessTask.js.map +0 -1
- package/dist/module/utils/push/libs/callingx.js +0 -67
- package/dist/module/utils/push/libs/callingx.js.map +0 -1
- package/dist/module/utils/push/setupCallingExpEvents.js +0 -102
- package/dist/module/utils/push/setupCallingExpEvents.js.map +0 -1
- package/dist/typescript/hooks/push/useCallingExpWithCallingStateEffect.d.ts +0 -5
- package/dist/typescript/hooks/push/useCallingExpWithCallingStateEffect.d.ts.map +0 -1
- package/dist/typescript/utils/internal/callingx/audioSessionPromise.d.ts +0 -16
- package/dist/typescript/utils/internal/callingx/audioSessionPromise.d.ts.map +0 -1
- package/dist/typescript/utils/internal/callingx/callingx.d.ts +0 -13
- package/dist/typescript/utils/internal/callingx/callingx.d.ts.map +0 -1
- package/dist/typescript/utils/keepCallAliveHeadlessTask.d.ts +0 -10
- package/dist/typescript/utils/keepCallAliveHeadlessTask.d.ts.map +0 -1
- package/dist/typescript/utils/push/libs/callingx.d.ts +0 -9
- package/dist/typescript/utils/push/libs/callingx.d.ts.map +0 -1
- package/dist/typescript/utils/push/setupCallingExpEvents.d.ts +0 -8
- package/dist/typescript/utils/push/setupCallingExpEvents.d.ts.map +0 -1
- package/src/hooks/push/useCallingExpWithCallingStateEffect.ts +0 -147
- package/src/utils/internal/callingx/audioSessionPromise.ts +0 -53
- package/src/utils/internal/callingx/callingx.ts +0 -146
- package/src/utils/keepCallAliveHeadlessTask.ts +0 -54
- package/src/utils/push/libs/callingx.ts +0 -90
- package/src/utils/push/setupCallingExpEvents.ts +0 -130
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/utils/push/internal/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EAEJ,iBAAiB,EAElB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/utils/push/internal/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EAEJ,iBAAiB,EAElB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AAInC,KAAK,UAAU,GAAG,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;AAEzD,KAAK,4BAA4B,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAEzD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAC5B,cAAc,IAAI,EAClB,eAAe,MAAM,GAAG,SAAS,EACjC,aAAa,MAAM,GAAG,SAAS;;;CAwChC,CAAC;AAMF,eAAO,MAAM,+BAA+B,GAC1C,YAAY,UAAU,EACtB,UAAU,MAAM,EAChB,QAAQ,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAAC,kBAiBlD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,GAC9B,QAAQ,iBAAiB,EACzB,UAAU,MAAM,EAChB,QAAQ,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,qBAAqB,EAChE,YAAY,UAAU,kBAoCvB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B,GACzC,QAAQ,iBAAiB,EACzB,UAAU,MAAM,EAChB,4BAA4B,mBAAmB,kBAqBhD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,6BAA6B,GAAI,UAAU,MAAM,SAM7D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,EAAE,4BAE1C,CAAC"}
|
|
@@ -4,8 +4,9 @@ import { StreamVideoClient } from '@stream-io/video-client';
|
|
|
4
4
|
import type { Event } from '@notifee/react-native';
|
|
5
5
|
type PushConfig = NonNullable<StreamVideoConfig['push']>;
|
|
6
6
|
export declare const oniOSExpoNotificationEvent: (event: ExpoNotification) => void;
|
|
7
|
-
export declare const oniOSNotifeeEvent: ({ event }: {
|
|
7
|
+
export declare const oniOSNotifeeEvent: ({ event, }: {
|
|
8
8
|
event: Event;
|
|
9
|
+
isBackground: boolean;
|
|
9
10
|
}) => void;
|
|
10
11
|
export declare function onPushNotificationiOSStreamVideoEvent(notification: PushNotificationiOSType): void;
|
|
11
12
|
/** Send token to stream */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ios.d.ts","sourceRoot":"","sources":["../../../../src/utils/push/ios.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,OAAO,EACL,KAAK,gBAAgB,EAIrB,KAAK,uBAAuB,EAC7B,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,iBAAiB,EAAqB,MAAM,yBAAyB,CAAC;AAE/E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAInD,KAAK,UAAU,GAAG,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;AAuBzD,eAAO,MAAM,0BAA0B,GAAI,OAAO,gBAAgB,SAuBjE,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,
|
|
1
|
+
{"version":3,"file":"ios.d.ts","sourceRoot":"","sources":["../../../../src/utils/push/ios.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,OAAO,EACL,KAAK,gBAAgB,EAIrB,KAAK,uBAAuB,EAC7B,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,iBAAiB,EAAqB,MAAM,yBAAyB,CAAC;AAE/E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAInD,KAAK,UAAU,GAAG,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;AAuBzD,eAAO,MAAM,0BAA0B,GAAI,OAAO,gBAAgB,SAuBjE,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,YAE/B;IACD,KAAK,EAAE,KAAK,CAAC;IACb,YAAY,EAAE,OAAO,CAAC;CACvB,SAkBA,CAAC;AAEF,wBAAgB,qCAAqC,CACnD,YAAY,EAAE,uBAAuB,QAkCtC;AAED,2BAA2B;AAC3B,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,iBAAiB,EACzB,UAAU,EAAE,UAAU,EACtB,sBAAsB,EAAE,CAAC,WAAW,EAAE,MAAM,IAAI,KAAK,IAAI,iBAiF1D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"callkeep.d.ts","sourceRoot":"","sources":["../../../../../src/utils/push/libs/callkeep.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,cAAc,uBAAuB,EAAE,OAAO,CAAC;AAQ5E,wBAAgB,cAAc,mDAO7B"}
|
|
@@ -1,20 +1,6 @@
|
|
|
1
1
|
import { type Type } from './lib';
|
|
2
2
|
export type { FirebaseMessagingTypes } from '@react-native-firebase/messaging';
|
|
3
3
|
export type FirebaseMessagingType = Type;
|
|
4
|
-
export declare function getFirebaseMessagingLib():
|
|
5
|
-
|
|
6
|
-
readonly SDK_VERSION: string;
|
|
7
|
-
} & import("@react-native-firebase/messaging/dist/typescript/commonjs/lib/types/messaging").Statics & {
|
|
8
|
-
messaging: import("@react-native-firebase/app").ReactNativeFirebase.FirebaseModuleWithStaticsAndApp<import("@react-native-firebase/messaging").Messaging, import("@react-native-firebase/messaging/dist/typescript/commonjs/lib/types/messaging").Statics>;
|
|
9
|
-
firebase: import("@react-native-firebase/app").ReactNativeFirebase.Module;
|
|
10
|
-
app(name?: string): import("@react-native-firebase/app").ReactNativeFirebase.FirebaseApp;
|
|
11
|
-
};
|
|
12
|
-
export declare function getFirebaseMessagingLibNoThrow(isExpo: boolean): ({
|
|
13
|
-
(app?: import("@react-native-firebase/app").ReactNativeFirebase.FirebaseApp): import("@react-native-firebase/messaging").Messaging;
|
|
14
|
-
readonly SDK_VERSION: string;
|
|
15
|
-
} & import("@react-native-firebase/messaging/dist/typescript/commonjs/lib/types/messaging").Statics & {
|
|
16
|
-
messaging: import("@react-native-firebase/app").ReactNativeFirebase.FirebaseModuleWithStaticsAndApp<import("@react-native-firebase/messaging").Messaging, import("@react-native-firebase/messaging/dist/typescript/commonjs/lib/types/messaging").Statics>;
|
|
17
|
-
firebase: import("@react-native-firebase/app").ReactNativeFirebase.Module;
|
|
18
|
-
app(name?: string): import("@react-native-firebase/app").ReactNativeFirebase.FirebaseApp;
|
|
19
|
-
}) | undefined;
|
|
4
|
+
export declare function getFirebaseMessagingLib(): import("@react-native-firebase/app").ReactNativeFirebase.FirebaseModuleWithStatics<import("@react-native-firebase/messaging").FirebaseMessagingTypes.Module, import("@react-native-firebase/messaging").FirebaseMessagingTypes.Statics>;
|
|
5
|
+
export declare function getFirebaseMessagingLibNoThrow(isExpo: boolean): import("@react-native-firebase/app").ReactNativeFirebase.FirebaseModuleWithStatics<import("@react-native-firebase/messaging").FirebaseMessagingTypes.Module, import("@react-native-firebase/messaging").FirebaseMessagingTypes.Statics> | undefined;
|
|
20
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/utils/push/libs/firebaseMessaging/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,IAAI,EAAE,MAAM,OAAO,CAAC;AAGvC,YAAY,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC/E,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAKzC,wBAAgB,uBAAuB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/utils/push/libs/firebaseMessaging/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,IAAI,EAAE,MAAM,OAAO,CAAC;AAGvC,YAAY,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC/E,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAKzC,wBAAgB,uBAAuB,4OAQtC;AAED,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,OAAO,uPAc7D"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './expoNotifications';
|
|
2
2
|
export * from './firebaseMessaging';
|
|
3
3
|
export * from './iosPushNotification';
|
|
4
|
+
export * from './voipPushNotification';
|
|
5
|
+
export * from './callkeep';
|
|
4
6
|
export * from './notifee';
|
|
5
|
-
export * from './callingx';
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/utils/push/libs/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/utils/push/libs/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
|
|
@@ -19,6 +19,7 @@ declare enum AndroidForegroundServiceType {
|
|
|
19
19
|
}
|
|
20
20
|
export declare function getNotifeeLibThrowIfNotInstalledForPush(): typeof import("@notifee/react-native");
|
|
21
21
|
export declare function getNotifeeLibNoThrowForKeepCallAlive(): typeof import("@notifee/react-native") | undefined;
|
|
22
|
+
export declare function getKeepCallAliveForegroundServiceTypes(): Promise<AndroidForegroundServiceType[]>;
|
|
22
23
|
export declare function getIncomingCallForegroundServiceTypes(): AndroidForegroundServiceType[];
|
|
23
24
|
export {};
|
|
24
25
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/utils/push/libs/notifee/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/utils/push/libs/notifee/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,IAAI,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC;AAE9B,aAAK,4BAA4B;IAC/B,8BAA8B,KAAK;IACnC,wCAAwC,KAAK;IAC7C,iCAAiC,IAAI;IACrC,8BAA8B,MAAM;IACpC,gCAAgC,IAAI;IACpC,sCAAsC,IAAI;IAC1C,wCAAwC,KAAK;IAC7C,wCAAwC,OAAO;IAC/C,kCAAkC,MAAM;IACxC,kCAAkC,IAAI;IACtC,wCAAwC,MAAM;IAC9C,qCAAqC,OAAO;IAC5C,mCAAmC,aAAa;IAChD,uCAAuC,OAAO;IAC9C,gCAAgC,KAAK;CACtC;AAKD,wBAAgB,uCAAuC,2CAQtD;AAED,wBAAgB,oCAAoC,uDAQnD;AAED,wBAAsB,sCAAsC,4CAiB3D;AAED,wBAAgB,qCAAqC,mCAKpD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voipPushNotification.d.ts","sourceRoot":"","sources":["../../../../../src/utils/push/libs/voipPushNotification.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,wBAAwB,GAClC,cAAc,qCAAqC,EAAE,OAAO,CAAC;AAQ/D,wBAAgB,0BAA0B,iEAOzC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { StreamVideoConfig } from '../StreamVideoRN/types';
|
|
2
|
+
/**
|
|
3
|
+
* This hook is used to listen to callkeep events and do the necessary actions
|
|
4
|
+
*/
|
|
5
|
+
export declare function setupIosCallKeepEvents(pushConfig: NonNullable<StreamVideoConfig['push']>): void;
|
|
6
|
+
//# sourceMappingURL=setupIosCallKeepEvents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setupIosCallKeepEvents.d.ts","sourceRoot":"","sources":["../../../../src/utils/push/setupIosCallKeepEvents.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAWhE;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,QA4KnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setupIosVoipPushEvents.d.ts","sourceRoot":"","sources":["../../../../src/utils/push/setupIosVoipPushEvents.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"setupIosVoipPushEvents.d.ts","sourceRoot":"","sources":["../../../../src/utils/push/setupIosVoipPushEvents.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAG3D,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,QAyBnD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "1.29.
|
|
1
|
+
export declare const version = "1.29.2";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAC"}
|
|
@@ -1,10 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const config_plugins_1 = require("@expo/config-plugins");
|
|
4
|
-
const { getMainActivityOrThrow } = config_plugins_1.AndroidConfig.Manifest;
|
|
4
|
+
const { prefixAndroidKeys, getMainApplicationOrThrow, getMainActivityOrThrow, ensureToolsAvailable, } = config_plugins_1.AndroidConfig.Manifest;
|
|
5
|
+
function getNotifeeService(isKeepCallAliveEnabled = false) {
|
|
6
|
+
/* We add this service to the AndroidManifest.xml:
|
|
7
|
+
<service
|
|
8
|
+
android:name="app.notifee.core.ForegroundService"
|
|
9
|
+
android:stopWithTask="true"
|
|
10
|
+
android:foregroundServiceType="shortService" />
|
|
11
|
+
*/
|
|
12
|
+
let foregroundServiceType = 'shortService';
|
|
13
|
+
if (isKeepCallAliveEnabled) {
|
|
14
|
+
foregroundServiceType =
|
|
15
|
+
'mediaPlayback|camera|microphone|' + foregroundServiceType;
|
|
16
|
+
}
|
|
17
|
+
let head = prefixAndroidKeys({
|
|
18
|
+
name: 'app.notifee.core.ForegroundService',
|
|
19
|
+
stopWithTask: 'true',
|
|
20
|
+
foregroundServiceType,
|
|
21
|
+
});
|
|
22
|
+
head = { ...head, 'tools:replace': 'android:foregroundServiceType' };
|
|
23
|
+
return {
|
|
24
|
+
$: head,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
5
27
|
const withStreamVideoReactNativeSDKManifest = (configuration, props) => {
|
|
6
28
|
return (0, config_plugins_1.withAndroidManifest)(configuration, (config) => {
|
|
7
29
|
const androidManifest = config.modResults;
|
|
30
|
+
const mainApplication = getMainApplicationOrThrow(androidManifest);
|
|
31
|
+
if (props?.ringingPushNotifications || props?.androidKeepCallAlive) {
|
|
32
|
+
ensureToolsAvailable(androidManifest);
|
|
33
|
+
/* Add the notifee foreground Service */
|
|
34
|
+
let services = mainApplication.service ?? [];
|
|
35
|
+
// we filter out the existing notifee service (if any) so that we can override it
|
|
36
|
+
services = services.filter((service) => service.$['android:name'] !== 'app.notifee.core.ForegroundService');
|
|
37
|
+
services.push(getNotifeeService(!!props?.androidKeepCallAlive));
|
|
38
|
+
mainApplication.service = services;
|
|
39
|
+
}
|
|
8
40
|
if (props?.androidPictureInPicture) {
|
|
9
41
|
const mainActivity = getMainActivityOrThrow(androidManifest);
|
|
10
42
|
const currentConfigChangesArray = mainActivity.$['android:configChanges']
|
|
@@ -8,15 +8,20 @@ const withStreamVideoReactNativeSDKAndroidPermissions = (configuration, props) =
|
|
|
8
8
|
'android.permission.BLUETOOTH_ADMIN',
|
|
9
9
|
'android.permission.WAKE_LOCK',
|
|
10
10
|
];
|
|
11
|
-
if (props?.androidKeepCallAlive ||
|
|
11
|
+
if (props?.androidKeepCallAlive ||
|
|
12
|
+
props?.ringingPushNotifications ||
|
|
13
|
+
props?.enableScreenshare) {
|
|
12
14
|
permissions.push('android.permission.POST_NOTIFICATIONS', 'android.permission.FOREGROUND_SERVICE');
|
|
13
15
|
if (props?.enableScreenshare) {
|
|
14
16
|
permissions.push('android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION');
|
|
15
17
|
}
|
|
16
18
|
}
|
|
17
|
-
if (props?.androidKeepCallAlive) {
|
|
19
|
+
if (props?.androidKeepCallAlive || props?.ringingPushNotifications) {
|
|
18
20
|
permissions.push('android.permission.FOREGROUND_SERVICE_CAMERA', 'android.permission.FOREGROUND_SERVICE_MICROPHONE', 'android.permission.FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK');
|
|
19
21
|
}
|
|
22
|
+
if (props?.ringingPushNotifications?.showWhenLockedAndroid) {
|
|
23
|
+
permissions.push('android.permission.USE_FULL_SCREEN_INTENT');
|
|
24
|
+
}
|
|
20
25
|
const config = config_plugins_1.AndroidConfig.Permissions.withPermissions(configuration, permissions);
|
|
21
26
|
return config;
|
|
22
27
|
};
|
|
@@ -9,7 +9,7 @@ const addNewLinesToAppDelegateObjc_1 = __importDefault(require("./common/addNewL
|
|
|
9
9
|
const addToSwiftBridgingHeaderFile_1 = require("./common/addToSwiftBridgingHeaderFile");
|
|
10
10
|
const withAppDelegate = (configuration, props) => {
|
|
11
11
|
return (0, config_plugins_1.withAppDelegate)(configuration, (config) => {
|
|
12
|
-
if (!props?.
|
|
12
|
+
if (!props?.ringingPushNotifications &&
|
|
13
13
|
!props?.iOSEnableMultitaskingCameraAccess &&
|
|
14
14
|
!props?.addNoiseCancellation) {
|
|
15
15
|
// quit early if no change is necessary
|
|
@@ -21,12 +21,19 @@ const withAppDelegate = (configuration, props) => {
|
|
|
21
21
|
config.modResults.contents = (0, codeMod_1.addObjcImports)(config.modResults.contents, ['"NoiseCancellationManagerObjc.h"']);
|
|
22
22
|
}
|
|
23
23
|
config.modResults.contents = addDidFinishLaunchingWithOptionsObjc(config.modResults.contents, props.iOSEnableMultitaskingCameraAccess, props.addNoiseCancellation);
|
|
24
|
-
if (props?.
|
|
25
|
-
config.modResults.contents = (0, codeMod_1.addObjcImports)(config.modResults.contents, [
|
|
24
|
+
if (props?.ringingPushNotifications) {
|
|
25
|
+
config.modResults.contents = (0, codeMod_1.addObjcImports)(config.modResults.contents, [
|
|
26
|
+
'"RNCallKeep.h"',
|
|
27
|
+
'<PushKit/PushKit.h>',
|
|
28
|
+
'"RNVoipPushNotificationManager.h"',
|
|
29
|
+
'"StreamVideoReactNative.h"',
|
|
30
|
+
'<WebRTC/RTCAudioSession.h>',
|
|
31
|
+
]);
|
|
26
32
|
config.modResults.contents =
|
|
27
|
-
addDidFinishLaunchingWithOptionsRingingObjc(config.modResults.contents);
|
|
33
|
+
addDidFinishLaunchingWithOptionsRingingObjc(config.modResults.contents, props.ringingPushNotifications);
|
|
28
34
|
config.modResults.contents = addDidUpdatePushCredentialsObjc(config.modResults.contents);
|
|
29
35
|
config.modResults.contents = addDidReceiveIncomingPushCallbackObjc(config.modResults.contents);
|
|
36
|
+
config.modResults.contents = addAudioSessionMethodsObjc(config.modResults.contents);
|
|
30
37
|
}
|
|
31
38
|
return config;
|
|
32
39
|
}
|
|
@@ -36,7 +43,7 @@ const withAppDelegate = (configuration, props) => {
|
|
|
36
43
|
}
|
|
37
44
|
else {
|
|
38
45
|
try {
|
|
39
|
-
if (props?.
|
|
46
|
+
if (props?.ringingPushNotifications) {
|
|
40
47
|
// make it public class AppDelegate: ExpoAppDelegate, PKPushRegistryDelegate {
|
|
41
48
|
const regex = /(class\s+AppDelegate[^{]*)(\s*\{)/;
|
|
42
49
|
config.modResults.contents = config.modResults.contents.replace(regex, (match, declarationPart, openBrace) => {
|
|
@@ -69,12 +76,13 @@ const withAppDelegate = (configuration, props) => {
|
|
|
69
76
|
config.modResults.contents = (0, codeMod_1.addSwiftImports)(config.modResults.contents, ['stream_io_noise_cancellation_react_native']);
|
|
70
77
|
}
|
|
71
78
|
config.modResults.contents = addDidFinishLaunchingWithOptionsSwift(config.modResults.contents, props.iOSEnableMultitaskingCameraAccess, props.addNoiseCancellation);
|
|
72
|
-
if (props?.
|
|
73
|
-
config.modResults.contents = (0, codeMod_1.addSwiftImports)(config.modResults.contents, ['PushKit', '
|
|
79
|
+
if (props?.ringingPushNotifications) {
|
|
80
|
+
config.modResults.contents = (0, codeMod_1.addSwiftImports)(config.modResults.contents, ['RNCallKeep', 'PushKit', 'RNVoipPushNotification']);
|
|
74
81
|
config.modResults.contents =
|
|
75
|
-
addDidFinishLaunchingWithOptionsRingingSwift(config.modResults.contents);
|
|
82
|
+
addDidFinishLaunchingWithOptionsRingingSwift(config.modResults.contents, props.ringingPushNotifications);
|
|
76
83
|
config.modResults.contents = addDidUpdatePushCredentialsSwift(config.modResults.contents);
|
|
77
84
|
config.modResults.contents = addDidReceiveIncomingPushCallbackSwift(config.modResults.contents);
|
|
85
|
+
config.modResults.contents = addAudioSessionMethodsSwift(config.modResults.contents);
|
|
78
86
|
}
|
|
79
87
|
return config;
|
|
80
88
|
}
|
|
@@ -119,26 +127,55 @@ function addDidFinishLaunchingWithOptionsObjc(contents, iOSEnableMultitaskingCam
|
|
|
119
127
|
}
|
|
120
128
|
return contents;
|
|
121
129
|
}
|
|
122
|
-
function addDidFinishLaunchingWithOptionsRingingSwift(contents) {
|
|
130
|
+
function addDidFinishLaunchingWithOptionsRingingSwift(contents, ringingPushNotifications) {
|
|
123
131
|
const functionSelector = 'application(_:didFinishLaunchingWithOptions:)';
|
|
132
|
+
const supportsVideoString = ringingPushNotifications.disableVideoIos
|
|
133
|
+
? 'false'
|
|
134
|
+
: 'true';
|
|
135
|
+
const includesCallsInRecents = ringingPushNotifications.includesCallsInRecentsIos ? 'false' : 'true';
|
|
136
|
+
const setupCallKeep = ` let localizedAppName = Bundle.main.localizedInfoDictionary?["CFBundleDisplayName"] as? String
|
|
137
|
+
let appName = Bundle.main.infoDictionary?["CFBundleDisplayName"] as? String
|
|
138
|
+
RNCallKeep.setup([
|
|
139
|
+
"appName": localizedAppName != nil ? localizedAppName! : appName as Any,
|
|
140
|
+
"supportsVideo": ${supportsVideoString},
|
|
141
|
+
"includesCallsInRecents": ${includesCallsInRecents},
|
|
142
|
+
])`;
|
|
143
|
+
if (!contents.includes('RNCallKeep.setup')) {
|
|
144
|
+
contents = (0, codeMod_1.insertContentsInsideSwiftFunctionBlock)(contents, functionSelector, setupCallKeep, { position: 'head' });
|
|
145
|
+
}
|
|
124
146
|
// call the setup of voip push notification
|
|
125
|
-
const voipSetupMethod = '
|
|
147
|
+
const voipSetupMethod = 'RNVoipPushNotificationManager.voipRegistration()';
|
|
126
148
|
if (!contents.includes(voipSetupMethod)) {
|
|
127
149
|
contents = (0, codeMod_1.insertContentsInsideSwiftFunctionBlock)(contents, functionSelector, ' ' /* indentation */ + voipSetupMethod, { position: 'head' });
|
|
128
150
|
}
|
|
129
151
|
return contents;
|
|
130
152
|
}
|
|
131
|
-
function addDidFinishLaunchingWithOptionsRingingObjc(contents) {
|
|
153
|
+
function addDidFinishLaunchingWithOptionsRingingObjc(contents, ringingPushNotifications) {
|
|
132
154
|
const functionSelector = 'application:didFinishLaunchingWithOptions:';
|
|
155
|
+
// call the setup RNCallKeep
|
|
156
|
+
const supportsVideoString = ringingPushNotifications.disableVideoIos
|
|
157
|
+
? '@NO'
|
|
158
|
+
: '@YES';
|
|
159
|
+
const includesCallsInRecents = ringingPushNotifications.includesCallsInRecentsIos ? '@YES' : '@NO';
|
|
160
|
+
const setupCallKeep = `NSString *localizedAppName = [[[NSBundle mainBundle] localizedInfoDictionary] objectForKey:@"CFBundleDisplayName"];
|
|
161
|
+
NSString *appName = [[[NSBundle mainBundle] infoDictionary]objectForKey :@"CFBundleDisplayName"];
|
|
162
|
+
[RNCallKeep setup:@{
|
|
163
|
+
@"appName": localizedAppName != nil ? localizedAppName : appName,
|
|
164
|
+
@"supportsVideo": ${supportsVideoString},
|
|
165
|
+
@"includesCallsInRecents": ${includesCallsInRecents},
|
|
166
|
+
}];`;
|
|
167
|
+
if (!contents.includes('[RNCallKeep setup:@')) {
|
|
168
|
+
contents = (0, codeMod_1.insertContentsInsideObjcFunctionBlock)(contents, functionSelector, setupCallKeep, { position: 'head' });
|
|
169
|
+
}
|
|
133
170
|
// call the setup of voip push notification
|
|
134
|
-
const voipSetupMethod = '[
|
|
171
|
+
const voipSetupMethod = '[RNVoipPushNotificationManager voipRegistration];';
|
|
135
172
|
if (!contents.includes(voipSetupMethod)) {
|
|
136
173
|
contents = (0, codeMod_1.insertContentsInsideObjcFunctionBlock)(contents, functionSelector, voipSetupMethod, { position: 'head' });
|
|
137
174
|
}
|
|
138
175
|
return contents;
|
|
139
176
|
}
|
|
140
177
|
function addDidUpdatePushCredentialsSwift(contents) {
|
|
141
|
-
const updatedPushCredentialsMethod = '
|
|
178
|
+
const updatedPushCredentialsMethod = 'RNVoipPushNotificationManager.didUpdate(credentials, forType: type.rawValue)';
|
|
142
179
|
if (!contents.includes(updatedPushCredentialsMethod)) {
|
|
143
180
|
const functionSelector = 'pushRegistry(_:didUpdate:for:)';
|
|
144
181
|
const codeblock = (0, codeMod_1.findSwiftFunctionCodeBlock)(contents, functionSelector);
|
|
@@ -160,7 +197,7 @@ function addDidUpdatePushCredentialsSwift(contents) {
|
|
|
160
197
|
return contents;
|
|
161
198
|
}
|
|
162
199
|
function addDidUpdatePushCredentialsObjc(contents) {
|
|
163
|
-
const updatedPushCredentialsMethod = '[
|
|
200
|
+
const updatedPushCredentialsMethod = '[RNVoipPushNotificationManager didUpdatePushCredentials:credentials forType:(NSString *)type];';
|
|
164
201
|
if (!contents.includes(updatedPushCredentialsMethod)) {
|
|
165
202
|
const functionSelector = 'pushRegistry:didUpdatePushCredentials:forType:';
|
|
166
203
|
const codeblock = (0, codeMod_1.findObjcFunctionCodeBlock)(contents, functionSelector);
|
|
@@ -177,10 +214,112 @@ function addDidUpdatePushCredentialsObjc(contents) {
|
|
|
177
214
|
}
|
|
178
215
|
return contents;
|
|
179
216
|
}
|
|
217
|
+
function addAudioSessionMethodsSwift(contents) {
|
|
218
|
+
const audioSessionDidActivateMethod = 'RTCAudioSession.sharedInstance().audioSessionDidActivate(AVAudioSession.sharedInstance())';
|
|
219
|
+
if (!contents.includes(audioSessionDidActivateMethod)) {
|
|
220
|
+
const functionSelector = 'provider(_:didActivate:)';
|
|
221
|
+
if (!contents.includes('didActivateAudioSession')) {
|
|
222
|
+
contents = (0, codeMod_1.insertContentsInsideSwiftClassBlock)(contents, 'class AppDelegate', `
|
|
223
|
+
func provider(_ provider: CXProvider, didActivateAudioSession audioSession: AVAudioSession) {
|
|
224
|
+
${audioSessionDidActivateMethod}
|
|
225
|
+
}
|
|
226
|
+
`, { position: 'tail' });
|
|
227
|
+
}
|
|
228
|
+
else {
|
|
229
|
+
contents = (0, codeMod_1.insertContentsInsideSwiftFunctionBlock)(contents, functionSelector, audioSessionDidActivateMethod, { position: 'tail' });
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
const audioSessionDidDeactivateMethod = 'RTCAudioSession.sharedInstance().audioSessionDidDeactivate(AVAudioSession.sharedInstance())';
|
|
233
|
+
if (!contents.includes(audioSessionDidDeactivateMethod)) {
|
|
234
|
+
const functionSelector = 'provider(_:didDeactivate:)';
|
|
235
|
+
if (!contents.includes('didDeactivateAudioSession')) {
|
|
236
|
+
contents = (0, codeMod_1.insertContentsInsideSwiftClassBlock)(contents, 'class AppDelegate', `
|
|
237
|
+
func provider(_ provider: CXProvider, didDeactivateAudioSession audioSession: AVAudioSession) {
|
|
238
|
+
${audioSessionDidDeactivateMethod}
|
|
239
|
+
}
|
|
240
|
+
`, { position: 'tail' });
|
|
241
|
+
}
|
|
242
|
+
else {
|
|
243
|
+
contents = (0, codeMod_1.insertContentsInsideSwiftFunctionBlock)(contents, functionSelector, audioSessionDidDeactivateMethod, { position: 'tail' });
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
return contents;
|
|
247
|
+
}
|
|
248
|
+
function addAudioSessionMethodsObjc(contents) {
|
|
249
|
+
const audioSessionDidActivateMethod = '[[RTCAudioSession sharedInstance] audioSessionDidActivate:[AVAudioSession sharedInstance]];';
|
|
250
|
+
if (!contents.includes(audioSessionDidActivateMethod)) {
|
|
251
|
+
const functionSelector = 'provider:didActivateAudioSession:audioSession:';
|
|
252
|
+
const codeblock = (0, codeMod_1.findObjcFunctionCodeBlock)(contents, functionSelector);
|
|
253
|
+
if (!codeblock) {
|
|
254
|
+
contents = (0, addNewLinesToAppDelegateObjc_1.default)(contents, [
|
|
255
|
+
'- (void) provider:(CXProvider *) provider didActivateAudioSession:(AVAudioSession *) audioSession {',
|
|
256
|
+
' ' /* indentation */ + audioSessionDidActivateMethod,
|
|
257
|
+
'}',
|
|
258
|
+
]);
|
|
259
|
+
}
|
|
260
|
+
else {
|
|
261
|
+
contents = (0, codeMod_1.insertContentsInsideObjcFunctionBlock)(contents, functionSelector, audioSessionDidActivateMethod, { position: 'tail' });
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
const audioSessionDidDeactivateMethod = '[[RTCAudioSession sharedInstance] audioSessionDidDeactivate:[AVAudioSession sharedInstance]];';
|
|
265
|
+
if (!contents.includes(audioSessionDidDeactivateMethod)) {
|
|
266
|
+
const functionSelector = 'provider:didDeactivateAudioSession:audioSession:';
|
|
267
|
+
const codeblock = (0, codeMod_1.findObjcFunctionCodeBlock)(contents, functionSelector);
|
|
268
|
+
if (!codeblock) {
|
|
269
|
+
contents = (0, addNewLinesToAppDelegateObjc_1.default)(contents, [
|
|
270
|
+
'- (void) provider:(CXProvider *) provider didDeactivateAudioSession:(AVAudioSession *) audioSession {',
|
|
271
|
+
' ' /* indentation */ + audioSessionDidDeactivateMethod,
|
|
272
|
+
'}',
|
|
273
|
+
]);
|
|
274
|
+
}
|
|
275
|
+
else {
|
|
276
|
+
contents = (0, codeMod_1.insertContentsInsideObjcFunctionBlock)(contents, functionSelector, audioSessionDidDeactivateMethod, { position: 'tail' });
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
return contents;
|
|
280
|
+
}
|
|
180
281
|
function addDidReceiveIncomingPushCallbackSwift(contents) {
|
|
181
282
|
const onIncomingPush = `
|
|
182
|
-
|
|
183
|
-
|
|
283
|
+
guard let stream = payload.dictionaryPayload["stream"] as? [String: Any],
|
|
284
|
+
let createdCallerName = stream["created_by_display_name"] as? String,
|
|
285
|
+
let cid = stream["call_cid"] as? String else {
|
|
286
|
+
completion()
|
|
287
|
+
return
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
// Check if user is busy BEFORE registering the call
|
|
291
|
+
let shouldReject = StreamVideoReactNative.shouldRejectCallWhenBusy()
|
|
292
|
+
let hasAnyActiveCall = StreamVideoReactNative.hasAnyActiveCall()
|
|
293
|
+
|
|
294
|
+
if shouldReject && hasAnyActiveCall {
|
|
295
|
+
// Complete the VoIP notification without showing CallKit UI
|
|
296
|
+
completion()
|
|
297
|
+
return
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
let uuid = UUID().uuidString
|
|
301
|
+
let videoIncluded = stream["video"] as? String
|
|
302
|
+
let hasVideo = videoIncluded == "false" ? false : true
|
|
303
|
+
|
|
304
|
+
StreamVideoReactNative.registerIncomingCall(cid, uuid: uuid)
|
|
305
|
+
|
|
306
|
+
RNVoipPushNotificationManager.addCompletionHandler(uuid, completionHandler: completion)
|
|
307
|
+
|
|
308
|
+
RNVoipPushNotificationManager.didReceiveIncomingPush(with: payload, forType: type.rawValue)
|
|
309
|
+
|
|
310
|
+
RNCallKeep.reportNewIncomingCall(uuid,
|
|
311
|
+
handle: createdCallerName,
|
|
312
|
+
handleType: "generic",
|
|
313
|
+
hasVideo: hasVideo,
|
|
314
|
+
localizedCallerName: createdCallerName,
|
|
315
|
+
supportsHolding: false,
|
|
316
|
+
supportsDTMF: false,
|
|
317
|
+
supportsGrouping: false,
|
|
318
|
+
supportsUngrouping: false,
|
|
319
|
+
fromPushKit: true,
|
|
320
|
+
payload: stream,
|
|
321
|
+
withCompletionHandler: nil)`;
|
|
322
|
+
if (!contents.includes('RNVoipPushNotificationManager.didReceiveIncomingPush')) {
|
|
184
323
|
const functionSelector = 'pushRegistry(_:didReceiveIncomingPushWith:for:completion:)';
|
|
185
324
|
const codeblock = (0, codeMod_1.findSwiftFunctionCodeBlock)(contents, functionSelector);
|
|
186
325
|
if (!codeblock) {
|
|
@@ -203,10 +342,49 @@ function addDidReceiveIncomingPushCallbackSwift(contents) {
|
|
|
203
342
|
}
|
|
204
343
|
function addDidReceiveIncomingPushCallbackObjc(contents) {
|
|
205
344
|
const onIncomingPush = `
|
|
206
|
-
// process the payload and
|
|
207
|
-
|
|
345
|
+
// process the payload and store it in the native module's cache
|
|
346
|
+
NSDictionary *stream = payload.dictionaryPayload[@"stream"];
|
|
347
|
+
NSString *uuid = [[NSUUID UUID] UUIDString];
|
|
348
|
+
NSString *createdCallerName = stream[@"created_by_display_name"];
|
|
349
|
+
NSString *cid = stream[@"call_cid"];
|
|
350
|
+
|
|
351
|
+
// Check if user is busy BEFORE registering the call
|
|
352
|
+
BOOL shouldReject = [StreamVideoReactNative shouldRejectCallWhenBusy];
|
|
353
|
+
BOOL hasAnyActiveCall = [StreamVideoReactNative hasAnyActiveCall];
|
|
354
|
+
|
|
355
|
+
if (shouldReject && hasAnyActiveCall) {
|
|
356
|
+
// Complete the VoIP notification without showing CallKit UI
|
|
357
|
+
completion();
|
|
358
|
+
return;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
NSString *videoIncluded = stream[@"video"];
|
|
362
|
+
BOOL hasVideo = [videoIncluded isEqualToString:@"false"] ? NO : YES;
|
|
363
|
+
|
|
364
|
+
// store the call cid and uuid in the native module's cache
|
|
365
|
+
[StreamVideoReactNative registerIncomingCall:cid uuid:uuid];
|
|
366
|
+
|
|
367
|
+
// set the completion handler - this one is called by the JS SDK
|
|
368
|
+
[RNVoipPushNotificationManager addCompletionHandler:uuid completionHandler:completion];
|
|
369
|
+
|
|
370
|
+
// send event to JS - the JS SDK will handle the rest and call the 'completionHandler'
|
|
371
|
+
[RNVoipPushNotificationManager didReceiveIncomingPushWithPayload:payload forType:(NSString *)type];
|
|
372
|
+
|
|
373
|
+
// display the incoming call notification
|
|
374
|
+
[RNCallKeep reportNewIncomingCall: uuid
|
|
375
|
+
handle: createdCallerName
|
|
376
|
+
handleType: @"generic"
|
|
377
|
+
hasVideo: hasVideo
|
|
378
|
+
localizedCallerName: createdCallerName
|
|
379
|
+
supportsHolding: NO
|
|
380
|
+
supportsDTMF: NO
|
|
381
|
+
supportsGrouping: NO
|
|
382
|
+
supportsUngrouping: NO
|
|
383
|
+
fromPushKit: YES
|
|
384
|
+
payload: stream
|
|
385
|
+
withCompletionHandler: nil];
|
|
208
386
|
`;
|
|
209
|
-
if (!contents.includes('[
|
|
387
|
+
if (!contents.includes('[RNVoipPushNotificationManager didReceiveIncomingPushWithPayload')) {
|
|
210
388
|
const functionSelector = 'pushRegistry:didReceiveIncomingPushWithPayload:forType:withCompletionHandler:';
|
|
211
389
|
const codeblock = (0, codeMod_1.findObjcFunctionCodeBlock)(contents, functionSelector);
|
|
212
390
|
if (!codeblock) {
|
|
@@ -23,7 +23,7 @@ const withStreamVideoReactNativeSDKMainActivity = (configuration, props) => {
|
|
|
23
23
|
if (props?.enableScreenshare) {
|
|
24
24
|
config.modResults.contents = addInsideOnCreateScreenshare(config.modResults.contents, isMainActivityJava);
|
|
25
25
|
}
|
|
26
|
-
if (props?.
|
|
26
|
+
if (props?.ringingPushNotifications?.showWhenLockedAndroid) {
|
|
27
27
|
config.modResults.contents = addInsideOnCreateLockscreen(config.modResults.contents, isMainActivityJava);
|
|
28
28
|
}
|
|
29
29
|
return config;
|
|
@@ -12,7 +12,7 @@ const withStreamVideoReactNativeSDKiOSInfoPList = (configuration, props) => {
|
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
addBackgroundMode('audio');
|
|
15
|
-
if (props?.
|
|
15
|
+
if (props?.ringingPushNotifications) {
|
|
16
16
|
addBackgroundMode('voip');
|
|
17
17
|
addBackgroundMode('fetch');
|
|
18
18
|
addBackgroundMode('processing');
|
|
@@ -20,7 +20,8 @@ const withStreamVideoReactNativeSDKiOSInfoPList = (configuration, props) => {
|
|
|
20
20
|
'$(PRODUCT_BUNDLE_IDENTIFIER)',
|
|
21
21
|
];
|
|
22
22
|
}
|
|
23
|
-
if (props?.enableNonRingingPushNotifications ||
|
|
23
|
+
if (props?.enableNonRingingPushNotifications ||
|
|
24
|
+
props?.ringingPushNotifications) {
|
|
24
25
|
addBackgroundMode('remote-notification');
|
|
25
26
|
}
|
|
26
27
|
return config;
|
|
@@ -116,7 +116,7 @@ class StreamInCallManager: RCTEventEmitter {
|
|
|
116
116
|
}
|
|
117
117
|
} else {
|
|
118
118
|
intendedCategory = .playAndRecord
|
|
119
|
-
intendedMode = .voiceChat
|
|
119
|
+
intendedMode = defaultAudioDevice == .speaker ? .videoChat : .voiceChat
|
|
120
120
|
|
|
121
121
|
// XCode 16 and older don't expose .allowBluetoothHFP
|
|
122
122
|
// https://forums.swift.org/t/xcode-26-avaudiosession-categoryoptions-allowbluetooth-deprecated/80956
|
|
@@ -132,7 +132,6 @@ class StreamInCallManager: RCTEventEmitter {
|
|
|
132
132
|
rtcConfig.category = intendedCategory.rawValue
|
|
133
133
|
rtcConfig.mode = intendedMode.rawValue
|
|
134
134
|
rtcConfig.categoryOptions = intendedOptions
|
|
135
|
-
// This ensures WebRTC's internal state stays consistent during interruptions/route changes
|
|
136
135
|
RTCAudioSessionConfiguration.setWebRTC(rtcConfig)
|
|
137
136
|
|
|
138
137
|
let session = RTCAudioSession.sharedInstance()
|
|
@@ -141,7 +140,7 @@ class StreamInCallManager: RCTEventEmitter {
|
|
|
141
140
|
session.unlockForConfiguration()
|
|
142
141
|
}
|
|
143
142
|
do {
|
|
144
|
-
try session.
|
|
143
|
+
try session.setCategory(intendedCategory, mode: intendedMode, options: intendedOptions)
|
|
145
144
|
if (wasRecording) {
|
|
146
145
|
try adm.setRecording(wasRecording)
|
|
147
146
|
}
|
|
@@ -267,11 +266,6 @@ class StreamInCallManager: RCTEventEmitter {
|
|
|
267
266
|
|
|
268
267
|
@objc
|
|
269
268
|
func logAudioState() {
|
|
270
|
-
log(getAudioStateLog())
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
@objc(getAudioStateLog)
|
|
274
|
-
func getAudioStateLog() -> String {
|
|
275
269
|
let session = AVAudioSession.sharedInstance()
|
|
276
270
|
let adm = getAudioDeviceModule()
|
|
277
271
|
|
|
@@ -284,7 +278,7 @@ class StreamInCallManager: RCTEventEmitter {
|
|
|
284
278
|
|
|
285
279
|
let rtcAVSession = rtcSession.session
|
|
286
280
|
let logString = """
|
|
287
|
-
|
|
281
|
+
Audio State:
|
|
288
282
|
Category: \(session.category.rawValue)
|
|
289
283
|
Mode: \(session.mode.rawValue)
|
|
290
284
|
Output Port: \(session.currentRoute.outputs.first?.portName ?? "N/A")
|
|
@@ -292,16 +286,10 @@ class StreamInCallManager: RCTEventEmitter {
|
|
|
292
286
|
Category Options: \(session.categoryOptions)
|
|
293
287
|
InputNumberOfChannels: \(session.inputNumberOfChannels)
|
|
294
288
|
OutputNumberOfChannels: \(session.outputNumberOfChannels)
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
IsPlaying: \(adm.isPlaying)
|
|
298
|
-
IsRecording: \(adm.isRecording)
|
|
299
|
-
IsVoiceProcessingAGCEnabled: \(adm.isVoiceProcessingAGCEnabled)
|
|
300
|
-
IsVoiceProcessingBypassed: \(adm.isVoiceProcessingBypassed)
|
|
301
|
-
IsVoiceProcessingEnabled: \(adm.isVoiceProcessingEnabled)
|
|
302
|
-
IsStereoPlayoutEnabled: \(adm.isStereoPlayoutEnabled)
|
|
289
|
+
AdmIsPlaying: \(adm.isPlaying)
|
|
290
|
+
AdmIsRecording: \(adm.isRecording)
|
|
303
291
|
|
|
304
|
-
|
|
292
|
+
RTC Audio State:
|
|
305
293
|
Wrapped Category: \(rtcAVSession.category.rawValue)
|
|
306
294
|
Wrapped Mode: \(rtcAVSession.mode.rawValue)
|
|
307
295
|
Wrapped Output Port: \(rtcAVSession.currentRoute.outputs.first?.portName ?? "N/A")
|
|
@@ -312,7 +300,7 @@ class StreamInCallManager: RCTEventEmitter {
|
|
|
312
300
|
IsActive: \(rtcSession.isActive)
|
|
313
301
|
ActivationCount: \(rtcSession.activationCount)
|
|
314
302
|
"""
|
|
315
|
-
|
|
303
|
+
log(logString)
|
|
316
304
|
}
|
|
317
305
|
|
|
318
306
|
@objc(muteAudioOutput)
|