From fcc6f0987564bef86f544a9da98407be3408ee99 Mon Sep 17 00:00:00 2001 From: Gleidson Daniel Silva Date: Mon, 8 May 2023 10:45:46 -0300 Subject: [PATCH] feat: Remove Jitsi native module from iOS and use webview instead (#5061) --- android/app/src/main/AndroidManifest.xml | 6 -- app/externalModules.d.ts | 1 - app/lib/constants/index.ts | 1 + app/lib/constants/userAgent.ts | 5 ++ app/views/AuthenticationWebView.tsx | 7 +- app/views/JitsiMeetView.d.ts | 5 -- app/views/JitsiMeetView.ios.tsx | 74 ------------------- ...MeetView.android.tsx => JitsiMeetView.tsx} | 68 +++++++++-------- e2e/data.ts | 2 +- e2e/tests/assorted/01-e2eencryption.spec.ts | 25 +++++-- e2e/tests/assorted/12-i18n.spec.ts | 16 +++- e2e/tests/room/09-jumptomessage.spec.ts | 15 +++- ios/Podfile.lock | 14 ---- ios/RocketChatRN.xcodeproj/project.pbxproj | 10 --- metro.config.js | 1 - package.json | 2 - ...+react-native-jitsimeet-custom+2.5.0.patch | 11 --- react-native.config.js | 5 -- yarn.lock | 9 --- 19 files changed, 92 insertions(+), 185 deletions(-) create mode 100644 app/lib/constants/userAgent.ts delete mode 100644 app/views/JitsiMeetView.d.ts delete mode 100644 app/views/JitsiMeetView.ios.tsx rename app/views/{JitsiMeetView.android.tsx => JitsiMeetView.tsx} (60%) delete mode 100644 patches/@socialcode-rob1+react-native-jitsimeet-custom+2.5.0.patch diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index e5c7b75dc..b1305bfd6 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -79,10 +79,4 @@ - - - - - - diff --git a/app/externalModules.d.ts b/app/externalModules.d.ts index c567b55e9..ff2958b34 100644 --- a/app/externalModules.d.ts +++ b/app/externalModules.d.ts @@ -9,7 +9,6 @@ declare module 'react-native-config-reader'; declare module 'react-native-keycommands'; declare module 'react-native-mime-types'; declare module 'react-native-restart'; -declare module 'react-native-jitsi-meet'; declare module 'rn-root-view'; declare module 'react-native-math-view'; declare module '@env' { diff --git a/app/lib/constants/index.ts b/app/lib/constants/index.ts index 1d8d67b30..32fb814f9 100644 --- a/app/lib/constants/index.ts +++ b/app/lib/constants/index.ts @@ -11,3 +11,4 @@ export * from './messageTypeLoad'; export * from './notifications'; export * from './defaultSettings'; export * from './tablet'; +export * from './userAgent'; diff --git a/app/lib/constants/userAgent.ts b/app/lib/constants/userAgent.ts new file mode 100644 index 000000000..f550b8948 --- /dev/null +++ b/app/lib/constants/userAgent.ts @@ -0,0 +1,5 @@ +import { isIOS } from '../methods/helpers'; + +export const userAgent = isIOS + ? 'Mozilla/5.0 (iPhone; CPU iPhone OS 15_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Mobile/15E148 Safari/604.1' + : 'Mozilla/5.0 (Linux; Android 12; SM-A315G) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Mobile Safari/537.36'; diff --git a/app/views/AuthenticationWebView.tsx b/app/views/AuthenticationWebView.tsx index 340f291a6..894c524b9 100644 --- a/app/views/AuthenticationWebView.tsx +++ b/app/views/AuthenticationWebView.tsx @@ -10,15 +10,12 @@ import { OutsideModalParamList } from '../stacks/types'; import StatusBar from '../containers/StatusBar'; import ActivityIndicator from '../containers/ActivityIndicator'; import { TSupportedThemes, withTheme } from '../theme'; -import { debounce, isIOS } from '../lib/methods/helpers'; +import { userAgent } from '../lib/constants'; +import { debounce } from '../lib/methods/helpers'; import * as HeaderButton from '../containers/HeaderButton'; import { Services } from '../lib/services'; import { IApplicationState, ICredentials } from '../definitions'; -const userAgent = isIOS - ? 'Mozilla/5.0 (iPhone; CPU iPhone OS 15_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Mobile/15E148 Safari/604.1' - : 'Mozilla/5.0 (Linux; Android 12; SM-A315G) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Mobile Safari/537.36'; - // iframe uses a postMessage to send the token to the client // We'll handle this sending the token to the hash of the window.location // https://docs.rocket.chat/guides/developer-guides/iframe-integration/authentication#iframe-url diff --git a/app/views/JitsiMeetView.d.ts b/app/views/JitsiMeetView.d.ts deleted file mode 100644 index c1ad42e90..000000000 --- a/app/views/JitsiMeetView.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import React from 'react'; - -declare const JitsiMeetView: React.SFC<>; - -export default JitsiMeetView; diff --git a/app/views/JitsiMeetView.ios.tsx b/app/views/JitsiMeetView.ios.tsx deleted file mode 100644 index d4f0c4c72..000000000 --- a/app/views/JitsiMeetView.ios.tsx +++ /dev/null @@ -1,74 +0,0 @@ -// @ts-ignore -// eslint-disable-next-line import/no-unresolved -import JitsiMeet from '@socialcode-rob1/react-native-jitsimeet-custom'; -import React, { useEffect } from 'react'; -import { RouteProp, useNavigation, useRoute } from '@react-navigation/native'; - -import RCActivityIndicator from '../containers/ActivityIndicator'; -import { useAppSelector } from '../lib/hooks'; -import { events, logEvent } from '../lib/methods/helpers/log'; -import { getUserSelector } from '../selectors/login'; -import { ChatsStackParamList } from '../stacks/types'; -import { endVideoConfTimer, initVideoConfTimer } from '../lib/methods/videoConfTimer'; - -const formatUrl = (url: string, baseUrl: string, uriSize: number, avatarAuthURLFragment: string) => - `${baseUrl}/avatar/${url}?format=png&width=${uriSize}&height=${uriSize}${avatarAuthURLFragment}`; - -const JitsiMeetView = (): React.ReactElement => { - const { goBack } = useNavigation(); - const { - params: { url, onlyAudio, videoConf, rid } - } = useRoute>(); - const user = useAppSelector(state => getUserSelector(state)); - const baseUrl = useAppSelector(state => state.server.server); - - useEffect(() => { - initJitsi(); - }, []); - - const initJitsi = async () => { - const audioOnly = onlyAudio ?? false; - const { name, id: userId, token, username } = user; - const avatarAuthURLFragment = `&rc_token=${token}&rc_uid=${userId}`; - const avatar = formatUrl(username, baseUrl, 100, avatarAuthURLFragment); - - const userInfo = { - displayName: name as string, - avatar - }; - const regex = /(?:\/.*\/)(.*)/; - const urlWithoutServer = regex.exec(url)![1]; - const serverUrl = url.replace(`/${urlWithoutServer}`, ''); - const room = (url.includes('jwt=') ? urlWithoutServer.split('jwt=')[0] : urlWithoutServer.split('#')[0]).replace('?', ''); - const jwtToken = url.includes('jwt=') ? url.substring(url.indexOf('jwt=') + 4, url.lastIndexOf('#config')) : undefined; - const conferenceOptions = { - room, - serverUrl, - userInfo: { - displayName: userInfo.displayName, - avatar: userInfo.avatar - }, - subject: room, - audioOnly, - audioMuted: false, - videoMuted: audioOnly, - token: jwtToken, - featureFlags: { - 'calendar.enabled': false - }, - configOverrides: { - 'breakoutRooms.hideAddRoomButton': false - } - }; - logEvent(videoConf ? events.LIVECHAT_VIDEOCONF_JOIN : events.JM_CONFERENCE_JOIN); - if (!videoConf) initVideoConfTimer(rid); - await JitsiMeet.launchJitsiMeetView(conferenceOptions); - logEvent(videoConf ? events.LIVECHAT_VIDEOCONF_TERMINATE : events.JM_CONFERENCE_TERMINATE); - if (!videoConf) endVideoConfTimer(); - goBack(); - }; - - return ; -}; - -export default JitsiMeetView; diff --git a/app/views/JitsiMeetView.android.tsx b/app/views/JitsiMeetView.tsx similarity index 60% rename from app/views/JitsiMeetView.android.tsx rename to app/views/JitsiMeetView.tsx index 45265494d..9b5f5e4d7 100644 --- a/app/views/JitsiMeetView.android.tsx +++ b/app/views/JitsiMeetView.tsx @@ -1,18 +1,17 @@ import { activateKeepAwake, deactivateKeepAwake } from 'expo-keep-awake'; import React from 'react'; -import { BackHandler, NativeEventSubscription } from 'react-native'; -import { isAppInstalled, openAppWithUri } from 'react-native-send-intent'; +import { BackHandler, Linking, NativeEventSubscription, SafeAreaView } from 'react-native'; import WebView from 'react-native-webview'; -import { WebViewMessage, WebViewNavigation } from 'react-native-webview/lib/WebViewTypes'; +import { WebViewNavigation } from 'react-native-webview/lib/WebViewTypes'; import { IBaseScreen } from '../definitions'; +import { userAgent } from '../lib/constants'; +import { isIOS } from '../lib/methods/helpers'; import { events, logEvent } from '../lib/methods/helpers/log'; import { endVideoConfTimer, initVideoConfTimer } from '../lib/methods/videoConfTimer'; import { ChatsStackParamList } from '../stacks/types'; import { withTheme } from '../theme'; -const JITSI_INTENT = 'org.jitsi.meet'; - type TJitsiMeetViewProps = IBaseScreen; class JitsiMeetView extends React.Component { @@ -29,19 +28,8 @@ class JitsiMeetView extends React.Component { } componentDidMount() { - const { route, navigation } = this.props; - isAppInstalled(JITSI_INTENT) - .then(function (isInstalled) { - if (isInstalled) { - const callUrl = route.params.url.replace(/^https?:\/\//, '').split('#')[0]; - openAppWithUri(`intent://${callUrl}#Intent;scheme=${JITSI_INTENT};package=${JITSI_INTENT};end`) - .then(() => navigation.pop()) - .catch(() => {}); - } - }) - .catch(() => {}); + this.handleJitsiApp(); this.onConferenceJoined(); - this.backHandler = BackHandler.addEventListener('hardwareBackPress', () => true); activateKeepAwake(); } @@ -50,10 +38,24 @@ class JitsiMeetView extends React.Component { if (!this.videoConf) { endVideoConfTimer(); } - this.backHandler.remove(); + if (this.backHandler) { + this.backHandler.remove(); + } deactivateKeepAwake(); } + handleJitsiApp = async () => { + const { route, navigation } = this.props; + const callUrl = route.params.url.replace(/^https?:\/\//, ''); + try { + await Linking.openURL(`org.jitsi.meet://${callUrl}`); + navigation.pop(); + } catch (error) { + // As the jitsi app was not opened disable the backhandler on android + this.backHandler = BackHandler.addEventListener('hardwareBackPress', () => true); + } + }; + // Jitsi Update Timeout needs to be called every 10 seconds to make sure // call is not ended and is available to web users. onConferenceJoined = () => { @@ -63,28 +65,36 @@ class JitsiMeetView extends React.Component { } }; - onNavigationStateChange = (webViewState: WebViewNavigation | WebViewMessage) => { + onNavigationStateChange = (webViewState: WebViewNavigation) => { const { navigation, route } = this.props; const jitsiRoomId = route.params.url ?.split(/^https?:\/\//)[1] ?.split('#')[0] ?.split('/')[1]; if ((jitsiRoomId && !webViewState.url.includes(jitsiRoomId)) || webViewState.url.includes('close')) { - navigation.pop(); + if (isIOS) { + if (webViewState.navigationType) { + navigation.pop(); + } + } else { + navigation.pop(); + } } }; render() { return ( - this.onNavigationStateChange(nativeEvent)} - onNavigationStateChange={this.onNavigationStateChange} - style={{ flex: 1 }} - javaScriptEnabled - domStorageEnabled - mediaPlaybackRequiresUserAction={false} - /> + + + ); } } diff --git a/e2e/data.ts b/e2e/data.ts index d5c314b62..4c5569ddc 100644 --- a/e2e/data.ts +++ b/e2e/data.ts @@ -31,7 +31,7 @@ const data = { return { username: `user${randomVal}`, name: `user${randomVal}`, // FIXME: apply a different name - password: `password${randomVal}`, + password: `password@123${randomVal}`, email: `mobile+${randomVal}@rocket.chat` }; } diff --git a/e2e/tests/assorted/01-e2eencryption.spec.ts b/e2e/tests/assorted/01-e2eencryption.spec.ts index d88c78165..9879b70a8 100644 --- a/e2e/tests/assorted/01-e2eencryption.spec.ts +++ b/e2e/tests/assorted/01-e2eencryption.spec.ts @@ -108,7 +108,10 @@ describe('E2E Encryption', () => { }); it('should tap "How it works" and navigate', async () => { - await element(by.id('e2e-save-password-view-how-it-works').and(by.label('How It Works'))).tap(); + await waitFor(element(by[textMatcher]('How It Works')).atIndex(0)) + .toExist() + .withTimeout(1000); + await element(by.id('e2e-save-password-view-how-it-works')).tap(); await waitFor(element(by.id('e2e-how-it-works-view'))) .toBeVisible() .withTimeout(2000); @@ -116,7 +119,10 @@ describe('E2E Encryption', () => { }); it('should tap "Save my password" and close modal', async () => { - await element(by.id('e2e-save-password-view-saved-password').and(by.label('I Saved My E2E Password'))).tap(); + await waitFor(element(by[textMatcher]('I Saved My E2E Password')).atIndex(0)) + .toExist() + .withTimeout(1000); + await element(by.id('e2e-save-password-view-saved-password')).tap(); await sleep(300); // wait for animation await waitFor(element(by.id('rooms-list-view'))) .toBeVisible() @@ -237,8 +243,14 @@ describe('E2E Encryption', () => { .toBeVisible() .withTimeout(2000); await expect(element(by.id('e2e-encryption-security-view-password'))).toExist(); - await expect(element(by.id('e2e-encryption-security-view-change-password').and(by.label('Save Changes')))).toExist(); - await expect(element(by.id('e2e-encryption-security-view-reset-key').and(by.label('Reset E2E Key')))).toExist(); + await waitFor(element(by[textMatcher]('Save Changes')).atIndex(0)) + .toExist() + .withTimeout(1000); + await expect(element(by.id('e2e-encryption-security-view-change-password'))).toExist(); + await waitFor(element(by[textMatcher]('Reset E2E Key')).atIndex(0)) + .toExist() + .withTimeout(1000); + await expect(element(by.id('e2e-encryption-security-view-reset-key'))).toExist(); }); }); @@ -330,7 +342,10 @@ describe('E2E Encryption', () => { await waitFor(element(by.id('e2e-encryption-security-view'))) .toBeVisible() .withTimeout(2000); - await element(by.id('e2e-encryption-security-view-reset-key').and(by.label('Reset E2E Key'))).tap(); + await waitFor(element(by[textMatcher]('Reset E2E Key')).atIndex(0)) + .toExist() + .withTimeout(1000); + await element(by.id('e2e-encryption-security-view-reset-key')).tap(); await waitFor(element(by[textMatcher]('Are you sure?'))) .toExist() .withTimeout(2000); diff --git a/e2e/tests/assorted/12-i18n.spec.ts b/e2e/tests/assorted/12-i18n.spec.ts index bbf4df4b2..2ef7531d8 100644 --- a/e2e/tests/assorted/12-i18n.spec.ts +++ b/e2e/tests/assorted/12-i18n.spec.ts @@ -1,9 +1,10 @@ import Detox, { device, waitFor, element, by, expect } from 'detox'; -import { navigateToLogin, login } from '../../helpers/app'; +import { navigateToLogin, login, TTextMatcher, platformTypes } from '../../helpers/app'; import { createRandomUser, ITestUser } from '../../helpers/data_setup'; const defaultLaunchArgs = { permissions: { notifications: 'YES' } } as Detox.DeviceLaunchAppConfig; +let textMatcher: TTextMatcher; const navToLanguage = async () => { await waitFor(element(by.id('rooms-list-view'))) @@ -28,6 +29,9 @@ const navToLanguage = async () => { describe('i18n', () => { describe('OS language', () => { + beforeAll(() => { + ({ textMatcher } = platformTypes[device.getPlatform()]); + }); it("OS set to 'en' and proper translate to 'en'", async () => { // if (device.getPlatform() === 'android') { // return; // FIXME: Passing language with launch parameters doesn't work with Android @@ -43,7 +47,10 @@ describe('i18n', () => { await waitFor(element(by.id('new-server-view'))) .toBeVisible() .withTimeout(20000); - await expect(element(by.id('new-server-view-open').and(by.label('Join our open workspace')))).toBeVisible(); + await expect(element(by.id('new-server-view-open'))).toBeVisible(); + await waitFor(element(by[textMatcher]('Join our open workspace')).atIndex(0)) + .toExist() + .withTimeout(1000); }); it("OS set to unavailable language and fallback to 'en'", async () => { @@ -60,7 +67,10 @@ describe('i18n', () => { await waitFor(element(by.id('new-server-view'))) .toBeVisible() .withTimeout(20000); - await expect(element(by.id('new-server-view-open').and(by.label('Join our open workspace')))).toBeVisible(); + await expect(element(by.id('new-server-view-open'))).toBeVisible(); + await waitFor(element(by[textMatcher]('Join our open workspace')).atIndex(0)) + .toExist() + .withTimeout(1000); }); /** diff --git a/e2e/tests/room/09-jumptomessage.spec.ts b/e2e/tests/room/09-jumptomessage.spec.ts index 84736464f..12ad0b67d 100644 --- a/e2e/tests/room/09-jumptomessage.spec.ts +++ b/e2e/tests/room/09-jumptomessage.spec.ts @@ -48,6 +48,13 @@ async function waitForLoading() { // .withTimeout(10000); } +function getIndex() { + if (device.getPlatform() === 'android') { + return 1; + } + return 0; +} + describe('Room', () => { beforeAll(async () => { await device.launchApp({ permissions: { notifications: 'YES' }, delete: true }); @@ -123,11 +130,11 @@ describe('Room', () => { .toExist() .withTimeout(5000); await element(by.id('search-message-view-input')).replaceText('30'); - await waitFor(element(by[textMatcher]('30')).atIndex(1)) + await waitFor(element(by[textMatcher]('30')).atIndex(getIndex())) .toExist() .withTimeout(30000); await sleep(1000); - await element(by[textMatcher]('30')).atIndex(1).tap(); + await element(by[textMatcher]('30')).atIndex(getIndex()).tap(); await waitForLoading(); await waitFor(element(by[textMatcher]('30')).atIndex(0)) .toExist() @@ -267,10 +274,10 @@ describe('Threads', () => { .toExist() .withTimeout(5000); await element(by.id('search-message-view-input')).replaceText('to be searched'); - await waitFor(element(by[textMatcher]('to be searched')).atIndex(1)) + await waitFor(element(by[textMatcher]('to be searched')).atIndex(getIndex())) .toExist() .withTimeout(30000); - await element(by[textMatcher]('to be searched')).atIndex(1).tap(); + await element(by[textMatcher]('to be searched')).atIndex(getIndex()).tap(); await expectThreadMessages('to be searched'); }); diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 145098036..41e078640 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -107,9 +107,6 @@ PODS: - GoogleUtilities/Logger - hermes-engine (0.11.0) - iosMath (0.9.4) - - JitsiMeetSDKLite (7.0.1-lite): - - JitsiWebRTC (~> 106.0) - - JitsiWebRTC (106.0.0) - KeyCommands (2.0.3): - React - libevent (2.1.12) @@ -366,9 +363,6 @@ PODS: - React-Core - react-native-document-picker (8.1.2): - React-Core - - react-native-jitsimeet-custom (2.5.0): - - JitsiMeetSDKLite (= 7.0.1-lite) - - React-Core - react-native-mmkv-storage (0.8.0): - MMKV (= 1.2.13) - React-Core @@ -630,7 +624,6 @@ DEPENDENCIES: - "react-native-cameraroll (from `../node_modules/@react-native-community/cameraroll`)" - "react-native-cookies (from `../node_modules/@react-native-cookies/cookies`)" - react-native-document-picker (from `../node_modules/react-native-document-picker`) - - "react-native-jitsimeet-custom (from `../node_modules/@socialcode-rob1/react-native-jitsimeet-custom`)" - react-native-mmkv-storage (from `../node_modules/react-native-mmkv-storage`) - "react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)" - react-native-notifications (from `../node_modules/react-native-notifications`) @@ -696,8 +689,6 @@ SPEC REPOS: - GoogleUtilities - hermes-engine - iosMath - - JitsiMeetSDKLite - - JitsiWebRTC - libevent - libwebp - MMKV @@ -784,8 +775,6 @@ EXTERNAL SOURCES: :path: "../node_modules/@react-native-cookies/cookies" react-native-document-picker: :path: "../node_modules/react-native-document-picker" - react-native-jitsimeet-custom: - :path: "../node_modules/@socialcode-rob1/react-native-jitsimeet-custom" react-native-mmkv-storage: :path: "../node_modules/react-native-mmkv-storage" react-native-netinfo: @@ -917,8 +906,6 @@ SPEC CHECKSUMS: GoogleUtilities: c2bdc4cf2ce786c4d2e6b3bcfd599a25ca78f06f hermes-engine: 84e3af1ea01dd7351ac5d8689cbbea1f9903ffc3 iosMath: f7a6cbadf9d836d2149c2a84c435b1effc244cba - JitsiMeetSDKLite: d59573336ce887ec52327a9927aa8443f560d0b9 - JitsiWebRTC: f441eb0e2d67f0588bf24e21c5162e97342714fb KeyCommands: f66c535f698ed14b3d3a4e58859d79a827ea907e libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 libwebp: f62cb61d0a484ba548448a4bd52aabf150ff6eef @@ -946,7 +933,6 @@ SPEC CHECKSUMS: react-native-cameraroll: 2957f2bce63ae896a848fbe0d5352c1bd4d20866 react-native-cookies: f54fcded06bb0cda05c11d86788020b43528a26c react-native-document-picker: f5ec1a712ca2a975c233117f044817bb8393cad4 - react-native-jitsimeet-custom: a57ca376bfc1c69f639b138f2de2a10e0ed42c04 react-native-mmkv-storage: 8ba3c0216a6df283ece11205b442a3e435aec4e5 react-native-netinfo: e849fc21ca2f4128a5726c801a82fc6f4a6db50d react-native-notifications: 83b4fd4a127a6c918fc846cae90da60f84819e44 diff --git a/ios/RocketChatRN.xcodeproj/project.pbxproj b/ios/RocketChatRN.xcodeproj/project.pbxproj index 1a3d604ee..53ac3f425 100644 --- a/ios/RocketChatRN.xcodeproj/project.pbxproj +++ b/ios/RocketChatRN.xcodeproj/project.pbxproj @@ -273,7 +273,6 @@ 56A64DDF0C1730D640D3931C /* libPods-defaults-NotificationService.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-defaults-NotificationService.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 60B2A6A31FC4588700BD58E5 /* RocketChatRN.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = RocketChatRN.entitlements; path = RocketChatRN/RocketChatRN.entitlements; sourceTree = ""; }; 6346D438F967C4A0CF0218B4 /* libPods-defaults-RocketChatRN.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-defaults-RocketChatRN.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 65360F272979AA1500778C04 /* JitsiMeetViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = JitsiMeetViewController.swift; path = "../node_modules/@socialcode-rob1/react-native-jitsimeet-custom/ios/JitsiMeetViewController.swift"; sourceTree = ""; }; 7A006F13229C83B600803143 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; 7A0D62D1242AB187006D5C06 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; 7A14FCEC257FEB3A005BDCD4 /* Experimental.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Experimental.xcassets; sourceTree = ""; }; @@ -359,7 +358,6 @@ 13B07FAE1A68108700A75B9A /* RocketChatRN */ = { isa = PBXGroup; children = ( - 65360F272979AA1500778C04 /* JitsiMeetViewController.swift */, 7A006F13229C83B600803143 /* GoogleService-Info.plist */, 60B2A6A31FC4588700BD58E5 /* RocketChatRN.entitlements */, 008F07F21AC5B25A0029DE68 /* main.jsbundle */, @@ -945,15 +943,11 @@ ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-defaults-RocketChatRN/Pods-defaults-RocketChatRN-frameworks.sh", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/JitsiMeetSDKLite/JitsiMeetSDK.framework/JitsiMeetSDK", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/JitsiWebRTC/WebRTC.framework/WebRTC", "${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL", "${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/hermes.framework/hermes", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/JitsiMeetSDK.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/WebRTC.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework", ); @@ -1306,15 +1300,11 @@ ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-defaults-Rocket.Chat/Pods-defaults-Rocket.Chat-frameworks.sh", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/JitsiMeetSDKLite/JitsiMeetSDK.framework/JitsiMeetSDK", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/JitsiWebRTC/WebRTC.framework/WebRTC", "${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL", "${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/hermes.framework/hermes", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/JitsiMeetSDK.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/WebRTC.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework", ); diff --git a/metro.config.js b/metro.config.js index ffdaf6bcd..7ee9a5e10 100644 --- a/metro.config.js +++ b/metro.config.js @@ -21,7 +21,6 @@ module.exports = { }, maxWorkers: 2, resolver: { - blocklistRE: blocklist([/ios\/Pods\/JitsiMeetSDK\/Frameworks\/JitsiMeet.framework\/assets\/node_modules\/react-native\/.*/]), resolverMainFields: ['sbmodern', 'react-native', 'browser', 'main'], sourceExts: process.env.RUNNING_E2E_TESTS ? ['mock.ts', ...defaultSourceExts] : defaultSourceExts } diff --git a/package.json b/package.json index 0454bad70..23d49b56e 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,6 @@ "@rocket.chat/message-parser": "^0.31.14", "@rocket.chat/sdk": "RocketChat/Rocket.Chat.js.SDK#mobile", "@rocket.chat/ui-kit": "^0.31.19", - "@socialcode-rob1/react-native-jitsimeet-custom": "socialcode-rob1/react-native-jitsimeet-custom.git", "bytebuffer": "^5.0.1", "color2k": "1.2.4", "commonmark": "git+https://github.com/RocketChat/commonmark.js.git", @@ -127,7 +126,6 @@ "react-native-safe-area-context": "3.2.0", "react-native-screens": "3.13.1", "react-native-scrollable-tab-view": "ptomasroos/react-native-scrollable-tab-view", - "react-native-send-intent": "^1.3.0", "react-native-simple-crypto": "RocketChat/react-native-simple-crypto#0.5.1", "react-native-skeleton-placeholder": "^5.2.3", "react-native-slowlog": "^1.0.2", diff --git a/patches/@socialcode-rob1+react-native-jitsimeet-custom+2.5.0.patch b/patches/@socialcode-rob1+react-native-jitsimeet-custom+2.5.0.patch deleted file mode 100644 index 52777ec0c..000000000 --- a/patches/@socialcode-rob1+react-native-jitsimeet-custom+2.5.0.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/node_modules/@socialcode-rob1/react-native-jitsimeet-custom/react-native-jitsimeet-custom.podspec b/node_modules/@socialcode-rob1/react-native-jitsimeet-custom/react-native-jitsimeet-custom.podspec -index 80a584b..5b2f71c 100644 ---- a/node_modules/@socialcode-rob1/react-native-jitsimeet-custom/react-native-jitsimeet-custom.podspec -+++ b/node_modules/@socialcode-rob1/react-native-jitsimeet-custom/react-native-jitsimeet-custom.podspec -@@ -16,5 +16,5 @@ Pod::Spec.new do |s| - s.source_files = "ios/**/*.{h,m,mm,swift}" - - s.dependency "React-Core" -- s.dependency 'JitsiMeetSDK', '6.2.2' -+ s.dependency 'JitsiMeetSDKLite', '7.0.1-lite' - end diff --git a/react-native.config.js b/react-native.config.js index 137b05c26..9e78b41ad 100644 --- a/react-native.config.js +++ b/react-native.config.js @@ -14,11 +14,6 @@ module.exports = { platforms: { android: null } - }, - '@socialcode-rob1/react-native-jitsimeet-custom': { - platforms: { - android: null - } } } }; diff --git a/yarn.lock b/yarn.lock index 5c777ce75..228407791 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5431,10 +5431,6 @@ dependencies: "@sinonjs/commons" "^1.7.0" -"@socialcode-rob1/react-native-jitsimeet-custom@socialcode-rob1/react-native-jitsimeet-custom.git": - version "2.5.0" - resolved "https://codeload.github.com/socialcode-rob1/react-native-jitsimeet-custom/tar.gz/b1f57cd065028fef2e806824e176d2b54e12cfaf" - "@storybook/addon-storyshots@6.3": version "6.3.13" resolved "https://registry.yarnpkg.com/@storybook/addon-storyshots/-/addon-storyshots-6.3.13.tgz#282a48880e5074baea7b84f5b091591eb21a9485" @@ -17581,11 +17577,6 @@ react-native-scrollable-tab-view@ptomasroos/react-native-scrollable-tab-view: prop-types "^15.6.0" react-timer-mixin "^0.13.3" -react-native-send-intent@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/react-native-send-intent/-/react-native-send-intent-1.3.0.tgz#d8c7898827da1b8b10e25a645ce6802d1a0b440c" - integrity sha512-ODTX7BHITFxdcAL0K2iHfa3qVYnqG8GPcv1NbLBNC1DyCaOSJiiGtVH6Kc5YBqzQ8+1pV9uN5nfQ5wyFgiq74g== - react-native-simple-crypto@RocketChat/react-native-simple-crypto#0.5.1: version "0.5.1" resolved "https://codeload.github.com/RocketChat/react-native-simple-crypto/tar.gz/dcf6eef5359c739d521371918e13a73f2ea6cb42"