Skip to content

Commit

Permalink
Replace jitsi_meet package with jitsi_meet_wrapper + increase iOS…
Browse files Browse the repository at this point in the history
… deployment target to 12.0 (#164)

## Description
I'm sure that the `jitsi_meet` package is the reason why the iOS build is failing in #153. The problem is that the `jitsi_meet` package isn't maintained anymore. So it's difficult to find a fix so that #153 can be merged.

There are also several issues that Android 12 is not supported anymore by the package (gunschu/jitsi_meet#376, gunschu/jitsi_meet#368, gunschu/jitsi_meet#366).

There is a folk of `jitsi_meet` called `jitsi_meet_wrapper` which has better code and is maintained. So I migrated to this package (thanks to @saibotma 💙).

One big disadvantage: `jitsi_meet_wrapper` uses the current Jitsi iOS SDK which requires +12.0. This means we need to drop the support for iOS 11.0 (other option would be to remove the Jitsi Feature for all users) 😞

## Demo
| iOS | Android |
|-|-|
| <img width="475" alt="image" src="https://user-images.githubusercontent.com/24459435/167040941-3aa87468-5779-4e10-99ea-669f4ec90e1d.png"> | <img width="522" alt="image" src="https://user-images.githubusercontent.com/24459435/167248265-8f3c21e1-5dbd-403c-975a-17508e2bc10f.png"> |
  • Loading branch information
nilsreichardt authored May 7, 2022
1 parent 17e8962 commit 54f45cc
Show file tree
Hide file tree
Showing 8 changed files with 72 additions and 90 deletions.
2 changes: 1 addition & 1 deletion app/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<uses-permission android:name="com.android.vending.BILLING"/>

<!-- Ignore minSdk by Jitsi Plugin, to run the app with Android 4 and 5 -->
<uses-sdk tools:overrideLibrary="com.gunschu.jitsi_meet, org.jitsi.meet.sdk, co.apptailor.googlesignin, com.calendarevents, com.reactnativecommunity.asyncstorage, com.reactnativecommunity.netinfo, com.rnimmersive, com.corbt.keepawake, com.BV.LinearGradient, com.horcrux.svg, com.oney.WebRTCModule, com.ocetnik.timer, com.kevinresol.react_native_default_preference, com.learnium.RNDeviceInfo"/>
<uses-sdk tools:overrideLibrary="dev.saibotma.jitsi_meet_wrapper, org.jitsi.meet.sdk, co.apptailor.googlesignin, com.calendarevents, com.reactnativecommunity.asyncstorage, com.reactnativecommunity.netinfo, com.rnimmersive, com.corbt.keepawake, com.BV.LinearGradient, com.horcrux.svg, com.oney.WebRTCModule, com.ocetnik.timer, com.kevinresol.react_native_default_preference, com.learnium.RNDeviceInfo, com.amplitude.reactnative, com.reactnativegooglesignin, com.reactnativecommunity.clipboard, com.swmansion.gesturehandler.react, org.linusu, org.reactnative.maskedview, com.reactnativepagerview, com.oblador.performance, com.swmansion.reanimated, com.th3rdwave.safeareacontext, com.swmansion.rnscreens, com.reactnativecommunity.slider, org.devio.rn.splashscreen, com.brentvatne.react, com.reactnativecommunity.webview"/>

<application android:requestLegacyExternalStorage="true" android:label="@string/app_name" tools:overrideLibrary="com.gunschu.jitsi_meet" android:icon="@mipmap/ic_launcher">
<meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/statusbar_notification" />
Expand Down
2 changes: 1 addition & 1 deletion app/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.3.70'
ext.kotlin_version = '1.6.10'

repositories {
google()
Expand Down
12 changes: 3 additions & 9 deletions app/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Uncomment this line to define a global platform for your project
platform :ios, '11.0'
# We must set iOS to +12.0 because the Jitsi SDK requires it
# (https://jitsi.github.io/handbook/docs/dev-guide/dev-guide-ios-sdk/).
platform :ios, '12.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down Expand Up @@ -41,13 +42,6 @@ post_install do |installer|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
config.build_settings['SWIFT_VERSION'] = '5.0'

# Is needed to be able to run iOS on a simulator on a ARM system (e. g.
# Apple Silicon), see
# https://github.com/gunschu/jitsi_meet/issues/330#issuecomment-968076108
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
end
20 changes: 10 additions & 10 deletions app/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,10 @@ PODS:
- Flutter
- integration_test (0.0.1):
- Flutter
- jitsi_meet (0.0.1):
- jitsi_meet_wrapper (0.0.1):
- Flutter
- JitsiMeetSDK (= 3.3.0)
- JitsiMeetSDK (3.3.0)
- JitsiMeetSDK (= 5.0.2)
- JitsiMeetSDK (5.0.2)
- libwebp (1.2.1):
- libwebp/demux (= 1.2.1)
- libwebp/mux (= 1.2.1)
Expand Down Expand Up @@ -375,7 +375,7 @@ DEPENDENCIES:
- google_sign_in (from `.symlinks/plugins/google_sign_in/ios`)
- image_picker (from `.symlinks/plugins/image_picker/ios`)
- integration_test (from `.symlinks/plugins/integration_test/ios`)
- jitsi_meet (from `.symlinks/plugins/jitsi_meet/ios`)
- jitsi_meet_wrapper (from `.symlinks/plugins/jitsi_meet_wrapper/ios`)
- native_pdf_renderer (from `.symlinks/plugins/native_pdf_renderer/ios`)
- open_file (from `.symlinks/plugins/open_file/ios`)
- package_info (from `.symlinks/plugins/package_info/ios`)
Expand Down Expand Up @@ -482,8 +482,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/image_picker/ios"
integration_test:
:path: ".symlinks/plugins/integration_test/ios"
jitsi_meet:
:path: ".symlinks/plugins/jitsi_meet/ios"
jitsi_meet_wrapper:
:path: ".symlinks/plugins/jitsi_meet_wrapper/ios"
native_pdf_renderer:
:path: ".symlinks/plugins/native_pdf_renderer/ios"
open_file:
Expand Down Expand Up @@ -528,7 +528,7 @@ SPEC CHECKSUMS:
device_info: d7d233b645a32c40dfdc212de5cf646ca482f175
DKImagePickerController: b5eb7f7a388e4643264105d648d01f727110fc3d
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
fast_rsa: 22fec92c481d28d1624f3be7829841658759ca52
fast_rsa: 0a752e284bd5641b063de5ba4e538a1b055e9ea8
file_picker: 3e6c3790de664ccf9b882732d9db5eaf6b8d4eb1
Firebase: 13d8d96499e2635428d5bf0ec675df21f95d9a95
firebase_analytics: 7a7528bb2abf4ca22cff7a57bbf909dcab73e13d
Expand Down Expand Up @@ -568,8 +568,8 @@ SPEC CHECKSUMS:
GTMSessionFetcher: 43748f93435c2aa068b1cbe39655aaf600652e91
image_picker: 9aa50e1d8cdacdbed739e925b7eea16d014367e6
integration_test: 7db6d89f336f671dcbc7563ee27a5b08f6f8aee1
jitsi_meet: a797e5ffdbc1da9d424c52b1bfe3b2a803b05e31
JitsiMeetSDK: 3b1d3757f2166b28cd03f907b47091db064302b3
jitsi_meet_wrapper: f78c5a212de5dfbadcd81ce559217f3661a26ce7
JitsiMeetSDK: edcac8e2b92ee0c7f3e75bd0aefefbe9faccfc93
libwebp: 98a37e597e40bfdb4c911fc98f2c53d0b12d05fc
Mantle: 4c0ed6ce47c96eccc4dc3bb071deb3def0e2c3be
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
Expand All @@ -596,6 +596,6 @@ SPEC CHECKSUMS:
video_player: 9cc823b1d9da7e8427ee591e8438bfbcde500e6e
wakelock: d0fc7c864128eac40eba1617cb5264d9c940b46f

PODFILE CHECKSUM: 043a42efaa3cc041591ac017700c2c66164135b5
PODFILE CHECKSUM: f01f8cc3a09573f5dcc4b182c97727831629994f

COCOAPODS: 1.11.2
28 changes: 14 additions & 14 deletions app/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -369,20 +369,20 @@
"${BUILT_PRODUCTS_DIR}/flutter_native_timezone/flutter_native_timezone.framework",
"${BUILT_PRODUCTS_DIR}/image_picker/image_picker.framework",
"${BUILT_PRODUCTS_DIR}/integration_test/integration_test.framework",
"${BUILT_PRODUCTS_DIR}/jitsi_meet/jitsi_meet.framework",
"${BUILT_PRODUCTS_DIR}/jitsi_meet_wrapper/jitsi_meet_wrapper.framework",
"${BUILT_PRODUCTS_DIR}/libwebp/libwebp.framework",
"${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework",
"${BUILT_PRODUCTS_DIR}/native_pdf_renderer/native_pdf_renderer.framework",
"${BUILT_PRODUCTS_DIR}/open_file/open_file.framework",
"${BUILT_PRODUCTS_DIR}/package_info/package_info.framework",
"${BUILT_PRODUCTS_DIR}/package_info_plus/package_info_plus.framework",
"${BUILT_PRODUCTS_DIR}/path_provider/path_provider.framework",
"${BUILT_PRODUCTS_DIR}/path_provider_ios/path_provider_ios.framework",
"${BUILT_PRODUCTS_DIR}/purchases_flutter/purchases_flutter.framework",
"${BUILT_PRODUCTS_DIR}/share/share.framework",
"${BUILT_PRODUCTS_DIR}/shared_preferences/shared_preferences.framework",
"${BUILT_PRODUCTS_DIR}/shared_preferences_ios/shared_preferences_ios.framework",
"${BUILT_PRODUCTS_DIR}/sign_in_with_apple/sign_in_with_apple.framework",
"${BUILT_PRODUCTS_DIR}/sqflite/sqflite.framework",
"${BUILT_PRODUCTS_DIR}/url_launcher/url_launcher.framework",
"${BUILT_PRODUCTS_DIR}/url_launcher_ios/url_launcher_ios.framework",
"${BUILT_PRODUCTS_DIR}/video_player/video_player.framework",
"${BUILT_PRODUCTS_DIR}/wakelock/wakelock.framework",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/JitsiMeetSDK/JitsiMeetSDK.framework/JitsiMeetSDK",
Expand Down Expand Up @@ -429,20 +429,20 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_native_timezone.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/image_picker.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/integration_test.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/jitsi_meet.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/jitsi_meet_wrapper.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libwebp.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/native_pdf_renderer.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/open_file.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/package_info.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/package_info_plus.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_ios.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/purchases_flutter.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/share.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences_ios.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/sign_in_with_apple.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/sqflite.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher_ios.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/video_player.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/wakelock.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/JitsiMeetSDK.framework",
Expand Down Expand Up @@ -570,7 +570,7 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -659,7 +659,7 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -745,7 +745,7 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -829,7 +829,7 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -972,7 +972,7 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -1004,7 +1004,7 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
Expand Down
77 changes: 36 additions & 41 deletions app/lib/meeting/jitsi/jitsi_launcher.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
// SPDX-License-Identifier: EUPL-1.2

import 'package:jitsi_meet/jitsi_meet.dart';
import 'package:jitsi_meet_wrapper/jitsi_meet_wrapper.dart';
import 'package:meta/meta.dart';
import 'package:sharezone/meeting/jitsi/jitsi_auth.dart';
import 'package:url_launcher_extended/url_launcher_extended.dart';
Expand Down Expand Up @@ -48,46 +48,41 @@ class JitsiLauncher {
@required String meetingName,
@required String jwt,
}) async {
// Mithilfe der [FeatureFlagEnum] können bestimmte Features in der Jitsi UI
// deaktiviert werden. Diese Einschränken gelten jedoch nur für die Mobile
// Jitsi SDK. Für die Browser-Version müssen die Einschränkungen über die
// "interface_config.js" beim Server getroffen werden. Mehr Infos dazu in
// unserem Wiki:
// https://gitlab.com/codingbrain/sharezone/sharezone-app/-/wikis/Jitsi
final featureFlags = {
// Nutzer sollen nicht in dem Meeting die Option gezeigt bekommen, dass
// man andere Nutzer einladen kann, da das Beitreten über die
// Sharezone-App passieren soll.
FeatureFlagEnum.ADD_PEOPLE_ENABLED: false,
// Selber Kommentar wie bei [FeatureFlagEnum.ADD_PEOPLE_ENABLED]
FeatureFlagEnum.INVITE_ENABLED: false,
// "Call integration on Android (known as ConnectionService) has been
// disabled on the official Jitsi Meet app because it creates a lot of
// issues. You should disable it too to avoid these issues.""
// Kopiert aus der Beschreibung des jitsi_meet package.
FeatureFlagEnum.CALL_INTEGRATION_ENABLED: false,
// Ändern der Server-Url soll Nutzern verboten sein, da dies nicht
// vergesehen ist.

// Feature Flag ist in jitsi_meet/feature_flag/feature_flag_enum.dart
// vorhanden aber nicht in jitsi_meet platform_interface.
// Siehe https://github.com/gunschu/jitsi_meet/issues/332
// FeatureFlagEnum.SERVER_URL_CHANGE_ENABLED: false,

// Aufnehmen von Jitsi-Meetings wird serverseitig nicht unterstützt und
// würde sowieso mehrere rechtliche Fragen aufwerfen.
FeatureFlagEnum.RECORDING_ENABLED: false,
};

final options = JitsiMeetingOptions(room: meetingId)
..serverURL = _serverUrl
..subject = meetingName
..audioOnly = false
..audioMuted = false
..videoMuted = true
..token = jwt
..featureFlags.addAll(featureFlags);
await JitsiMeet.joinMeeting(options);
final options = JitsiMeetingOptions(
roomNameOrUrl: meetingId,
serverUrl: _serverUrl,
subject: meetingName,
isVideoMuted: true,
isAudioMuted: false,
isAudioOnly: false,
token: jwt,
// Mithilfe der [FeatureFlagEnum] können bestimmte Features in der Jitsi
// UI deaktiviert werden. Diese Einschränken gelten jedoch nur für die
// Mobile Jitsi SDK. Für die Browser-Version müssen die Einschränkungen
// über die "interface_config.js" beim Server getroffen werden. Mehr Infos
// dazu in unserem Wiki:
// https://gitlab.com/codingbrain/sharezone/sharezone-app/-/wikis/Jitsi
featureFlags: {
// Nutzer sollen nicht in dem Meeting die Option gezeigt bekommen, dass
// man andere Nutzer einladen kann, da das Beitreten über die
// Sharezone-App passieren soll.
FeatureFlag.isAddPeopleEnabled: false,
FeatureFlag.isInviteEnabled: false,
// Call-Integration wird von uns nicht unterstützt.
FeatureFlag.isCallIntegrationEnabled: false,
// Aufnehmen von Jitsi-Meetings wird serverseitig nicht unterstützt und
// würde sowieso mehrere rechtliche Fragen aufwerfen.
FeatureFlag.isRecordingEnabled: false,
// Ändern der Server-Url soll Nutzern verboten sein, da dies nicht
// vorgesehen ist.
FeatureFlag.isServerUrlChangeEnabled: false,
// Für Lehrkräfte würde es erschrecken, wenn Schüler plötzlich auf
// YouTube livestreamen. Aus diesem Grund sollte diese Option besser
// deaktiviert werden.
FeatureFlag.isLiveStreamingEnabled: false,
},
);
await JitsiMeetWrapper.joinMeeting(options: options);
}

/// Gibt die Meeting-URL zurück, die ein Browser aufruft, um sich mit dem
Expand Down
19 changes: 6 additions & 13 deletions app/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1032,27 +1032,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.3"
jitsi_meet:
jitsi_meet_wrapper:
dependency: "direct main"
description:
name: jitsi_meet
name: jitsi_meet_wrapper
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.0"
jitsi_meet_platform_interface:
version: "0.0.4"
jitsi_meet_wrapper_platform_interface:
dependency: transitive
description:
name: jitsi_meet_platform_interface
name: jitsi_meet_wrapper_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
jitsi_meet_web_plugin:
dependency: transitive
description:
name: jitsi_meet_web_plugin
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "0.0.2"
js:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ dependencies:
hausaufgabenheft_logik:
path: ../lib/hausaufgabenheft_logik
intl: ^0.17.0
jitsi_meet: ^4.0.0
jitsi_meet_wrapper: ^0.0.4
key_value_store:
path: ../lib/key_value_store
last_online_reporting:
Expand Down

0 comments on commit 54f45cc

Please sign in to comment.