Skip to content
This repository was archived by the owner on Feb 10, 2026. It is now read-only.

Commit a5cfe3f

Browse files
authored
feat: add option to configure display name of ios screen broadcast extension (#527)
## Description This PR adds the option to configure the display name of the extension. This display name is shown in the native pop-up after starting to share the screen. ## Motivation and Context Currently, our app shows `FishjamScreenBroadcast` in the native popup, which can be confusing for our users, as they have no idea what Fishjam is. ## Documentation impact I am not sure about this. I didn't find any related documentation to update. Similar to tests, I have tested it in the `internal/fishjam-chat` by running prebuild and checking the `Info.plist` file manually. - [ ] Documentation update required - [ ] Documentation updated [in another PR](_) - [ ] No documentation update required ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
1 parent 662ef7a commit a5cfe3f

4 files changed

Lines changed: 16 additions & 2 deletions

File tree

internal/fishjam-chat/app.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@
6868
"ios": {
6969
"enableScreensharing": true,
7070
"enableVoIPBackgroundMode": true,
71-
"supportsPictureInPicture": true
71+
"supportsPictureInPicture": true,
72+
"broadcastExtensionDisplayName": "Fishjam Screen Broadcast"
7273
}
7374
}
7475
],

packages/react-native-client/plugin/broadcastExtensionFiles/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<plist version="1.0">
44
<dict>
55
<key>CFBundleDisplayName</key>
6-
<string>FishjamScreenBroadcast</string>
6+
<string>{{DISPLAY_NAME}}</string>
77
<key>CFBundleExecutable</key>
88
<string>$(EXECUTABLE_NAME)</string>
99
<key>CFBundleIdentifier</key>

packages/react-native-client/plugin/src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export type FishjamPluginOptions =
1212
appGroupContainerId?: string;
1313
mainTargetName?: string;
1414
broadcastExtensionTargetName?: string;
15+
broadcastExtensionDisplayName?: string;
1516
};
1617
}
1718
| undefined;

packages/react-native-client/plugin/src/withFishjamIos.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ function getSbeTargetName(props: FishjamPluginOptions) {
1717
);
1818
}
1919

20+
function getSbeDisplayName(props: FishjamPluginOptions) {
21+
return props?.ios?.broadcastExtensionDisplayName || 'FishjamScreenBroadcast';
22+
}
23+
2024
export function getSbePodfileSnippet(props: FishjamPluginOptions) {
2125
const targetName = getSbeTargetName(props);
2226
return `\ntarget '${targetName}' do\n pod 'FishjamCloudBroadcastClient'\nend`;
@@ -26,6 +30,7 @@ const TARGETED_DEVICE_FAMILY = `"1,2"`;
2630
const IPHONEOS_DEPLOYMENT_TARGET = '15.1';
2731
const GROUP_IDENTIFIER_TEMPLATE_REGEX = /{{GROUP_IDENTIFIER}}/gm;
2832
const BUNDLE_IDENTIFIER_TEMPLATE_REGEX = /{{BUNDLE_IDENTIFIER}}/gm;
33+
const DISPLAY_NAME_TEMPLATE_REGEX = /{{DISPLAY_NAME}}/gm;
2934

3035
/**
3136
* A helper function for updating a value in a file for given regex
@@ -249,6 +254,13 @@ const withFishjamSBE: ConfigPlugin<FishjamPluginOptions> = (config, options) =>
249254
bundleIdentifier || '',
250255
options,
251256
);
257+
await updateFileWithRegex(
258+
iosPath,
259+
'Info.plist',
260+
DISPLAY_NAME_TEMPLATE_REGEX,
261+
getSbeDisplayName(options),
262+
options,
263+
);
252264

253265
// Create new PBXGroup for the extension
254266
const extGroup = xcodeProject.addPbxGroup(

0 commit comments

Comments
 (0)