Skip to content

Commit 95b45d1

Browse files
committed
feat: added image support for ios
1 parent d374c9b commit 95b45d1

File tree

7 files changed

+8
-6
lines changed

7 files changed

+8
-6
lines changed

packages/react-native-callingx/ios/Callingx.mm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,7 @@ - (void)setupiOS:(JS::NativeCallingx::SpecSetupiOSOptions &)options {
515515
@"maximumCallGroups" : @(options.maximumCallGroups()),
516516
@"handleType" : options.handleType(),
517517
@"ringtoneSound" : options.sound(),
518+
@"imageName" : options.imageName(),
518519
@"includesCallsInRecents" : @(options.callsHistory())
519520
};
520521

packages/react-native-callingx/src/CallingxModule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class CallingxModule implements ICallingxModule {
5050
}
5151

5252
setup(options: {
53-
ios: Partial<iOSOptions>;
53+
ios?: Partial<iOSOptions>;
5454
android: Partial<AndroidOptions & NotificationTransformers>;
5555
}): void {
5656
if (Platform.OS === 'ios') {

packages/react-native-callingx/src/spec/NativeCallingx.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export interface Spec extends TurboModule {
1010
maximumCallGroups: number;
1111
handleType: string;
1212
sound: string | null;
13+
imageName: string | null;
1314
callsHistory: boolean;
1415
}): void;
1516

packages/react-native-callingx/src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export type iOSOptions = {
6565
maximumCallGroups?: number;
6666
handleType?: string; //'generic' | 'number' | 'phone' | 'email';
6767
sound?: string | null;
68+
imageName?: string | null;
6869
callsHistory?: boolean;
6970
};
7071

packages/react-native-callingx/src/utils/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export const defaultiOSOptions: Required<iOSOptions> = {
1313
maximumCallGroups: 1,
1414
handleType: 'generic',
1515
sound: null,
16+
imageName: null,
1617
callsHistory: false,
1718
};
1819

sample-apps/react-native/dogfood/ios/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
7171
) {
7272

7373
guard let stream = payload.dictionaryPayload["stream"] as? [String: Any],
74-
let createdCallerName = stream["created_by_display_name"] as? String,
74+
let _ = stream["created_by_display_name"] as? String,
7575
let cid = stream["call_cid"] as? String else {
7676
completion() // Ensure completion handler is called even if parsing fails
7777
return

sample-apps/react-native/dogfood/src/utils/setPushConfig.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,8 @@ export function setPushConfig() {
101101
incoming
102102
? `Incoming call from ${callerName}`
103103
: `Outgoing call to ${callerName}`,
104-
subtitleTransformer: (phoneNumber: string, incoming: boolean) =>
105-
incoming
106-
? `Tap to open the call: ${phoneNumber}`
107-
: `Tap to open the call: ${phoneNumber}`,
104+
subtitleTransformer: (callId: string) =>
105+
`Tap to open the call: ${callId}`,
108106
},
109107
});
110108

0 commit comments

Comments
 (0)