From 4b383019a0f808bbc1848f016bedbfad26cd0935 Mon Sep 17 00:00:00 2001 From: Milosz Filimowski Date: Tue, 2 Dec 2025 12:31:10 +0100 Subject: [PATCH 1/4] create new podspec for broadcast extension --- FishjamCloudBroadcastClient.podspec | 45 +++++++++++++++++++ FishjamCloudClient.podspec | 4 -- common/plugins/src/with-custom-config-ios.ts | 20 +++++---- .../FishjamBroadcastSampleHandler.swift | 2 +- .../plugin/src/withFishjamIos.ts | 4 +- 5 files changed, 60 insertions(+), 15 deletions(-) create mode 100644 FishjamCloudBroadcastClient.podspec diff --git a/FishjamCloudBroadcastClient.podspec b/FishjamCloudBroadcastClient.podspec new file mode 100644 index 000000000..fbdb3e15a --- /dev/null +++ b/FishjamCloudBroadcastClient.podspec @@ -0,0 +1,45 @@ +# +# Be sure to run `pod lib lint FishjamClient.podspec' to ensure this is a +# valid spec before submitting. + +require 'json' + +package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) +base_content = File.read(File.join(__dir__, 'FishjamCloudClient.podspec')) + +base_config = { + homepage: base_content[/s\.homepage\s*=\s*['"]([^'"]+)['"]/, 1], + license_type: base_content[/s\.license\s*=\s*\{[^}]*:type\s*=>\s*['"]([^'"]+)['"]/, 1], + license_file: base_content[/s\.license\s*=\s*\{[^}]*:file\s*=>\s*['"]([^'"]+)['"]/, 1], + author_name: base_content[/s\.author\s*=\s*\{\s*['"]([^'"]+)['"]/, 1], + author_url: base_content[/s\.author\s*=\s*\{[^}]*['"][^'"]*['"]\s*=>\s*['"]([^'"]+)['"]/, 1], + deployment_target: base_content[/s\.ios\.deployment_target\s*=\s*['"]([^'"]+)['"]/, 1], + swift_version: base_content[/s\.swift_version\s*=\s*['"]([^'"]+)['"]/, 1], + resources: base_content[/s\.resources\s*=\s*['"]([^'"]+)['"]/, 1], + xcconfig_key: base_content[/s\.pod_target_xcconfig\s*=\s*\{\s*['"]([^'"]+)['"]/, 1], + xcconfig_value: base_content[/s\.pod_target_xcconfig\s*=\s*\{[^}]*['"][^'"]*['"]\s*=>\s*['"]([^'"]+)['"]/, 1], + webrtc_version: base_content[/s\.dependency\s+['"]WebRTC-SDK['"]\s*,\s*['"]([^'"]+)['"]/, 1], + swift_protobuf_version: base_content[/s\.dependency\s+['"]SwiftProtobuf['"]\s*,\s*['"]([^'"]+)['"]/, 1] +} + +Pod::Spec.new do |s| + s.name = 'FishjamCloudBroadcastClient' + s.version = package['version'] + s.summary = 'Fishjam Broadcast Extension SDK for iOS screen sharing and broadcast functionality.' + + s.homepage = base_config[:homepage] + s.license = { :type => base_config[:license_type], :file => base_config[:license_file] } + s.author = { base_config[:author_name] => base_config[:author_url] } + s.source = { :git => base_config[:homepage] + '.git', :tag => s.version.to_s } + + s.ios.deployment_target = base_config[:deployment_target] + s.swift_version = base_config[:swift_version] + + s.source_files = "packages/ios-client/Sources/FishjamClient/media/BroadcastSampleSource.swift", "packages/ios-client/Sources/FishjamClient/ipc/**/*.{h,m,mm,swift}" + s.resources = base_config[:resources] + + s.pod_target_xcconfig = { base_config[:xcconfig_key] => base_config[:xcconfig_value] } + + s.dependency 'WebRTC-SDK', base_config[:webrtc_version] + s.dependency 'SwiftProtobuf', base_config[:swift_protobuf_version] +end \ No newline at end of file diff --git a/FishjamCloudClient.podspec b/FishjamCloudClient.podspec index aa0bafb2c..c6399e0c2 100644 --- a/FishjamCloudClient.podspec +++ b/FishjamCloudClient.podspec @@ -29,8 +29,4 @@ Pod::Spec.new do |s| s.dependency 'Starscream', '~> 4.0.0' s.dependency 'PromisesSwift' s.dependency 'SwiftLogJellyfish', '1.5.2' - - s.subspec "Broadcast" do |spec| - spec.source_files = "packages/ios-client/Sources/FishjamClient/media/BroadcastSampleSource.swift", "packages/ios-client/Sources/FishjamClient/ipc/**/*.{h,m,mm,swift}" - end end diff --git a/common/plugins/src/with-custom-config-ios.ts b/common/plugins/src/with-custom-config-ios.ts index 92d047863..310dcc1c5 100644 --- a/common/plugins/src/with-custom-config-ios.ts +++ b/common/plugins/src/with-custom-config-ios.ts @@ -10,11 +10,12 @@ const replaceCloudClientForExtension = ( podfileContent: string, extensionTargetName?: string, ) => { - const extTargetName = extensionTargetName || 'FishjamScreenBroadcastExtension'; - const podToReplace = "pod 'FishjamCloudClient/Broadcast'"; + const extTargetName = + extensionTargetName || 'FishjamScreenBroadcastExtension'; + const podToReplace = "pod 'FishjamCloudBroadcastClient'"; const replacementPod = ` ${INFO_GENERATED_COMMENT_IOS} - pod 'FishjamCloudClient/Broadcast', :path => '../../../'`; + pod 'FishjamCloudBroadcastClient', :path => '../../../'`; const targetRegex = new RegExp( `target '${extTargetName}' do[\\s\\S]*?${podToReplace}[\\s\\S]*?end`, @@ -39,14 +40,17 @@ const replaceCloudClientForMainApp = ( return podfileContent; }; -export const withCustomConfigIos: ConfigPlugin<{ targetName: string; extensionTargetName?: string }> = ( - config, - { targetName, extensionTargetName }, -) => { +export const withCustomConfigIos: ConfigPlugin<{ + targetName: string; + extensionTargetName?: string; +}> = (config, { targetName, extensionTargetName }) => { config = withPodfile(config, (configuration) => { let podfile = configuration.modResults.contents; - podfile = removeGeneratedBlockIos(podfile, INFO_GENERATED_COMMENT_IOS.trim()); + podfile = removeGeneratedBlockIos( + podfile, + INFO_GENERATED_COMMENT_IOS.trim(), + ); podfile = replaceCloudClientForExtension(podfile, extensionTargetName); podfile = replaceCloudClientForMainApp(targetName, podfile); diff --git a/packages/react-native-client/plugin/broadcastExtensionFiles/FishjamBroadcastSampleHandler.swift b/packages/react-native-client/plugin/broadcastExtensionFiles/FishjamBroadcastSampleHandler.swift index 15bc2f96f..b7424cee7 100644 --- a/packages/react-native-client/plugin/broadcastExtensionFiles/FishjamBroadcastSampleHandler.swift +++ b/packages/react-native-client/plugin/broadcastExtensionFiles/FishjamBroadcastSampleHandler.swift @@ -1,4 +1,4 @@ -import FishjamCloudClient +import FishjamCloudBroadcastClient import Foundation import ReplayKit import WebRTC diff --git a/packages/react-native-client/plugin/src/withFishjamIos.ts b/packages/react-native-client/plugin/src/withFishjamIos.ts index aa4f6d887..9126c95d7 100644 --- a/packages/react-native-client/plugin/src/withFishjamIos.ts +++ b/packages/react-native-client/plugin/src/withFishjamIos.ts @@ -19,7 +19,7 @@ function getSbeTargetName(props: FishjamPluginOptions) { export function getSbePodfileSnippet(props: FishjamPluginOptions) { const targetName = getSbeTargetName(props); - return `\ntarget '${targetName}' do\n pod 'FishjamCloudClient/Broadcast'\nend`; + return `\ntarget '${targetName}' do\n pod 'FishjamCloudBroadcastClient'\nend`; } const TARGETED_DEVICE_FAMILY = `"1,2"`; @@ -46,7 +46,7 @@ async function updateFileWithRegex( /** * Inserts a required target to Podfile. - * This is needed to provide the dependency of FishjamCloudClient/Broadcast to the extension. + * This is needed to provide the dependency of FishjamCloudBroadcastClient to the extension. */ async function updatePodfile(iosPath: string, props: FishjamPluginOptions) { const podfileSnippet = getSbePodfileSnippet(props); From 562a4843132c9bb1de4ee88c91e45370589a4206 Mon Sep 17 00:00:00 2001 From: Milosz Filimowski Date: Tue, 2 Dec 2025 12:48:00 +0100 Subject: [PATCH 2/4] remove stupid comment --- FishjamCloudBroadcastClient.podspec | 4 ---- FishjamCloudClient.podspec | 4 ---- 2 files changed, 8 deletions(-) diff --git a/FishjamCloudBroadcastClient.podspec b/FishjamCloudBroadcastClient.podspec index fbdb3e15a..423deb873 100644 --- a/FishjamCloudBroadcastClient.podspec +++ b/FishjamCloudBroadcastClient.podspec @@ -1,7 +1,3 @@ -# -# Be sure to run `pod lib lint FishjamClient.podspec' to ensure this is a -# valid spec before submitting. - require 'json' package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) diff --git a/FishjamCloudClient.podspec b/FishjamCloudClient.podspec index c6399e0c2..e456d24aa 100644 --- a/FishjamCloudClient.podspec +++ b/FishjamCloudClient.podspec @@ -1,7 +1,3 @@ -# -# Be sure to run `pod lib lint FishjamClient.podspec' to ensure this is a -# valid spec before submitting. - require 'json' package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) From 54b6ee77b96159667c8905839f44b394e20e9666 Mon Sep 17 00:00:00 2001 From: Milosz Filimowski Date: Tue, 2 Dec 2025 12:59:32 +0100 Subject: [PATCH 3/4] update release script --- .github/workflows/release.yml | 8 ++++++-- RELEASE.md | 4 ---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d0b92c632..17948475d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,8 +12,12 @@ jobs: - name: Deploy to Cocoapods run: | set -eo pipefail - pod lib lint --allow-warnings --verbose - pod trunk push --allow-warnings --verbose + + pod lib lint FishjamCloudClient.podspec --allow-warnings --verbose + pod lib lint FishjamCloudBroadcastClient.podspec --allow-warnings --verbose + + pod trunk push FishjamCloudClient.podspec --allow-warnings --verbose + pod trunk push FishjamCloudBroadcastClient.podspec --allow-warnings --verbose env: COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} publish-android-client: diff --git a/RELEASE.md b/RELEASE.md index 97fbfc33d..9460eefd3 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,12 +1,8 @@ ## Release process: 1. Create new branch: - - update `version` to x.y.z in [package.json](./package.json) - update `version` to x.y.z in [package.json](./packages/react-native-client/package.json) - - update `s.version` to x.y.z in [FishjamCloudClient.podspec](./FishjamCloudClient.podspec) - - update `s.dependency 'FishjamCloudClient'` to x.y.z in [RNFishjamClient.podspec](./packages/react-native-client/ios/RNFishjamClient.podspec) - - update `packageVersion` to x.y.z in [build.gradle](./packages/react-native-client/android/build.gradle) 1. Commit, create pull request and merge it From d391ea6797897a454d03dc0e01b3cb3f7bc67067 Mon Sep 17 00:00:00 2001 From: Milosz Filimowski Date: Tue, 2 Dec 2025 13:02:23 +0100 Subject: [PATCH 4/4] change image to latest --- internal/fishjam-chat/eas.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/fishjam-chat/eas.json b/internal/fishjam-chat/eas.json index 6bbc4f02c..e4de63871 100644 --- a/internal/fishjam-chat/eas.json +++ b/internal/fishjam-chat/eas.json @@ -6,7 +6,7 @@ "build": { "base": { "ios": { - "image": "macos-sequoia-15.3-xcode-16.2" + "image": "latest" } }, "development": {