├── .gitignore ├── .npmignore ├── ExampleApp ├── .buckconfig ├── .eslintrc.js ├── .flowconfig ├── .gitattributes ├── .gitignore ├── .prettierrc.js ├── .watchmanconfig ├── App.js ├── __tests__ │ └── App-test.js ├── android │ ├── app │ │ ├── .classpath │ │ ├── .project │ │ ├── .settings │ │ │ └── org.eclipse.buildship.core.prefs │ │ ├── _BUCK │ │ ├── build.gradle │ │ ├── build_defs.bzl │ │ ├── debug.keystore │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── debug │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── exemple │ │ │ │ └── ReactNativeFlipper.java │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── exemple │ │ │ │ ├── MainActivity.java │ │ │ │ └── MainApplication.java │ │ │ └── res │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ └── values │ │ │ ├── strings.xml │ │ │ └── styles.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle ├── app.json ├── babel.config.js ├── index.js ├── ios │ ├── Exemple-tvOS │ │ └── Info.plist │ ├── Exemple-tvOSTests │ │ └── Info.plist │ ├── Exemple.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── Exemple-tvOS.xcscheme │ │ │ └── Exemple.xcscheme │ ├── Exemple.xcworkspace │ │ └── contents.xcworkspacedata │ ├── Exemple │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Base.lproj │ │ │ └── LaunchScreen.xib │ │ ├── Images.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ │ └── Contents.json │ │ ├── Info.plist │ │ └── main.m │ ├── ExempleTests │ │ ├── ExempleTests.m │ │ └── Info.plist │ ├── Podfile │ └── Podfile.lock ├── metro.config.js ├── package.json └── yarn.lock ├── LICENSE ├── README.md ├── android ├── build.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── reactnativejitsimeet │ │ ├── IRNJitsiMeetViewReference.java │ │ ├── RNJitsiMeetConferenceOptions.java │ │ ├── RNJitsiMeetModule.java │ │ ├── RNJitsiMeetPackage.java │ │ ├── RNJitsiMeetUserInfo.java │ │ ├── RNJitsiMeetView.java │ │ ├── RNJitsiMeetViewManager.java │ │ └── RNOngoingConferenceTracker.java └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── index.android.js ├── index.ios.js ├── ios ├── RNJitsiMeet.xcodeproj │ └── project.pbxproj ├── RNJitsiMeetView.h ├── RNJitsiMeetView.m ├── RNJitsiMeetViewManager.h └── RNJitsiMeetViewManager.m ├── package.json └── react-native-jitsi-meet.podspec /.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | project.xcworkspace 24 | 25 | # Android/IntelliJ 26 | # 27 | build/ 28 | .idea 29 | .gradle 30 | local.properties 31 | *.iml 32 | 33 | # node.js 34 | # 35 | node_modules/ 36 | npm-debug.log 37 | yarn-error.log 38 | 39 | # BUCK 40 | buck-out/ 41 | \.buckd/ 42 | **/*.keystore 43 | 44 | # fastlane 45 | # 46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 47 | # screenshots whenever they are needed. 48 | # For more information about the recommended setup visit: 49 | # https://docs.fastlane.tools/best-practices/source-control/ 50 | 51 | */fastlane/report.xml 52 | */fastlane/Preview.html 53 | */fastlane/screenshots 54 | 55 | *.jsbundle 56 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | *.log 3 | 4 | # Dependency directory 5 | node_modules 6 | 7 | example 8 | 9 | .editorconfig -------------------------------------------------------------------------------- /ExampleApp/.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /ExampleApp/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: '@react-native-community', 4 | }; 5 | -------------------------------------------------------------------------------- /ExampleApp/.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | ; We fork some components by platform 3 | .*/*[.]android.js 4 | 5 | ; Ignore "BUCK" generated dirs 6 | /\.buckd/ 7 | 8 | ; Ignore polyfills 9 | node_modules/react-native/Libraries/polyfills/.* 10 | 11 | ; These should not be required directly 12 | ; require from fbjs/lib instead: require('fbjs/lib/warning') 13 | node_modules/warning/.* 14 | 15 | ; Flow doesn't support platforms 16 | .*/Libraries/Utilities/LoadingView.js 17 | 18 | [untyped] 19 | .*/node_modules/@react-native-community/cli/.*/.* 20 | 21 | [include] 22 | 23 | [libs] 24 | node_modules/react-native/interface.js 25 | node_modules/react-native/flow/ 26 | 27 | [options] 28 | emoji=true 29 | 30 | esproposal.optional_chaining=enable 31 | esproposal.nullish_coalescing=enable 32 | 33 | module.file_ext=.js 34 | module.file_ext=.json 35 | module.file_ext=.ios.js 36 | 37 | munge_underscores=true 38 | 39 | module.name_mapper='^react-native/\(.*\)$' -> '/node_modules/react-native/\1' 40 | module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '/node_modules/react-native/Libraries/Image/RelativeImageStub' 41 | 42 | suppress_type=$FlowIssue 43 | suppress_type=$FlowFixMe 44 | suppress_type=$FlowFixMeProps 45 | suppress_type=$FlowFixMeState 46 | 47 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\) 48 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+ 49 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError 50 | 51 | [lints] 52 | sketchy-null-number=warn 53 | sketchy-null-mixed=warn 54 | sketchy-number=warn 55 | untyped-type-import=warn 56 | nonstrict-import=warn 57 | deprecated-type=warn 58 | unsafe-getters-setters=warn 59 | inexact-spread=warn 60 | unnecessary-invariant=warn 61 | signature-verification-failure=warn 62 | deprecated-utility=error 63 | 64 | [strict] 65 | deprecated-type 66 | nonstrict-import 67 | sketchy-null 68 | unclear-type 69 | unsafe-getters-setters 70 | untyped-import 71 | untyped-type-import 72 | 73 | [version] 74 | ^0.113.0 75 | -------------------------------------------------------------------------------- /ExampleApp/.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /ExampleApp/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | 24 | # Android/IntelliJ 25 | # 26 | build/ 27 | .idea 28 | .gradle 29 | local.properties 30 | *.iml 31 | 32 | # node.js 33 | # 34 | node_modules/ 35 | npm-debug.log 36 | yarn-error.log 37 | 38 | # BUCK 39 | buck-out/ 40 | \.buckd/ 41 | *.keystore 42 | !debug.keystore 43 | 44 | # fastlane 45 | # 46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 47 | # screenshots whenever they are needed. 48 | # For more information about the recommended setup visit: 49 | # https://docs.fastlane.tools/best-practices/source-control/ 50 | 51 | */fastlane/report.xml 52 | */fastlane/Preview.html 53 | */fastlane/screenshots 54 | 55 | # Bundle artifact 56 | *.jsbundle 57 | 58 | # CocoaPods 59 | /ios/Pods/ 60 | -------------------------------------------------------------------------------- /ExampleApp/.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | bracketSpacing: false, 3 | jsxBracketSameLine: true, 4 | singleQuote: true, 5 | trailingComma: 'all', 6 | }; 7 | -------------------------------------------------------------------------------- /ExampleApp/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /ExampleApp/App.js: -------------------------------------------------------------------------------- 1 | import React, { useEffect } from 'react'; 2 | import JitsiMeet, { JitsiMeetView } from 'react-native-jitsi-meet'; 3 | 4 | function App() { 5 | 6 | useEffect(() => { 7 | setTimeout(() => { 8 | const url = 'https://meet.jit.si/exemple'; 9 | const userInfo = { 10 | displayName: 'User', 11 | email: 'user@example.com', 12 | avatar: 'https:/gravatar.com/avatar/abc123', 13 | }; 14 | JitsiMeet.call(url, userInfo); 15 | /* Você também pode usar o JitsiMeet.audioCall (url) para chamadas apenas de áudio */ 16 | /* Você pode terminar programaticamente a chamada com JitsiMeet.endCall () */ 17 | }, 1000); 18 | }, []) 19 | 20 | useEffect(() => { 21 | return () => { 22 | JitsiMeet.endCall(); 23 | }; 24 | }); 25 | 26 | function onConferenceTerminated(nativeEvent) { 27 | /* Conference terminated event */ 28 | console.log(nativeEvent) 29 | } 30 | 31 | function onConferenceJoined(nativeEvent) { 32 | /* Conference joined event */ 33 | console.log(nativeEvent) 34 | } 35 | 36 | function onConferenceWillJoin(nativeEvent) { 37 | /* Conference will join event */ 38 | console.log(nativeEvent) 39 | } 40 | return ( 41 | onConferenceTerminated(e)} 43 | onConferenceJoined={e => onConferenceJoined(e)} 44 | onConferenceWillJoin={e => onConferenceWillJoin(e)} 45 | style={{ 46 | flex: 1, 47 | height: '100%', 48 | width: '100%', 49 | }} 50 | /> 51 | ) 52 | } 53 | export default App; -------------------------------------------------------------------------------- /ExampleApp/__tests__/App-test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import 'react-native'; 6 | import React from 'react'; 7 | import App from '../App'; 8 | 9 | // Note: test renderer must be required after react-native. 10 | import renderer from 'react-test-renderer'; 11 | 12 | it('renders correctly', () => { 13 | renderer.create(); 14 | }); 15 | -------------------------------------------------------------------------------- /ExampleApp/android/app/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /ExampleApp/android/app/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | app 4 | Project app created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.buildship.core.gradleprojectbuilder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.buildship.core.gradleprojectnature 22 | 23 | 24 | -------------------------------------------------------------------------------- /ExampleApp/android/app/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | connection.project.dir=.. 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /ExampleApp/android/app/_BUCK: -------------------------------------------------------------------------------- 1 | # To learn about Buck see [Docs](https://buckbuild.com/). 2 | # To run your application with Buck: 3 | # - install Buck 4 | # - `npm start` - to start the packager 5 | # - `cd android` 6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` 7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck 8 | # - `buck install -r android/app` - compile, install and run application 9 | # 10 | 11 | load(":build_defs.bzl", "create_aar_targets", "create_jar_targets") 12 | 13 | lib_deps = [] 14 | 15 | create_aar_targets(glob(["libs/*.aar"])) 16 | 17 | create_jar_targets(glob(["libs/*.jar"])) 18 | 19 | android_library( 20 | name = "all-libs", 21 | exported_deps = lib_deps, 22 | ) 23 | 24 | android_library( 25 | name = "app-code", 26 | srcs = glob([ 27 | "src/main/java/**/*.java", 28 | ]), 29 | deps = [ 30 | ":all-libs", 31 | ":build_config", 32 | ":res", 33 | ], 34 | ) 35 | 36 | android_build_config( 37 | name = "build_config", 38 | package = "com.exemple", 39 | ) 40 | 41 | android_resource( 42 | name = "res", 43 | package = "com.exemple", 44 | res = "src/main/res", 45 | ) 46 | 47 | android_binary( 48 | name = "app", 49 | keystore = "//android/keystores:debug", 50 | manifest = "src/main/AndroidManifest.xml", 51 | package_type = "debug", 52 | deps = [ 53 | ":app-code", 54 | ], 55 | ) 56 | -------------------------------------------------------------------------------- /ExampleApp/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: "com.android.application" 2 | 3 | import com.android.build.OutputFile 4 | 5 | /** 6 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets 7 | * and bundleReleaseJsAndAssets). 8 | * These basically call `react-native bundle` with the correct arguments during the Android build 9 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the 10 | * bundle directly from the development server. Below you can see all the possible configurations 11 | * and their defaults. If you decide to add a configuration block, make sure to add it before the 12 | * `apply from: "../../node_modules/react-native/react.gradle"` line. 13 | * 14 | * project.ext.react = [ 15 | * // the name of the generated asset file containing your JS bundle 16 | * bundleAssetName: "index.android.bundle", 17 | * 18 | * // the entry file for bundle generation. If none specified and 19 | * // "index.android.js" exists, it will be used. Otherwise "index.js" is 20 | * // default. Can be overridden with ENTRY_FILE environment variable. 21 | * entryFile: "index.android.js", 22 | * 23 | * // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format 24 | * bundleCommand: "ram-bundle", 25 | * 26 | * // whether to bundle JS and assets in debug mode 27 | * bundleInDebug: false, 28 | * 29 | * // whether to bundle JS and assets in release mode 30 | * bundleInRelease: true, 31 | * 32 | * // whether to bundle JS and assets in another build variant (if configured). 33 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants 34 | * // The configuration property can be in the following formats 35 | * // 'bundleIn${productFlavor}${buildType}' 36 | * // 'bundleIn${buildType}' 37 | * // bundleInFreeDebug: true, 38 | * // bundleInPaidRelease: true, 39 | * // bundleInBeta: true, 40 | * 41 | * // whether to disable dev mode in custom build variants (by default only disabled in release) 42 | * // for example: to disable dev mode in the staging build type (if configured) 43 | * devDisabledInStaging: true, 44 | * // The configuration property can be in the following formats 45 | * // 'devDisabledIn${productFlavor}${buildType}' 46 | * // 'devDisabledIn${buildType}' 47 | * 48 | * // the root of your project, i.e. where "package.json" lives 49 | * root: "../../", 50 | * 51 | * // where to put the JS bundle asset in debug mode 52 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", 53 | * 54 | * // where to put the JS bundle asset in release mode 55 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release", 56 | * 57 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 58 | * // require('./image.png')), in debug mode 59 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", 60 | * 61 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 62 | * // require('./image.png')), in release mode 63 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", 64 | * 65 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means 66 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to 67 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle 68 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ 69 | * // for example, you might want to remove it from here. 70 | * inputExcludes: ["android/**", "ios/**"], 71 | * 72 | * // override which node gets called and with what additional arguments 73 | * nodeExecutableAndArgs: ["node"], 74 | * 75 | * // supply additional arguments to the packager 76 | * extraPackagerArgs: [] 77 | * ] 78 | */ 79 | 80 | project.ext.react = [ 81 | entryFile: "index.js", 82 | bundleAssetName: "app.bundle", 83 | enableHermes: false, // clean and rebuild if changing 84 | ] 85 | 86 | apply from: "../../node_modules/react-native/react.gradle" 87 | 88 | /** 89 | * Set this to true to create two separate APKs instead of one: 90 | * - An APK that only works on ARM devices 91 | * - An APK that only works on x86 devices 92 | * The advantage is the size of the APK is reduced by about 4MB. 93 | * Upload all the APKs to the Play Store and people will download 94 | * the correct one based on the CPU architecture of their device. 95 | */ 96 | def enableSeparateBuildPerCPUArchitecture = false 97 | 98 | /** 99 | * Run Proguard to shrink the Java bytecode in release builds. 100 | */ 101 | def enableProguardInReleaseBuilds = false 102 | 103 | /** 104 | * The preferred build flavor of JavaScriptCore. 105 | * 106 | * For example, to use the international variant, you can use: 107 | * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` 108 | * 109 | * The international variant includes ICU i18n library and necessary data 110 | * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that 111 | * give correct results when using with locales other than en-US. Note that 112 | * this variant is about 6MiB larger per architecture than default. 113 | */ 114 | def jscFlavor = 'org.webkit:android-jsc:+' 115 | 116 | /** 117 | * Whether to enable the Hermes VM. 118 | * 119 | * This should be set on project.ext.react and mirrored here. If it is not set 120 | * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode 121 | * and the benefits of using Hermes will therefore be sharply reduced. 122 | */ 123 | def enableHermes = project.ext.react.get("enableHermes", false); 124 | 125 | android { 126 | compileSdkVersion rootProject.ext.compileSdkVersion 127 | 128 | compileOptions { 129 | sourceCompatibility JavaVersion.VERSION_1_8 130 | targetCompatibility JavaVersion.VERSION_1_8 131 | } 132 | 133 | defaultConfig { 134 | applicationId "com.exemple" 135 | minSdkVersion rootProject.ext.minSdkVersion 136 | targetSdkVersion rootProject.ext.targetSdkVersion 137 | versionCode 1 138 | versionName "1.0" 139 | } 140 | splits { 141 | abi { 142 | reset() 143 | enable enableSeparateBuildPerCPUArchitecture 144 | universalApk false // If true, also generate a universal APK 145 | include "armeabi-v7a", "x86", "arm64-v8a", "x86_64" 146 | } 147 | } 148 | signingConfigs { 149 | debug { 150 | storeFile file('debug.keystore') 151 | storePassword 'android' 152 | keyAlias 'androiddebugkey' 153 | keyPassword 'android' 154 | } 155 | } 156 | buildTypes { 157 | debug { 158 | signingConfig signingConfigs.debug 159 | } 160 | release { 161 | // Caution! In production, you need to generate your own keystore file. 162 | // see https://facebook.github.io/react-native/docs/signed-apk-android. 163 | signingConfig signingConfigs.debug 164 | minifyEnabled enableProguardInReleaseBuilds 165 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 166 | } 167 | } 168 | 169 | packagingOptions { 170 | pickFirst 'lib/x86/libc++_shared.so' 171 | pickFirst 'lib/x86/libjsc.so' 172 | pickFirst 'lib/x86_64/libjsc.so' 173 | pickFirst 'lib/arm64-v8a/libjsc.so' 174 | pickFirst 'lib/arm64-v8a/libc++_shared.so' 175 | pickFirst 'lib/x86_64/libc++_shared.so' 176 | pickFirst 'lib/armeabi-v7a/libc++_shared.so' 177 | pickFirst 'lib/armeabi-v7a/libjsc.so' 178 | } 179 | 180 | // applicationVariants are e.g. debug, release 181 | applicationVariants.all { variant -> 182 | variant.outputs.each { output -> 183 | // For each separate APK per architecture, set a unique version code as described here: 184 | // https://developer.android.com/studio/build/configure-apk-splits.html 185 | def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4] 186 | def abi = output.getFilter(OutputFile.ABI) 187 | if (abi != null) { // null for the universal-debug, universal-release variants 188 | output.versionCodeOverride = 189 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode 190 | } 191 | 192 | } 193 | } 194 | } 195 | 196 | dependencies { 197 | implementation fileTree(dir: "libs", include: ["*.jar"]) 198 | //noinspection GradleDynamicVersion 199 | implementation "com.facebook.react:react-native:+" // From node_modules 200 | 201 | implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" 202 | 203 | debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") { 204 | exclude group:'com.facebook.fbjni' 205 | } 206 | 207 | debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { 208 | exclude group:'com.facebook.flipper' 209 | } 210 | 211 | debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") { 212 | exclude group:'com.facebook.flipper' 213 | } 214 | 215 | if (enableHermes) { 216 | def hermesPath = "../../node_modules/hermes-engine/android/"; 217 | debugImplementation files(hermesPath + "hermes-debug.aar") 218 | releaseImplementation files(hermesPath + "hermes-release.aar") 219 | } else { 220 | implementation jscFlavor 221 | } 222 | } 223 | 224 | // Run this once to be able to run the application with BUCK 225 | // puts all compile dependencies into folder libs for BUCK to use 226 | task copyDownloadableDepsToLibs(type: Copy) { 227 | from configurations.compile 228 | into 'libs' 229 | } 230 | 231 | apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) 232 | -------------------------------------------------------------------------------- /ExampleApp/android/app/build_defs.bzl: -------------------------------------------------------------------------------- 1 | """Helper definitions to glob .aar and .jar targets""" 2 | 3 | def create_aar_targets(aarfiles): 4 | for aarfile in aarfiles: 5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")] 6 | lib_deps.append(":" + name) 7 | android_prebuilt_aar( 8 | name = name, 9 | aar = aarfile, 10 | ) 11 | 12 | def create_jar_targets(jarfiles): 13 | for jarfile in jarfiles: 14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")] 15 | lib_deps.append(":" + name) 16 | prebuilt_jar( 17 | name = name, 18 | binary_jar = jarfile, 19 | ) 20 | -------------------------------------------------------------------------------- /ExampleApp/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skrafft/react-native-jitsi-meet/c8bebd35025d8a900f5d8dbb5a6d0b6b31a19f8d/ExampleApp/android/app/debug.keystore -------------------------------------------------------------------------------- /ExampleApp/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | -------------------------------------------------------------------------------- /ExampleApp/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ExampleApp/android/app/src/debug/java/com/exemple/ReactNativeFlipper.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | *

This source code is licensed under the MIT license found in the LICENSE file in the root 5 | * directory of this source tree. 6 | */ 7 | package com.exemple; 8 | 9 | import android.content.Context; 10 | import com.facebook.flipper.android.AndroidFlipperClient; 11 | import com.facebook.flipper.android.utils.FlipperUtils; 12 | import com.facebook.flipper.core.FlipperClient; 13 | import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin; 14 | import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin; 15 | import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin; 16 | import com.facebook.flipper.plugins.inspector.DescriptorMapping; 17 | import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin; 18 | import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor; 19 | import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; 20 | import com.facebook.flipper.plugins.react.ReactFlipperPlugin; 21 | import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin; 22 | import com.facebook.react.ReactInstanceManager; 23 | import com.facebook.react.bridge.ReactContext; 24 | import com.facebook.react.modules.network.NetworkingModule; 25 | import okhttp3.OkHttpClient; 26 | 27 | public class ReactNativeFlipper { 28 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { 29 | if (FlipperUtils.shouldEnableFlipper(context)) { 30 | final FlipperClient client = AndroidFlipperClient.getInstance(context); 31 | 32 | client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())); 33 | client.addPlugin(new ReactFlipperPlugin()); 34 | client.addPlugin(new DatabasesFlipperPlugin(context)); 35 | client.addPlugin(new SharedPreferencesFlipperPlugin(context)); 36 | client.addPlugin(CrashReporterPlugin.getInstance()); 37 | 38 | NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin(); 39 | NetworkingModule.setCustomClientBuilder( 40 | new NetworkingModule.CustomClientBuilder() { 41 | @Override 42 | public void apply(OkHttpClient.Builder builder) { 43 | builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); 44 | } 45 | }); 46 | client.addPlugin(networkFlipperPlugin); 47 | client.start(); 48 | 49 | // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized 50 | // Hence we run if after all native modules have been initialized 51 | ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); 52 | if (reactContext == null) { 53 | reactInstanceManager.addReactInstanceEventListener( 54 | new ReactInstanceManager.ReactInstanceEventListener() { 55 | @Override 56 | public void onReactContextInitialized(ReactContext reactContext) { 57 | reactInstanceManager.removeReactInstanceEventListener(this); 58 | reactContext.runOnNativeModulesQueueThread( 59 | new Runnable() { 60 | @Override 61 | public void run() { 62 | client.addPlugin(new FrescoFlipperPlugin()); 63 | } 64 | }); 65 | } 66 | }); 67 | } else { 68 | client.addPlugin(new FrescoFlipperPlugin()); 69 | } 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /ExampleApp/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 13 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /ExampleApp/android/app/src/main/java/com/exemple/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.exemple; 2 | 3 | import com.facebook.react.ReactActivity; 4 | 5 | public class MainActivity extends ReactActivity { 6 | 7 | /** 8 | * Returns the name of the main component registered from JavaScript. This is used to schedule 9 | * rendering of the component. 10 | */ 11 | @Override 12 | protected String getMainComponentName() { 13 | return "Exemple"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ExampleApp/android/app/src/main/java/com/exemple/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.exemple; 2 | 3 | import android.app.Application; 4 | import android.content.Context; 5 | import com.facebook.react.PackageList; 6 | import com.facebook.react.ReactApplication; 7 | import com.facebook.react.ReactInstanceManager; 8 | import com.facebook.react.ReactNativeHost; 9 | import com.facebook.react.ReactPackage; 10 | import com.facebook.soloader.SoLoader; 11 | import java.lang.reflect.InvocationTargetException; 12 | import java.util.List; 13 | 14 | import androidx.annotation.Nullable; 15 | 16 | public class MainApplication extends Application implements ReactApplication { 17 | 18 | private final ReactNativeHost mReactNativeHost = 19 | new ReactNativeHost(this) { 20 | @Override 21 | public boolean getUseDeveloperSupport() { 22 | return BuildConfig.DEBUG; 23 | } 24 | 25 | @Override 26 | protected List getPackages() { 27 | @SuppressWarnings("UnnecessaryLocalVariable") 28 | List packages = new PackageList(this).getPackages(); 29 | // Packages that cannot be autolinked yet can be added manually here, for example: 30 | // packages.add(new MyReactNativePackage()); 31 | return packages; 32 | } 33 | 34 | @Override 35 | protected String getJSMainModuleName() { 36 | return "index"; 37 | } 38 | 39 | @Override 40 | protected @Nullable String getBundleAssetName() { 41 | return "app.bundle"; 42 | } 43 | }; 44 | 45 | @Override 46 | public ReactNativeHost getReactNativeHost() { 47 | return mReactNativeHost; 48 | } 49 | 50 | @Override 51 | public void onCreate() { 52 | super.onCreate(); 53 | SoLoader.init(this, /* native exopackage */ false); 54 | initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); 55 | } 56 | 57 | /** 58 | * Loads Flipper in React Native templates. Call this in the onCreate method with something like 59 | * initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); 60 | * 61 | * @param context 62 | * @param reactInstanceManager 63 | */ 64 | private static void initializeFlipper( 65 | Context context, ReactInstanceManager reactInstanceManager) { 66 | if (BuildConfig.DEBUG) { 67 | try { 68 | /* 69 | We use reflection here to pick up the class that initializes Flipper, 70 | since Flipper library is not available in release mode 71 | */ 72 | Class aClass = Class.forName("com.exemple.ReactNativeFlipper"); 73 | aClass 74 | .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class) 75 | .invoke(null, context, reactInstanceManager); 76 | } catch (ClassNotFoundException e) { 77 | e.printStackTrace(); 78 | } catch (NoSuchMethodException e) { 79 | e.printStackTrace(); 80 | } catch (IllegalAccessException e) { 81 | e.printStackTrace(); 82 | } catch (InvocationTargetException e) { 83 | e.printStackTrace(); 84 | } 85 | } 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /ExampleApp/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skrafft/react-native-jitsi-meet/c8bebd35025d8a900f5d8dbb5a6d0b6b31a19f8d/ExampleApp/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /ExampleApp/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skrafft/react-native-jitsi-meet/c8bebd35025d8a900f5d8dbb5a6d0b6b31a19f8d/ExampleApp/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /ExampleApp/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skrafft/react-native-jitsi-meet/c8bebd35025d8a900f5d8dbb5a6d0b6b31a19f8d/ExampleApp/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /ExampleApp/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skrafft/react-native-jitsi-meet/c8bebd35025d8a900f5d8dbb5a6d0b6b31a19f8d/ExampleApp/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /ExampleApp/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skrafft/react-native-jitsi-meet/c8bebd35025d8a900f5d8dbb5a6d0b6b31a19f8d/ExampleApp/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ExampleApp/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skrafft/react-native-jitsi-meet/c8bebd35025d8a900f5d8dbb5a6d0b6b31a19f8d/ExampleApp/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /ExampleApp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skrafft/react-native-jitsi-meet/c8bebd35025d8a900f5d8dbb5a6d0b6b31a19f8d/ExampleApp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ExampleApp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skrafft/react-native-jitsi-meet/c8bebd35025d8a900f5d8dbb5a6d0b6b31a19f8d/ExampleApp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /ExampleApp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skrafft/react-native-jitsi-meet/c8bebd35025d8a900f5d8dbb5a6d0b6b31a19f8d/ExampleApp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ExampleApp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skrafft/react-native-jitsi-meet/c8bebd35025d8a900f5d8dbb5a6d0b6b31a19f8d/ExampleApp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /ExampleApp/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Exemple 3 | 4 | -------------------------------------------------------------------------------- /ExampleApp/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /ExampleApp/android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | ext { 5 | buildToolsVersion = "28.0.3" 6 | minSdkVersion = 24 7 | compileSdkVersion = 29 8 | targetSdkVersion = 28 9 | } 10 | repositories { 11 | google() 12 | jcenter() 13 | } 14 | dependencies { 15 | classpath("com.android.tools.build:gradle:3.5.2") 16 | 17 | // NOTE: Do not place your application dependencies here; they belong 18 | // in the individual module build.gradle files 19 | } 20 | } 21 | 22 | allprojects { 23 | repositories { 24 | mavenLocal() 25 | maven { 26 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 27 | url("$rootDir/../node_modules/react-native/android") 28 | } 29 | 30 | maven { // <---- Add this block 31 | url "https://github.com/jitsi/jitsi-maven-repository/raw/master/releases" 32 | } 33 | 34 | maven { 35 | // Android JSC is installed from npm 36 | url("$rootDir/../node_modules/jsc-android/dist") 37 | } 38 | 39 | google() 40 | jcenter() 41 | maven { url 'https://www.jitpack.io' } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /ExampleApp/android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | # AndroidX package structure to make it clearer which packages are bundled with the 21 | # Android operating system, and which are packaged with your app's APK 22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 23 | android.useAndroidX=true 24 | # Automatically convert third-party libraries to use AndroidX 25 | android.enableJetifier=true 26 | 27 | # Version of flipper SDK to use with React Native 28 | FLIPPER_VERSION=0.33.1 29 | -------------------------------------------------------------------------------- /ExampleApp/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skrafft/react-native-jitsi-meet/c8bebd35025d8a900f5d8dbb5a6d0b6b31a19f8d/ExampleApp/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /ExampleApp/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /ExampleApp/android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # 4 | # Copyright 2015 the original author or authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | ############################################################################## 20 | ## 21 | ## Gradle start up script for UN*X 22 | ## 23 | ############################################################################## 24 | 25 | # Attempt to set APP_HOME 26 | # Resolve links: $0 may be a link 27 | PRG="$0" 28 | # Need this for relative symlinks. 29 | while [ -h "$PRG" ] ; do 30 | ls=`ls -ld "$PRG"` 31 | link=`expr "$ls" : '.*-> \(.*\)$'` 32 | if expr "$link" : '/.*' > /dev/null; then 33 | PRG="$link" 34 | else 35 | PRG=`dirname "$PRG"`"/$link" 36 | fi 37 | done 38 | SAVED="`pwd`" 39 | cd "`dirname \"$PRG\"`/" >/dev/null 40 | APP_HOME="`pwd -P`" 41 | cd "$SAVED" >/dev/null 42 | 43 | APP_NAME="Gradle" 44 | APP_BASE_NAME=`basename "$0"` 45 | 46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 48 | 49 | # Use the maximum available, or set MAX_FD != -1 to use that value. 50 | MAX_FD="maximum" 51 | 52 | warn () { 53 | echo "$*" 54 | } 55 | 56 | die () { 57 | echo 58 | echo "$*" 59 | echo 60 | exit 1 61 | } 62 | 63 | # OS specific support (must be 'true' or 'false'). 64 | cygwin=false 65 | msys=false 66 | darwin=false 67 | nonstop=false 68 | case "`uname`" in 69 | CYGWIN* ) 70 | cygwin=true 71 | ;; 72 | Darwin* ) 73 | darwin=true 74 | ;; 75 | MINGW* ) 76 | msys=true 77 | ;; 78 | NONSTOP* ) 79 | nonstop=true 80 | ;; 81 | esac 82 | 83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 84 | 85 | # Determine the Java command to use to start the JVM. 86 | if [ -n "$JAVA_HOME" ] ; then 87 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 88 | # IBM's JDK on AIX uses strange locations for the executables 89 | JAVACMD="$JAVA_HOME/jre/sh/java" 90 | else 91 | JAVACMD="$JAVA_HOME/bin/java" 92 | fi 93 | if [ ! -x "$JAVACMD" ] ; then 94 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 95 | 96 | Please set the JAVA_HOME variable in your environment to match the 97 | location of your Java installation." 98 | fi 99 | else 100 | JAVACMD="java" 101 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 102 | 103 | Please set the JAVA_HOME variable in your environment to match the 104 | location of your Java installation." 105 | fi 106 | 107 | # Increase the maximum file descriptors if we can. 108 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 109 | MAX_FD_LIMIT=`ulimit -H -n` 110 | if [ $? -eq 0 ] ; then 111 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 112 | MAX_FD="$MAX_FD_LIMIT" 113 | fi 114 | ulimit -n $MAX_FD 115 | if [ $? -ne 0 ] ; then 116 | warn "Could not set maximum file descriptor limit: $MAX_FD" 117 | fi 118 | else 119 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 120 | fi 121 | fi 122 | 123 | # For Darwin, add options to specify how the application appears in the dock 124 | if $darwin; then 125 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 126 | fi 127 | 128 | # For Cygwin or MSYS, switch paths to Windows format before running java 129 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then 130 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 131 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 132 | JAVACMD=`cygpath --unix "$JAVACMD"` 133 | 134 | # We build the pattern for arguments to be converted via cygpath 135 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 136 | SEP="" 137 | for dir in $ROOTDIRSRAW ; do 138 | ROOTDIRS="$ROOTDIRS$SEP$dir" 139 | SEP="|" 140 | done 141 | OURCYGPATTERN="(^($ROOTDIRS))" 142 | # Add a user-defined pattern to the cygpath arguments 143 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 144 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 145 | fi 146 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 147 | i=0 148 | for arg in "$@" ; do 149 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 150 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 151 | 152 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 153 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 154 | else 155 | eval `echo args$i`="\"$arg\"" 156 | fi 157 | i=$((i+1)) 158 | done 159 | case $i in 160 | (0) set -- ;; 161 | (1) set -- "$args0" ;; 162 | (2) set -- "$args0" "$args1" ;; 163 | (3) set -- "$args0" "$args1" "$args2" ;; 164 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 165 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 166 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 167 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 168 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 169 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 170 | esac 171 | fi 172 | 173 | # Escape application args 174 | save () { 175 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 176 | echo " " 177 | } 178 | APP_ARGS=$(save "$@") 179 | 180 | # Collect all arguments for the java command, following the shell quoting and substitution rules 181 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 182 | 183 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong 184 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then 185 | cd "$(dirname "$0")" 186 | fi 187 | 188 | exec "$JAVACMD" "$@" 189 | -------------------------------------------------------------------------------- /ExampleApp/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 33 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 34 | 35 | @rem Find java.exe 36 | if defined JAVA_HOME goto findJavaFromJavaHome 37 | 38 | set JAVA_EXE=java.exe 39 | %JAVA_EXE% -version >NUL 2>&1 40 | if "%ERRORLEVEL%" == "0" goto init 41 | 42 | echo. 43 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 44 | echo. 45 | echo Please set the JAVA_HOME variable in your environment to match the 46 | echo location of your Java installation. 47 | 48 | goto fail 49 | 50 | :findJavaFromJavaHome 51 | set JAVA_HOME=%JAVA_HOME:"=% 52 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 53 | 54 | if exist "%JAVA_EXE%" goto init 55 | 56 | echo. 57 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 58 | echo. 59 | echo Please set the JAVA_HOME variable in your environment to match the 60 | echo location of your Java installation. 61 | 62 | goto fail 63 | 64 | :init 65 | @rem Get command-line arguments, handling Windows variants 66 | 67 | if not "%OS%" == "Windows_NT" goto win9xME_args 68 | 69 | :win9xME_args 70 | @rem Slurp the command line arguments. 71 | set CMD_LINE_ARGS= 72 | set _SKIP=2 73 | 74 | :win9xME_args_slurp 75 | if "x%~1" == "x" goto execute 76 | 77 | set CMD_LINE_ARGS=%* 78 | 79 | :execute 80 | @rem Setup the command line 81 | 82 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 83 | 84 | @rem Execute Gradle 85 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 86 | 87 | :end 88 | @rem End local scope for the variables with windows NT shell 89 | if "%ERRORLEVEL%"=="0" goto mainEnd 90 | 91 | :fail 92 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 93 | rem the _cmd.exe /c_ return code! 94 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 95 | exit /b 1 96 | 97 | :mainEnd 98 | if "%OS%"=="Windows_NT" endlocal 99 | 100 | :omega 101 | -------------------------------------------------------------------------------- /ExampleApp/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'Exemple' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' 4 | -------------------------------------------------------------------------------- /ExampleApp/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Exemple", 3 | "displayName": "Exemple" 4 | } -------------------------------------------------------------------------------- /ExampleApp/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /ExampleApp/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import {AppRegistry} from 'react-native'; 6 | import App from './App'; 7 | import {name as appName} from './app.json'; 8 | 9 | AppRegistry.registerComponent(appName, () => App); 10 | -------------------------------------------------------------------------------- /ExampleApp/ios/Exemple-tvOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | NSAppTransportSecurity 26 | 27 | NSExceptionDomains 28 | 29 | localhost 30 | 31 | NSExceptionAllowsInsecureHTTPLoads 32 | 33 | 34 | 35 | 36 | NSLocationWhenInUseUsageDescription 37 | 38 | UILaunchStoryboardName 39 | LaunchScreen 40 | UIRequiredDeviceCapabilities 41 | 42 | armv7 43 | 44 | UISupportedInterfaceOrientations 45 | 46 | UIInterfaceOrientationPortrait 47 | UIInterfaceOrientationLandscapeLeft 48 | UIInterfaceOrientationLandscapeRight 49 | 50 | UIViewControllerBasedStatusBarAppearance 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /ExampleApp/ios/Exemple-tvOSTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ExampleApp/ios/Exemple.xcodeproj/xcshareddata/xcschemes/Exemple-tvOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 53 | 55 | 61 | 62 | 63 | 64 | 70 | 72 | 78 | 79 | 80 | 81 | 83 | 84 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /ExampleApp/ios/Exemple.xcodeproj/xcshareddata/xcschemes/Exemple.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 53 | 55 | 61 | 62 | 63 | 64 | 70 | 72 | 78 | 79 | 80 | 81 | 83 | 84 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /ExampleApp/ios/Exemple.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ExampleApp/ios/Exemple/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : UIResponder 5 | 6 | @property (nonatomic, strong) UIWindow *window; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /ExampleApp/ios/Exemple/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | 3 | #import 4 | #import 5 | #import 6 | 7 | #if DEBUG 8 | #import 9 | #import 10 | #import 11 | #import 12 | #import 13 | #import 14 | 15 | static void InitializeFlipper(UIApplication *application) { 16 | FlipperClient *client = [FlipperClient sharedClient]; 17 | SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults]; 18 | [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]]; 19 | [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]]; 20 | [client addPlugin:[FlipperKitReactPlugin new]]; 21 | [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]]; 22 | [client start]; 23 | } 24 | #endif 25 | 26 | @implementation AppDelegate 27 | 28 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 29 | { 30 | #if DEBUG 31 | InitializeFlipper(application); 32 | #endif 33 | 34 | RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; 35 | RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge 36 | moduleName:@"Exemple" 37 | initialProperties:nil]; 38 | 39 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; 40 | 41 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 42 | UIViewController *rootViewController = [UIViewController new]; 43 | rootViewController.view = rootView; 44 | self.window.rootViewController = rootViewController; 45 | [self.window makeKeyAndVisible]; 46 | return YES; 47 | } 48 | 49 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge 50 | { 51 | #if DEBUG 52 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; 53 | #else 54 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 55 | #endif 56 | } 57 | 58 | @end 59 | -------------------------------------------------------------------------------- /ExampleApp/ios/Exemple/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /ExampleApp/ios/Exemple/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /ExampleApp/ios/Exemple/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ExampleApp/ios/Exemple/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | Exemple 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSRequiresIPhoneOS 26 | 27 | NSAppTransportSecurity 28 | 29 | NSAllowsArbitraryLoads 30 | 31 | NSExceptionDomains 32 | 33 | localhost 34 | 35 | NSExceptionAllowsInsecureHTTPLoads 36 | 37 | 38 | 39 | 40 | NSLocationWhenInUseUsageDescription 41 | 42 | UILaunchStoryboardName 43 | LaunchScreen 44 | UIRequiredDeviceCapabilities 45 | 46 | armv7 47 | 48 | UISupportedInterfaceOrientations 49 | 50 | UIInterfaceOrientationPortrait 51 | UIInterfaceOrientationLandscapeLeft 52 | UIInterfaceOrientationLandscapeRight 53 | 54 | NSCameraUsageDescription 55 | Camera Permission 56 | NSMicrophoneUsageDescription 57 | Microphone Permission 58 | UIViewControllerBasedStatusBarAppearance 59 | 60 | UIBackgroundModes 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /ExampleApp/ios/Exemple/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char * argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /ExampleApp/ios/ExempleTests/ExempleTests.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #import 5 | #import 6 | 7 | #define TIMEOUT_SECONDS 600 8 | #define TEXT_TO_LOOK_FOR @"Welcome to React" 9 | 10 | @interface ExempleTests : XCTestCase 11 | 12 | @end 13 | 14 | @implementation ExempleTests 15 | 16 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test 17 | { 18 | if (test(view)) { 19 | return YES; 20 | } 21 | for (UIView *subview in [view subviews]) { 22 | if ([self findSubviewInView:subview matching:test]) { 23 | return YES; 24 | } 25 | } 26 | return NO; 27 | } 28 | 29 | - (void)testRendersWelcomeScreen 30 | { 31 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; 32 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 33 | BOOL foundElement = NO; 34 | 35 | __block NSString *redboxError = nil; 36 | #ifdef DEBUG 37 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 38 | if (level >= RCTLogLevelError) { 39 | redboxError = message; 40 | } 41 | }); 42 | #endif 43 | 44 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 45 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 46 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 47 | 48 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { 49 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 50 | return YES; 51 | } 52 | return NO; 53 | }]; 54 | } 55 | 56 | #ifdef DEBUG 57 | RCTSetLogFunction(RCTDefaultLogFunction); 58 | #endif 59 | 60 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 61 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 62 | } 63 | 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /ExampleApp/ios/ExempleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ExampleApp/ios/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '10.0' 2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' 3 | 4 | def add_flipper_pods!(versions = {}) 5 | versions['Flipper'] ||= '~> 0.33.1' 6 | versions['DoubleConversion'] ||= '1.1.7' 7 | versions['Flipper-Folly'] ||= '~> 2.1' 8 | versions['Flipper-Glog'] ||= '0.3.6' 9 | versions['Flipper-PeerTalk'] ||= '~> 0.0.4' 10 | versions['Flipper-RSocket'] ||= '~> 1.0' 11 | 12 | pod 'FlipperKit', versions['Flipper'], :configuration => 'Debug' 13 | pod 'FlipperKit/FlipperKitLayoutPlugin', versions['Flipper'], :configuration => 'Debug' 14 | pod 'FlipperKit/SKIOSNetworkPlugin', versions['Flipper'], :configuration => 'Debug' 15 | pod 'FlipperKit/FlipperKitUserDefaultsPlugin', versions['Flipper'], :configuration => 'Debug' 16 | pod 'FlipperKit/FlipperKitReactPlugin', versions['Flipper'], :configuration => 'Debug' 17 | 18 | # List all transitive dependencies for FlipperKit pods 19 | # to avoid them being linked in Release builds 20 | pod 'Flipper', versions['Flipper'], :configuration => 'Debug' 21 | pod 'Flipper-DoubleConversion', versions['DoubleConversion'], :configuration => 'Debug' 22 | pod 'Flipper-Folly', versions['Flipper-Folly'], :configuration => 'Debug' 23 | pod 'Flipper-Glog', versions['Flipper-Glog'], :configuration => 'Debug' 24 | pod 'Flipper-PeerTalk', versions['Flipper-PeerTalk'], :configuration => 'Debug' 25 | pod 'Flipper-RSocket', versions['Flipper-RSocket'], :configuration => 'Debug' 26 | pod 'FlipperKit/Core', versions['Flipper'], :configuration => 'Debug' 27 | pod 'FlipperKit/CppBridge', versions['Flipper'], :configuration => 'Debug' 28 | pod 'FlipperKit/FBCxxFollyDynamicConvert', versions['Flipper'], :configuration => 'Debug' 29 | pod 'FlipperKit/FBDefines', versions['Flipper'], :configuration => 'Debug' 30 | pod 'FlipperKit/FKPortForwarding', versions['Flipper'], :configuration => 'Debug' 31 | pod 'FlipperKit/FlipperKitHighlightOverlay', versions['Flipper'], :configuration => 'Debug' 32 | pod 'FlipperKit/FlipperKitLayoutTextSearchable', versions['Flipper'], :configuration => 'Debug' 33 | pod 'FlipperKit/FlipperKitNetworkPlugin', versions['Flipper'], :configuration => 'Debug' 34 | end 35 | 36 | # Post Install processing for Flipper 37 | def flipper_post_install(installer) 38 | installer.pods_project.targets.each do |target| 39 | if target.name == 'YogaKit' 40 | target.build_configurations.each do |config| 41 | config.build_settings['SWIFT_VERSION'] = '4.1' 42 | end 43 | end 44 | end 45 | end 46 | 47 | target 'Exemple' do 48 | # Pods for Exemple 49 | pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector" 50 | pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec" 51 | pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired" 52 | pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety" 53 | pod 'React', :path => '../node_modules/react-native/' 54 | pod 'React-Core', :path => '../node_modules/react-native/' 55 | pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules' 56 | pod 'React-Core/DevSupport', :path => '../node_modules/react-native/' 57 | pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS' 58 | pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation' 59 | pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob' 60 | pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image' 61 | pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS' 62 | pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network' 63 | pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings' 64 | pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text' 65 | pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration' 66 | pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/' 67 | 68 | pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact' 69 | pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi' 70 | pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor' 71 | pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector' 72 | pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon" 73 | pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon" 74 | pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga', :modular_headers => true 75 | 76 | pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec' 77 | pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec' 78 | pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec' 79 | 80 | target 'ExempleTests' do 81 | inherit! :complete 82 | # Pods for testing 83 | end 84 | 85 | use_native_modules! 86 | 87 | # Enables Flipper. 88 | # 89 | # Note that if you have use_frameworks! enabled, Flipper will not work and 90 | # you should disable these next few lines. 91 | add_flipper_pods! 92 | post_install do |installer| 93 | flipper_post_install(installer) 94 | end 95 | end 96 | 97 | target 'Exemple-tvOS' do 98 | # Pods for Exemple-tvOS 99 | 100 | target 'Exemple-tvOSTests' do 101 | inherit! :search_paths 102 | # Pods for testing 103 | end 104 | end 105 | -------------------------------------------------------------------------------- /ExampleApp/ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - boost-for-react-native (1.63.0) 3 | - CocoaAsyncSocket (7.6.4) 4 | - CocoaLibEvent (1.0.0) 5 | - DoubleConversion (1.1.6) 6 | - FBLazyVector (0.62.2) 7 | - FBReactNativeSpec (0.62.2): 8 | - Folly (= 2018.10.22.00) 9 | - RCTRequired (= 0.62.2) 10 | - RCTTypeSafety (= 0.62.2) 11 | - React-Core (= 0.62.2) 12 | - React-jsi (= 0.62.2) 13 | - ReactCommon/turbomodule/core (= 0.62.2) 14 | - Flipper (0.33.1): 15 | - Flipper-Folly (~> 2.1) 16 | - Flipper-RSocket (~> 1.0) 17 | - Flipper-DoubleConversion (1.1.7) 18 | - Flipper-Folly (2.1.1): 19 | - boost-for-react-native 20 | - CocoaLibEvent (~> 1.0) 21 | - Flipper-DoubleConversion 22 | - Flipper-Glog 23 | - OpenSSL-Universal (= 1.0.2.19) 24 | - Flipper-Glog (0.3.6) 25 | - Flipper-PeerTalk (0.0.4) 26 | - Flipper-RSocket (1.0.0): 27 | - Flipper-Folly (~> 2.0) 28 | - FlipperKit (0.33.1): 29 | - FlipperKit/Core (= 0.33.1) 30 | - FlipperKit/Core (0.33.1): 31 | - Flipper (~> 0.33.1) 32 | - FlipperKit/CppBridge 33 | - FlipperKit/FBCxxFollyDynamicConvert 34 | - FlipperKit/FBDefines 35 | - FlipperKit/FKPortForwarding 36 | - FlipperKit/CppBridge (0.33.1): 37 | - Flipper (~> 0.33.1) 38 | - FlipperKit/FBCxxFollyDynamicConvert (0.33.1): 39 | - Flipper-Folly (~> 2.1) 40 | - FlipperKit/FBDefines (0.33.1) 41 | - FlipperKit/FKPortForwarding (0.33.1): 42 | - CocoaAsyncSocket (~> 7.6) 43 | - Flipper-PeerTalk (~> 0.0.4) 44 | - FlipperKit/FlipperKitHighlightOverlay (0.33.1) 45 | - FlipperKit/FlipperKitLayoutPlugin (0.33.1): 46 | - FlipperKit/Core 47 | - FlipperKit/FlipperKitHighlightOverlay 48 | - FlipperKit/FlipperKitLayoutTextSearchable 49 | - YogaKit (~> 1.18) 50 | - FlipperKit/FlipperKitLayoutTextSearchable (0.33.1) 51 | - FlipperKit/FlipperKitNetworkPlugin (0.33.1): 52 | - FlipperKit/Core 53 | - FlipperKit/FlipperKitReactPlugin (0.33.1): 54 | - FlipperKit/Core 55 | - FlipperKit/FlipperKitUserDefaultsPlugin (0.33.1): 56 | - FlipperKit/Core 57 | - FlipperKit/SKIOSNetworkPlugin (0.33.1): 58 | - FlipperKit/Core 59 | - FlipperKit/FlipperKitNetworkPlugin 60 | - Folly (2018.10.22.00): 61 | - boost-for-react-native 62 | - DoubleConversion 63 | - Folly/Default (= 2018.10.22.00) 64 | - glog 65 | - Folly/Default (2018.10.22.00): 66 | - boost-for-react-native 67 | - DoubleConversion 68 | - glog 69 | - glog (0.3.5) 70 | - JitsiMeetSDK (2.4.0) 71 | - OpenSSL-Universal (1.0.2.19): 72 | - OpenSSL-Universal/Static (= 1.0.2.19) 73 | - OpenSSL-Universal/Static (1.0.2.19) 74 | - RCTRequired (0.62.2) 75 | - RCTTypeSafety (0.62.2): 76 | - FBLazyVector (= 0.62.2) 77 | - Folly (= 2018.10.22.00) 78 | - RCTRequired (= 0.62.2) 79 | - React-Core (= 0.62.2) 80 | - React (0.62.2): 81 | - React-Core (= 0.62.2) 82 | - React-Core/DevSupport (= 0.62.2) 83 | - React-Core/RCTWebSocket (= 0.62.2) 84 | - React-RCTActionSheet (= 0.62.2) 85 | - React-RCTAnimation (= 0.62.2) 86 | - React-RCTBlob (= 0.62.2) 87 | - React-RCTImage (= 0.62.2) 88 | - React-RCTLinking (= 0.62.2) 89 | - React-RCTNetwork (= 0.62.2) 90 | - React-RCTSettings (= 0.62.2) 91 | - React-RCTText (= 0.62.2) 92 | - React-RCTVibration (= 0.62.2) 93 | - React-Core (0.62.2): 94 | - Folly (= 2018.10.22.00) 95 | - glog 96 | - React-Core/Default (= 0.62.2) 97 | - React-cxxreact (= 0.62.2) 98 | - React-jsi (= 0.62.2) 99 | - React-jsiexecutor (= 0.62.2) 100 | - Yoga 101 | - React-Core/CoreModulesHeaders (0.62.2): 102 | - Folly (= 2018.10.22.00) 103 | - glog 104 | - React-Core/Default 105 | - React-cxxreact (= 0.62.2) 106 | - React-jsi (= 0.62.2) 107 | - React-jsiexecutor (= 0.62.2) 108 | - Yoga 109 | - React-Core/Default (0.62.2): 110 | - Folly (= 2018.10.22.00) 111 | - glog 112 | - React-cxxreact (= 0.62.2) 113 | - React-jsi (= 0.62.2) 114 | - React-jsiexecutor (= 0.62.2) 115 | - Yoga 116 | - React-Core/DevSupport (0.62.2): 117 | - Folly (= 2018.10.22.00) 118 | - glog 119 | - React-Core/Default (= 0.62.2) 120 | - React-Core/RCTWebSocket (= 0.62.2) 121 | - React-cxxreact (= 0.62.2) 122 | - React-jsi (= 0.62.2) 123 | - React-jsiexecutor (= 0.62.2) 124 | - React-jsinspector (= 0.62.2) 125 | - Yoga 126 | - React-Core/RCTActionSheetHeaders (0.62.2): 127 | - Folly (= 2018.10.22.00) 128 | - glog 129 | - React-Core/Default 130 | - React-cxxreact (= 0.62.2) 131 | - React-jsi (= 0.62.2) 132 | - React-jsiexecutor (= 0.62.2) 133 | - Yoga 134 | - React-Core/RCTAnimationHeaders (0.62.2): 135 | - Folly (= 2018.10.22.00) 136 | - glog 137 | - React-Core/Default 138 | - React-cxxreact (= 0.62.2) 139 | - React-jsi (= 0.62.2) 140 | - React-jsiexecutor (= 0.62.2) 141 | - Yoga 142 | - React-Core/RCTBlobHeaders (0.62.2): 143 | - Folly (= 2018.10.22.00) 144 | - glog 145 | - React-Core/Default 146 | - React-cxxreact (= 0.62.2) 147 | - React-jsi (= 0.62.2) 148 | - React-jsiexecutor (= 0.62.2) 149 | - Yoga 150 | - React-Core/RCTImageHeaders (0.62.2): 151 | - Folly (= 2018.10.22.00) 152 | - glog 153 | - React-Core/Default 154 | - React-cxxreact (= 0.62.2) 155 | - React-jsi (= 0.62.2) 156 | - React-jsiexecutor (= 0.62.2) 157 | - Yoga 158 | - React-Core/RCTLinkingHeaders (0.62.2): 159 | - Folly (= 2018.10.22.00) 160 | - glog 161 | - React-Core/Default 162 | - React-cxxreact (= 0.62.2) 163 | - React-jsi (= 0.62.2) 164 | - React-jsiexecutor (= 0.62.2) 165 | - Yoga 166 | - React-Core/RCTNetworkHeaders (0.62.2): 167 | - Folly (= 2018.10.22.00) 168 | - glog 169 | - React-Core/Default 170 | - React-cxxreact (= 0.62.2) 171 | - React-jsi (= 0.62.2) 172 | - React-jsiexecutor (= 0.62.2) 173 | - Yoga 174 | - React-Core/RCTSettingsHeaders (0.62.2): 175 | - Folly (= 2018.10.22.00) 176 | - glog 177 | - React-Core/Default 178 | - React-cxxreact (= 0.62.2) 179 | - React-jsi (= 0.62.2) 180 | - React-jsiexecutor (= 0.62.2) 181 | - Yoga 182 | - React-Core/RCTTextHeaders (0.62.2): 183 | - Folly (= 2018.10.22.00) 184 | - glog 185 | - React-Core/Default 186 | - React-cxxreact (= 0.62.2) 187 | - React-jsi (= 0.62.2) 188 | - React-jsiexecutor (= 0.62.2) 189 | - Yoga 190 | - React-Core/RCTVibrationHeaders (0.62.2): 191 | - Folly (= 2018.10.22.00) 192 | - glog 193 | - React-Core/Default 194 | - React-cxxreact (= 0.62.2) 195 | - React-jsi (= 0.62.2) 196 | - React-jsiexecutor (= 0.62.2) 197 | - Yoga 198 | - React-Core/RCTWebSocket (0.62.2): 199 | - Folly (= 2018.10.22.00) 200 | - glog 201 | - React-Core/Default (= 0.62.2) 202 | - React-cxxreact (= 0.62.2) 203 | - React-jsi (= 0.62.2) 204 | - React-jsiexecutor (= 0.62.2) 205 | - Yoga 206 | - React-CoreModules (0.62.2): 207 | - FBReactNativeSpec (= 0.62.2) 208 | - Folly (= 2018.10.22.00) 209 | - RCTTypeSafety (= 0.62.2) 210 | - React-Core/CoreModulesHeaders (= 0.62.2) 211 | - React-RCTImage (= 0.62.2) 212 | - ReactCommon/turbomodule/core (= 0.62.2) 213 | - React-cxxreact (0.62.2): 214 | - boost-for-react-native (= 1.63.0) 215 | - DoubleConversion 216 | - Folly (= 2018.10.22.00) 217 | - glog 218 | - React-jsinspector (= 0.62.2) 219 | - React-jsi (0.62.2): 220 | - boost-for-react-native (= 1.63.0) 221 | - DoubleConversion 222 | - Folly (= 2018.10.22.00) 223 | - glog 224 | - React-jsi/Default (= 0.62.2) 225 | - React-jsi/Default (0.62.2): 226 | - boost-for-react-native (= 1.63.0) 227 | - DoubleConversion 228 | - Folly (= 2018.10.22.00) 229 | - glog 230 | - React-jsiexecutor (0.62.2): 231 | - DoubleConversion 232 | - Folly (= 2018.10.22.00) 233 | - glog 234 | - React-cxxreact (= 0.62.2) 235 | - React-jsi (= 0.62.2) 236 | - React-jsinspector (0.62.2) 237 | - react-native-jitsi-meet (2.1.1): 238 | - JitsiMeetSDK (= 2.4.0) 239 | - React 240 | - React-RCTActionSheet (0.62.2): 241 | - React-Core/RCTActionSheetHeaders (= 0.62.2) 242 | - React-RCTAnimation (0.62.2): 243 | - FBReactNativeSpec (= 0.62.2) 244 | - Folly (= 2018.10.22.00) 245 | - RCTTypeSafety (= 0.62.2) 246 | - React-Core/RCTAnimationHeaders (= 0.62.2) 247 | - ReactCommon/turbomodule/core (= 0.62.2) 248 | - React-RCTBlob (0.62.2): 249 | - FBReactNativeSpec (= 0.62.2) 250 | - Folly (= 2018.10.22.00) 251 | - React-Core/RCTBlobHeaders (= 0.62.2) 252 | - React-Core/RCTWebSocket (= 0.62.2) 253 | - React-jsi (= 0.62.2) 254 | - React-RCTNetwork (= 0.62.2) 255 | - ReactCommon/turbomodule/core (= 0.62.2) 256 | - React-RCTImage (0.62.2): 257 | - FBReactNativeSpec (= 0.62.2) 258 | - Folly (= 2018.10.22.00) 259 | - RCTTypeSafety (= 0.62.2) 260 | - React-Core/RCTImageHeaders (= 0.62.2) 261 | - React-RCTNetwork (= 0.62.2) 262 | - ReactCommon/turbomodule/core (= 0.62.2) 263 | - React-RCTLinking (0.62.2): 264 | - FBReactNativeSpec (= 0.62.2) 265 | - React-Core/RCTLinkingHeaders (= 0.62.2) 266 | - ReactCommon/turbomodule/core (= 0.62.2) 267 | - React-RCTNetwork (0.62.2): 268 | - FBReactNativeSpec (= 0.62.2) 269 | - Folly (= 2018.10.22.00) 270 | - RCTTypeSafety (= 0.62.2) 271 | - React-Core/RCTNetworkHeaders (= 0.62.2) 272 | - ReactCommon/turbomodule/core (= 0.62.2) 273 | - React-RCTSettings (0.62.2): 274 | - FBReactNativeSpec (= 0.62.2) 275 | - Folly (= 2018.10.22.00) 276 | - RCTTypeSafety (= 0.62.2) 277 | - React-Core/RCTSettingsHeaders (= 0.62.2) 278 | - ReactCommon/turbomodule/core (= 0.62.2) 279 | - React-RCTText (0.62.2): 280 | - React-Core/RCTTextHeaders (= 0.62.2) 281 | - React-RCTVibration (0.62.2): 282 | - FBReactNativeSpec (= 0.62.2) 283 | - Folly (= 2018.10.22.00) 284 | - React-Core/RCTVibrationHeaders (= 0.62.2) 285 | - ReactCommon/turbomodule/core (= 0.62.2) 286 | - ReactCommon/callinvoker (0.62.2): 287 | - DoubleConversion 288 | - Folly (= 2018.10.22.00) 289 | - glog 290 | - React-cxxreact (= 0.62.2) 291 | - ReactCommon/turbomodule/core (0.62.2): 292 | - DoubleConversion 293 | - Folly (= 2018.10.22.00) 294 | - glog 295 | - React-Core (= 0.62.2) 296 | - React-cxxreact (= 0.62.2) 297 | - React-jsi (= 0.62.2) 298 | - ReactCommon/callinvoker (= 0.62.2) 299 | - Yoga (1.14.0) 300 | - YogaKit (1.18.1): 301 | - Yoga (~> 1.14) 302 | 303 | DEPENDENCIES: 304 | - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) 305 | - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) 306 | - FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`) 307 | - Flipper (~> 0.33.1) 308 | - Flipper-DoubleConversion (= 1.1.7) 309 | - Flipper-Folly (~> 2.1) 310 | - Flipper-Glog (= 0.3.6) 311 | - Flipper-PeerTalk (~> 0.0.4) 312 | - Flipper-RSocket (~> 1.0) 313 | - FlipperKit (~> 0.33.1) 314 | - FlipperKit/Core (~> 0.33.1) 315 | - FlipperKit/CppBridge (~> 0.33.1) 316 | - FlipperKit/FBCxxFollyDynamicConvert (~> 0.33.1) 317 | - FlipperKit/FBDefines (~> 0.33.1) 318 | - FlipperKit/FKPortForwarding (~> 0.33.1) 319 | - FlipperKit/FlipperKitHighlightOverlay (~> 0.33.1) 320 | - FlipperKit/FlipperKitLayoutPlugin (~> 0.33.1) 321 | - FlipperKit/FlipperKitLayoutTextSearchable (~> 0.33.1) 322 | - FlipperKit/FlipperKitNetworkPlugin (~> 0.33.1) 323 | - FlipperKit/FlipperKitReactPlugin (~> 0.33.1) 324 | - FlipperKit/FlipperKitUserDefaultsPlugin (~> 0.33.1) 325 | - FlipperKit/SKIOSNetworkPlugin (~> 0.33.1) 326 | - Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`) 327 | - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) 328 | - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) 329 | - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) 330 | - React (from `../node_modules/react-native/`) 331 | - React-Core (from `../node_modules/react-native/`) 332 | - React-Core/DevSupport (from `../node_modules/react-native/`) 333 | - React-Core/RCTWebSocket (from `../node_modules/react-native/`) 334 | - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) 335 | - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) 336 | - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) 337 | - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) 338 | - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`) 339 | - react-native-jitsi-meet (from `../node_modules/react-native-jitsi-meet`) 340 | - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`) 341 | - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`) 342 | - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`) 343 | - React-RCTImage (from `../node_modules/react-native/Libraries/Image`) 344 | - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`) 345 | - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`) 346 | - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`) 347 | - React-RCTText (from `../node_modules/react-native/Libraries/Text`) 348 | - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) 349 | - ReactCommon/callinvoker (from `../node_modules/react-native/ReactCommon`) 350 | - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) 351 | - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) 352 | 353 | SPEC REPOS: 354 | trunk: 355 | - boost-for-react-native 356 | - CocoaAsyncSocket 357 | - CocoaLibEvent 358 | - Flipper 359 | - Flipper-DoubleConversion 360 | - Flipper-Folly 361 | - Flipper-Glog 362 | - Flipper-PeerTalk 363 | - Flipper-RSocket 364 | - FlipperKit 365 | - JitsiMeetSDK 366 | - OpenSSL-Universal 367 | - YogaKit 368 | 369 | EXTERNAL SOURCES: 370 | DoubleConversion: 371 | :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" 372 | FBLazyVector: 373 | :path: "../node_modules/react-native/Libraries/FBLazyVector" 374 | FBReactNativeSpec: 375 | :path: "../node_modules/react-native/Libraries/FBReactNativeSpec" 376 | Folly: 377 | :podspec: "../node_modules/react-native/third-party-podspecs/Folly.podspec" 378 | glog: 379 | :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec" 380 | RCTRequired: 381 | :path: "../node_modules/react-native/Libraries/RCTRequired" 382 | RCTTypeSafety: 383 | :path: "../node_modules/react-native/Libraries/TypeSafety" 384 | React: 385 | :path: "../node_modules/react-native/" 386 | React-Core: 387 | :path: "../node_modules/react-native/" 388 | React-CoreModules: 389 | :path: "../node_modules/react-native/React/CoreModules" 390 | React-cxxreact: 391 | :path: "../node_modules/react-native/ReactCommon/cxxreact" 392 | React-jsi: 393 | :path: "../node_modules/react-native/ReactCommon/jsi" 394 | React-jsiexecutor: 395 | :path: "../node_modules/react-native/ReactCommon/jsiexecutor" 396 | React-jsinspector: 397 | :path: "../node_modules/react-native/ReactCommon/jsinspector" 398 | react-native-jitsi-meet: 399 | :path: "../node_modules/react-native-jitsi-meet" 400 | React-RCTActionSheet: 401 | :path: "../node_modules/react-native/Libraries/ActionSheetIOS" 402 | React-RCTAnimation: 403 | :path: "../node_modules/react-native/Libraries/NativeAnimation" 404 | React-RCTBlob: 405 | :path: "../node_modules/react-native/Libraries/Blob" 406 | React-RCTImage: 407 | :path: "../node_modules/react-native/Libraries/Image" 408 | React-RCTLinking: 409 | :path: "../node_modules/react-native/Libraries/LinkingIOS" 410 | React-RCTNetwork: 411 | :path: "../node_modules/react-native/Libraries/Network" 412 | React-RCTSettings: 413 | :path: "../node_modules/react-native/Libraries/Settings" 414 | React-RCTText: 415 | :path: "../node_modules/react-native/Libraries/Text" 416 | React-RCTVibration: 417 | :path: "../node_modules/react-native/Libraries/Vibration" 418 | ReactCommon: 419 | :path: "../node_modules/react-native/ReactCommon" 420 | Yoga: 421 | :path: "../node_modules/react-native/ReactCommon/yoga" 422 | 423 | SPEC CHECKSUMS: 424 | boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c 425 | CocoaAsyncSocket: 694058e7c0ed05a9e217d1b3c7ded962f4180845 426 | CocoaLibEvent: 2fab71b8bd46dd33ddb959f7928ec5909f838e3f 427 | DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2 428 | FBLazyVector: 4aab18c93cd9546e4bfed752b4084585eca8b245 429 | FBReactNativeSpec: 5465d51ccfeecb7faa12f9ae0024f2044ce4044e 430 | Flipper: 6c1f484f9a88d30ab3e272800d53688439e50f69 431 | Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41 432 | Flipper-Folly: 2de3d03e0acc7064d5e4ed9f730e2f217486f162 433 | Flipper-Glog: 1dfd6abf1e922806c52ceb8701a3599a79a200a6 434 | Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 435 | Flipper-RSocket: 1260a31c05c238eabfa9bb8a64e3983049048371 436 | FlipperKit: 6dc9b8f4ef60d9e5ded7f0264db299c91f18832e 437 | Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51 438 | glog: 1f3da668190260b06b429bb211bfbee5cd790c28 439 | JitsiMeetSDK: d4a3aeed1a75fd57e6a78e5d202b6051dfcb9320 440 | OpenSSL-Universal: 8b48cc0d10c1b2923617dfe5c178aa9ed2689355 441 | RCTRequired: cec6a34b3ac8a9915c37e7e4ad3aa74726ce4035 442 | RCTTypeSafety: 93006131180074cffa227a1075802c89a49dd4ce 443 | React: 29a8b1a02bd764fb7644ef04019270849b9a7ac3 444 | React-Core: b12bffb3f567fdf99510acb716ef1abd426e0e05 445 | React-CoreModules: 4a9b87bbe669d6c3173c0132c3328e3b000783d0 446 | React-cxxreact: e65f9c2ba0ac5be946f53548c1aaaee5873a8103 447 | React-jsi: b6dc94a6a12ff98e8877287a0b7620d365201161 448 | React-jsiexecutor: 1540d1c01bb493ae3124ed83351b1b6a155db7da 449 | React-jsinspector: 512e560d0e985d0e8c479a54a4e5c147a9c83493 450 | react-native-jitsi-meet: 29ed76cdc6142d9a6c013bb14dd6205df0b5452b 451 | React-RCTActionSheet: f41ea8a811aac770e0cc6e0ad6b270c644ea8b7c 452 | React-RCTAnimation: 49ab98b1c1ff4445148b72a3d61554138565bad0 453 | React-RCTBlob: a332773f0ebc413a0ce85942a55b064471587a71 454 | React-RCTImage: e70be9b9c74fe4e42d0005f42cace7981c994ac3 455 | React-RCTLinking: c1b9739a88d56ecbec23b7f63650e44672ab2ad2 456 | React-RCTNetwork: 73138b6f45e5a2768ad93f3d57873c2a18d14b44 457 | React-RCTSettings: 6e3738a87e21b39a8cb08d627e68c44acf1e325a 458 | React-RCTText: fae545b10cfdb3d247c36c56f61a94cfd6dba41d 459 | React-RCTVibration: 4356114dbcba4ce66991096e51a66e61eda51256 460 | ReactCommon: ed4e11d27609d571e7eee8b65548efc191116eb3 461 | Yoga: 3ebccbdd559724312790e7742142d062476b698e 462 | YogaKit: f782866e155069a2cca2517aafea43200b01fd5a 463 | 464 | PODFILE CHECKSUM: 37da90c8afd244e9757d54eccf02234471bca130 465 | 466 | COCOAPODS: 1.9.0 467 | -------------------------------------------------------------------------------- /ExampleApp/metro.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Metro configuration for React Native 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | */ 7 | 8 | module.exports = { 9 | transformer: { 10 | getTransformOptions: async () => ({ 11 | transform: { 12 | experimentalImportSupport: false, 13 | inlineRequires: false, 14 | }, 15 | }), 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /ExampleApp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Exemple", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "android": "react-native run-android", 7 | "ios": "react-native run-ios", 8 | "start": "react-native start", 9 | "test": "jest", 10 | "lint": "eslint ." 11 | }, 12 | "dependencies": { 13 | "react": "16.11.0", 14 | "react-native": "0.62.2", 15 | "react-native-jitsi-meet": "^2.1.1" 16 | }, 17 | "devDependencies": { 18 | "@babel/core": "^7.6.2", 19 | "@babel/runtime": "^7.6.2", 20 | "@react-native-community/eslint-config": "^0.0.5", 21 | "babel-jest": "^24.9.0", 22 | "eslint": "^6.5.1", 23 | "jest": "^24.9.0", 24 | "metro-react-native-babel-preset": "^0.58.0", 25 | "react-test-renderer": "16.11.0" 26 | }, 27 | "jest": { 28 | "preset": "react-native" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | | :exclamation: This library is now deprecated since the jitsi Team published [an official react native sdk](https://jitsi.github.io/handbook/docs/dev-guide/dev-guide-react-native-sdk/) | 2 | |-----------------------------------------| 3 | 4 | # react-native-jitsi-meet 5 | React native wrapper for Jitsi Meet SDK 6 | 7 | ## Important notice 8 | 9 | Jitsi Meet SDK is a packed React Native SDK. Running react-native-jitsi-meet will run this React Native SDK inside your React Native app. We know that this is suboptimal but sadly we did not find any other solution without massive rewrite of Jitsi Meet SDK. Compatibility with other libraries used internally by Jitsi Meet SDK might be broken (version mismatch) or you might experience performance issues or touch issues in some edge cases. 10 | 11 | ## Install 12 | 13 | `npm install react-native-jitsi-meet --save` 14 | 15 | If you are using React-Native < 0.60, you should use a version < 2.0.0. 16 | For versions higher than 2.0.0, you need to add the following piece of code in your ```metro.config.js``` file to avoid conflicts between react-native-jitsi-meet and react-native in metro bundler. 17 | 18 | ``` 19 | const blacklist = require('metro-config/src/defaults/blacklist'); 20 | 21 | module.exports = { 22 | resolver: { 23 | blacklistRE: blacklist([ 24 | /ios\/Pods\/JitsiMeetSDK\/Frameworks\/JitsiMeet.framework\/assets\/node_modules\/react-native\/.*/, 25 | ]), 26 | }, 27 | }; 28 | ``` 29 | 30 | Although most of the process is automated, you still have to follow the platform install guide below ([iOS](#ios-install-for-rn--060) and [Android](#android-install)) to get this library to work. 31 | 32 | 33 | ## Use (>= 2.0.0) 34 | 35 | The following component is an example of use: 36 | 37 | ``` 38 | import React, { useEffect } from 'react'; 39 | import { View } from 'react-native'; 40 | import JitsiMeet, { JitsiMeetView } from 'react-native-jitsi-meet'; 41 | 42 | const VideoCall = () => { 43 | const onConferenceTerminated = (nativeEvent) => { 44 | /* Conference terminated event */ 45 | } 46 | 47 | const onConferenceJoined = (nativeEvent) => { 48 | /* Conference joined event */ 49 | } 50 | 51 | const onConferenceWillJoin= (nativeEvent) => { 52 | /* Conference will join event */ 53 | } 54 | 55 | useEffect(() => { 56 | setTimeout(() => { 57 | const url = 'https://meet.jit.si/deneme'; // can also be only room name and will connect to jitsi meet servers 58 | const userInfo = { displayName: 'User', email: 'user@example.com', avatar: 'https:/gravatar.com/avatar/abc123' }; 59 | const options = { 60 | audioMuted: false, 61 | audioOnly: false, 62 | videoMuted: false, 63 | subject: "your subject", 64 | token: "your token" 65 | } 66 | const meetFeatureFlags = { 67 | addPeopleEnabled: true, 68 | calendarEnabled: true, 69 | callIntegrationEnabled: true, 70 | chatEnabled: true, 71 | closeCaptionsEnabled: true, 72 | inviteEnabled: true, 73 | androidScreenSharingEnabled: true, 74 | liveStreamingEnabled: true, 75 | meetingNameEnabled: true, 76 | meetingPasswordEnabled: true, 77 | pipEnabled: true, 78 | kickOutEnabled: true, 79 | conferenceTimerEnabled: true, 80 | videoShareButtonEnabled: true, 81 | recordingEnabled: true, 82 | reactionsEnabled: true, 83 | raiseHandEnabled: true, 84 | tileViewEnabled: true, 85 | toolboxAlwaysVisible: false, 86 | toolboxEnabled: true, 87 | welcomePageEnabled: false, 88 | } 89 | JitsiMeet.call(url, userInfo, options, meetFeatureFlags); 90 | /* You can also use JitsiMeet.audioCall(url) for audio only call */ 91 | /* You can programmatically end the call with JitsiMeet.endCall() */ 92 | }, 1000); 93 | }, []) 94 | 95 | return ( 96 | 97 | 98 | 99 | ) 100 | } 101 | 102 | export default VideoCall; 103 | ``` 104 | 105 | You can also check the [ExampleApp](https://github.com/skrafft/react-native-jitsi-meet/tree/master/ExampleApp) 106 | 107 | ### Events 108 | 109 | You can add listeners for the following events: 110 | - onConferenceJoined 111 | - onConferenceTerminated 112 | - onConferenceWillJoin 113 | 114 | 115 | ## Use (< 2.0.0 and RN<0.60) 116 | 117 | In your component, 118 | 119 | 1.) import JitsiMeet and JitsiMeetEvents: `import JitsiMeet, { JitsiMeetEvents } from 'react-native-jitsi-meet';` 120 | 121 | 2.) add the following code: 122 | 123 | ``` 124 | const initiateVideoCall = () => { 125 | JitsiMeet.initialize(); 126 | JitsiMeetEvents.addListener('CONFERENCE_LEFT', (data) => { 127 | console.log('CONFERENCE_LEFT'); 128 | }); 129 | setTimeout(() => { 130 | JitsiMeet.call(``); 131 | }, 1000); 132 | }; 133 | ``` 134 | ### Events 135 | 136 | You can add listeners for the following events: 137 | - CONFERENCE_JOINED 138 | - CONFERENCE_LEFT 139 | - CONFERENCE_WILL_JOIN 140 | 141 | ## iOS Configuration 142 | 143 | 1.) navigate to `/ios//` 144 | 2.) edit `Info.plist` and add the following lines 145 | 146 | ``` 147 | NSCameraUsageDescription 148 | Camera Permission 149 | NSMicrophoneUsageDescription 150 | Microphone Permission 151 | ``` 152 | 3.) in `Info.plist`, make sure that 153 | ``` 154 | UIBackgroundModes 155 | 156 | 157 | ``` 158 | contains `voip` 159 | 160 | ## iOS Install for RN >= 0.60 161 | 1.) Modify your Podfile to have ```platform :ios, '10.0'``` and execute ```pod install``` 162 | 2.) In Xcode, under Build setting set Enable Bitcode to No 163 | 164 | ## iOS Install for RN < 0.60 165 | ### Step 1. Add Files Into Project 166 | - 1-1.) in Xcode: Right click `Libraries` ➜ `Add Files to [project]` 167 | - 1-2.) choose `node_modules/react-native-jitsi-meet/ios/RNJitsiMeet.xcodeproj` then `Add` 168 | - 1-3.) add `node_modules/react-native-jitsi-meet/ios/WebRTC.framework` and `node_modules/react-native-jitsi-meet/ios/JitsiMeet.framework` to the Frameworks folder 169 | - 1-4.) add `node_modules/react-native-jitsi-meet/ios/JitsiMeet.storyboard` in the same folder as AppDelegate.m 170 | - 1-5.) Replace the following code in AppDelegate.m: 171 | 172 | ``` 173 | UIViewController *rootViewController = [UIViewController new]; 174 | rootViewController.view = rootView; 175 | self.window.rootViewController = rootViewController; 176 | ``` 177 | with this one 178 | ``` 179 | UIViewController *rootViewController = [UIViewController new]; 180 | UINavigationController *navigationController = [[UINavigationController alloc]initWithRootViewController:rootViewController]; 181 | navigationController.navigationBarHidden = YES; 182 | rootViewController.view = rootView; 183 | self.window.rootViewController = navigationController; 184 | ``` 185 | 186 | This will create a navigation controller to be able to navigate between the Jitsi component and your react native screens. 187 | 188 | ### Step 2. Add Library Search Path 189 | 190 | 2-1.) select `Build Settings`, find `Search Paths` 191 | 2-2.) edit BOTH `Framework Search Paths` and `Library Search Paths` 192 | 2-3.) add path on BOTH sections with: `$(SRCROOT)/../node_modules/react-native-jitsi-meet/ios` with `recursive` 193 | 194 | ### Step 3. Change General Setting and Embed Framework 195 | 196 | 3-1.) go to `General` tab 197 | 3-2.) change `Deployment Target` to `8.0` 198 | 3-3.) add `WebRTC.framework` and `JitsiMeet.framework` in `Embedded Binaries` 199 | 200 | ### Step 4. Link/Include Necessary Libraries 201 | 202 | - 4-1.) click `Build Phases` tab, open `Link Binary With Libraries` 203 | - 4-2.) add `libRNJitsiMeet.a` 204 | - 4-3.) make sure `WebRTC.framework` and `JitsiMeet.framework` linked 205 | - 4-4.) add the following libraries depending on your version of XCode, some libraries might exist or not: 206 | 207 | ``` 208 | AVFoundation.framework 209 | AudioToolbox.framework 210 | CoreGraphics.framework 211 | GLKit.framework 212 | CoreAudio.framework 213 | CoreVideo.framework 214 | VideoToolbox.framework 215 | libc.tbd 216 | libsqlite3.tbd 217 | libstdc++.tbd 218 | libc++.tbd 219 | ``` 220 | 221 | - 4-5.) Under `Build setting` set `Dead Code Stripping` to `No`, set `Enable Bitcode` to `No` and `Always Embed Swift Standard Libraries` to `Yes` 222 | - 4-6.) Add the following script in a new "Run Script" phase in "Build Phases": 223 | 224 | ``` 225 | echo "Target architectures: $ARCHS" 226 | 227 | APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}" 228 | 229 | find "$APP_PATH" -name '*.framework' -type d | while read -r FRAMEWORK 230 | do 231 | FRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable) 232 | FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME" 233 | echo "Executable is $FRAMEWORK_EXECUTABLE_PATH" 234 | echo $(lipo -info "$FRAMEWORK_EXECUTABLE_PATH") 235 | 236 | FRAMEWORK_TMP_PATH="$FRAMEWORK_EXECUTABLE_PATH-tmp" 237 | 238 | # remove simulator's archs if location is not simulator's directory 239 | case "${TARGET_BUILD_DIR}" in 240 | *"iphonesimulator") 241 | echo "No need to remove archs" 242 | ;; 243 | *) 244 | if $(lipo "$FRAMEWORK_EXECUTABLE_PATH" -verify_arch "i386") ; then 245 | lipo -output "$FRAMEWORK_TMP_PATH" -remove "i386" "$FRAMEWORK_EXECUTABLE_PATH" 246 | echo "i386 architecture removed" 247 | rm "$FRAMEWORK_EXECUTABLE_PATH" 248 | mv "$FRAMEWORK_TMP_PATH" "$FRAMEWORK_EXECUTABLE_PATH" 249 | fi 250 | if $(lipo "$FRAMEWORK_EXECUTABLE_PATH" -verify_arch "x86_64") ; then 251 | lipo -output "$FRAMEWORK_TMP_PATH" -remove "x86_64" "$FRAMEWORK_EXECUTABLE_PATH" 252 | echo "x86_64 architecture removed" 253 | rm "$FRAMEWORK_EXECUTABLE_PATH" 254 | mv "$FRAMEWORK_TMP_PATH" "$FRAMEWORK_EXECUTABLE_PATH" 255 | fi 256 | ;; 257 | esac 258 | 259 | echo "Completed for executable $FRAMEWORK_EXECUTABLE_PATH" 260 | echo $ 261 | 262 | done 263 | ``` 264 | This will run a script everytime you build to clean the unwanted architecture 265 | 266 | ## Android Install 267 | 1.) In `android/app/build.gradle`, add/replace the following lines: 268 | 269 | ``` 270 | project.ext.react = [ 271 | entryFile: "index.js", 272 | bundleAssetName: "app.bundle", 273 | ] 274 | ``` 275 | 276 | 2.) In `android/app/src/main/java/com/xxx/MainApplication.java` add/replace the following methods: 277 | 278 | ``` 279 | import androidx.annotation.Nullable; // <--- Add this line if not already existing 280 | ... 281 | @Override 282 | protected String getJSMainModuleName() { 283 | return "index"; 284 | } 285 | 286 | @Override 287 | protected @Nullable String getBundleAssetName() { 288 | return "app.bundle"; 289 | } 290 | ``` 291 | 292 | 3.) In `android/build.gradle`, add the following code 293 | ``` 294 | allprojects { 295 | repositories { 296 | mavenLocal() 297 | jcenter() 298 | maven { 299 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 300 | url "$rootDir/../node_modules/react-native/android" 301 | } 302 | maven { 303 | url "https://maven.google.com" 304 | } 305 | maven { // <---- Add this block 306 | url "https://github.com/jitsi/jitsi-maven-repository/raw/master/releases" 307 | } 308 | maven { url "https://jitpack.io" } 309 | } 310 | } 311 | ``` 312 | 313 | ## Android Additional Install for RN < 0.60 314 | 315 | 1.) In `android/app/src/main/AndroidManifest.xml` add these permissions 316 | 317 | ```xml 318 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 334 | 335 | ``` 336 | 337 | 2.) In the `` section of `android/app/src/main/AndroidManifest.xml`, add 338 | ```xml 339 | 340 | ``` 341 | 342 | 3.) In `android/settings.gradle`, include react-native-jitsi-meet module 343 | ```gradle 344 | include ':react-native-jitsi-meet' 345 | project(':react-native-jitsi-meet').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-jitsi-meet/android') 346 | ``` 347 | 348 | 4.) In `android/app/build.gradle`, add react-native-jitsi-meet to dependencies 349 | ```gradle 350 | android { 351 | ... 352 | packagingOptions { 353 | pickFirst 'lib/x86/libc++_shared.so' 354 | pickFirst 'lib/x86/libjsc.so' 355 | pickFirst 'lib/x86_64/libjsc.so' 356 | pickFirst 'lib/arm64-v8a/libjsc.so' 357 | pickFirst 'lib/arm64-v8a/libc++_shared.so' 358 | pickFirst 'lib/x86_64/libc++_shared.so' 359 | pickFirst 'lib/armeabi-v7a/libc++_shared.so' 360 | pickFirst 'lib/armeabi-v7a/libjsc.so' 361 | } 362 | } 363 | dependencies { 364 | ... 365 | implementation(project(':react-native-jitsi-meet')) 366 | } 367 | ``` 368 | 369 | and set your minSdkVersion to be at least 24. 370 | 371 | 5.) In `android/app/src/main/java/com/xxx/MainApplication.java` 372 | 373 | ```java 374 | import com.reactnativejitsimeet.RNJitsiMeetPackage; // <--- Add this line 375 | import android.support.annotation.Nullable; // <--- Add this line if not already existing 376 | ... 377 | @Override 378 | protected List getPackages() { 379 | return Arrays.asList( 380 | new MainReactPackage(), 381 | new RNJitsiMeetPackage() // <--- Add this line 382 | ); 383 | } 384 | ``` 385 | 386 | 387 | ### Side-note 388 | 389 | If your app already includes `react-native-locale-detector` or `react-native-vector-icons`, you must exclude them from the `react-native-jitsi-meet` project implementation with the following code (even if you're app uses autolinking with RN > 0.60): 390 | 391 | ``` 392 | implementation(project(':react-native-jitsi-meet')) { 393 | exclude group: 'com.facebook.react',module:'react-native-locale-detector' 394 | exclude group: 'com.facebook.react',module:'react-native-vector-icons' 395 | // Un-comment below if using hermes 396 | //exclude group: 'com.facebook',module:'hermes' 397 | // Un-comment any packages below that you have added to your project to prevent `duplicate_classes` errors 398 | //exclude group: 'com.facebook.react',module:'react-native-community-async-storage' 399 | //exclude group: 'com.facebook.react',module:'react-native-community_netinfo' 400 | //exclude group: 'com.facebook.react',module:'react-native-svg' 401 | //exclude group: 'com.facebook.react',module:'react-native-fetch-blob' 402 | //exclude group: 'com.facebook.react',module:'react-native-webview' 403 | //exclude group: 'com.facebook.react',module:'react-native-linear-gradient' 404 | //exclude group: 'com.facebook.react',module:'react-native-sound' 405 | } 406 | ``` 407 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.1.2' 9 | } 10 | } 11 | 12 | apply plugin: 'com.android.library' 13 | 14 | def DEFAULT_COMPILE_SDK_VERSION = 31 15 | def DEFAULT_BUILD_TOOLS_VERSION = "31.0.0" 16 | def DEFAULT_TARGET_SDK_VERSION = 31 17 | def DEFAULT_MIN_SDK_VERSION = 24 18 | 19 | android { 20 | compileSdkVersion rootProject.hasProperty('compileSdkVersion') ? rootProject.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION 21 | buildToolsVersion rootProject.hasProperty('buildToolsVersion') ? rootProject.buildToolsVersion : DEFAULT_BUILD_TOOLS_VERSION 22 | 23 | defaultConfig { 24 | minSdkVersion rootProject.hasProperty('minSdkVersion') ? rootProject.minSdkVersion : DEFAULT_MIN_SDK_VERSION 25 | targetSdkVersion rootProject.hasProperty('targetSdkVersion') ? rootProject.targetSdkVersion : DEFAULT_TARGET_SDK_VERSION 26 | versionCode 1 27 | versionName "1.0" 28 | } 29 | lintOptions { 30 | abortOnError false 31 | } 32 | compileOptions { 33 | sourceCompatibility JavaVersion.VERSION_1_8 34 | targetCompatibility JavaVersion.VERSION_1_8 35 | } 36 | } 37 | 38 | repositories { 39 | maven { 40 | url "https://github.com/jitsi/jitsi-maven-repository/raw/master/releases" 41 | } 42 | google() 43 | mavenCentral() 44 | jcenter() 45 | } 46 | 47 | dependencies { 48 | implementation ('org.jitsi.react:jitsi-meet-sdk:5.1.0') { 49 | transitive = true 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skrafft/react-native-jitsi-meet/c8bebd35025d8a900f5d8dbb5a6d0b6b31a19f8d/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Aug 08 08:07:38 CEST 2018 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip 7 | -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # For Cygwin, ensure paths are in UNIX format before anything is touched. 46 | if $cygwin ; then 47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 48 | fi 49 | 50 | # Attempt to set APP_HOME 51 | # Resolve links: $0 may be a link 52 | PRG="$0" 53 | # Need this for relative symlinks. 54 | while [ -h "$PRG" ] ; do 55 | ls=`ls -ld "$PRG"` 56 | link=`expr "$ls" : '.*-> \(.*\)$'` 57 | if expr "$link" : '/.*' > /dev/null; then 58 | PRG="$link" 59 | else 60 | PRG=`dirname "$PRG"`"/$link" 61 | fi 62 | done 63 | SAVED="`pwd`" 64 | cd "`dirname \"$PRG\"`/" >&- 65 | APP_HOME="`pwd -P`" 66 | cd "$SAVED" >&- 67 | 68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 69 | 70 | # Determine the Java command to use to start the JVM. 71 | if [ -n "$JAVA_HOME" ] ; then 72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 73 | # IBM's JDK on AIX uses strange locations for the executables 74 | JAVACMD="$JAVA_HOME/jre/sh/java" 75 | else 76 | JAVACMD="$JAVA_HOME/bin/java" 77 | fi 78 | if [ ! -x "$JAVACMD" ] ; then 79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 80 | 81 | Please set the JAVA_HOME variable in your environment to match the 82 | location of your Java installation." 83 | fi 84 | else 85 | JAVACMD="java" 86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 87 | 88 | Please set the JAVA_HOME variable in your environment to match the 89 | location of your Java installation." 90 | fi 91 | 92 | # Increase the maximum file descriptors if we can. 93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 94 | MAX_FD_LIMIT=`ulimit -H -n` 95 | if [ $? -eq 0 ] ; then 96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 97 | MAX_FD="$MAX_FD_LIMIT" 98 | fi 99 | ulimit -n $MAX_FD 100 | if [ $? -ne 0 ] ; then 101 | warn "Could not set maximum file descriptor limit: $MAX_FD" 102 | fi 103 | else 104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 105 | fi 106 | fi 107 | 108 | # For Darwin, add options to specify how the application appears in the dock 109 | if $darwin; then 110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 111 | fi 112 | 113 | # For Cygwin, switch paths to Windows format before running java 114 | if $cygwin ; then 115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 158 | function splitJvmOpts() { 159 | JVM_OPTS=("$@") 160 | } 161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 163 | 164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 165 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/src/main/java/com/reactnativejitsimeet/IRNJitsiMeetViewReference.java: -------------------------------------------------------------------------------- 1 | package com.reactnativejitsimeet; 2 | 3 | public interface IRNJitsiMeetViewReference { 4 | public void setJitsiMeetView(RNJitsiMeetView jitsiMeetView); 5 | 6 | public RNJitsiMeetView getJitsiMeetView(); 7 | } 8 | -------------------------------------------------------------------------------- /android/src/main/java/com/reactnativejitsimeet/RNJitsiMeetConferenceOptions.java: -------------------------------------------------------------------------------- 1 | package com.reactnativejitsimeet; 2 | 3 | import android.os.Bundle; 4 | import android.os.Parcel; 5 | import android.os.Parcelable; 6 | 7 | import java.net.URL; 8 | 9 | 10 | /** 11 | * This class represents the options when joining a Jitsi Meet conference. The user can create an 12 | * instance by using {@link RNJitsiMeetConferenceOptions.Builder} and setting the desired options 13 | * there. 14 | * 15 | * The resulting {@link RNJitsiMeetConferenceOptions} object is immutable and represents how the 16 | * conference will be joined. 17 | */ 18 | public class RNJitsiMeetConferenceOptions implements Parcelable { 19 | /** 20 | * Server where the conference should take place. 21 | */ 22 | private URL serverURL; 23 | /** 24 | * Room name. 25 | */ 26 | private String room; 27 | /** 28 | * Conference subject. 29 | */ 30 | private String subject; 31 | /** 32 | * JWT token used for authentication. 33 | */ 34 | private String token; 35 | 36 | /** 37 | * Color scheme override, see: https://github.com/jitsi/jitsi-meet/blob/dbedee5e22e5dcf9c92db96ef5bb3c9982fc526d/react/features/base/color-scheme/defaultScheme.js 38 | */ 39 | private Bundle colorScheme; 40 | 41 | /** 42 | * Feature flags. See: https://github.com/jitsi/jitsi-meet/blob/master/react/features/base/flags/constants.js 43 | */ 44 | private Bundle featureFlags; 45 | 46 | /** 47 | * Set to {@code true} to join the conference with audio / video muted or to start in audio 48 | * only mode respectively. 49 | */ 50 | private Boolean audioMuted; 51 | private Boolean audioOnly; 52 | private Boolean videoMuted; 53 | 54 | /** 55 | * USer information, to be used when no token is specified. 56 | */ 57 | private RNJitsiMeetUserInfo userInfo; 58 | 59 | /** 60 | * Class used to build the immutable {@link RNJitsiMeetConferenceOptions} object. 61 | */ 62 | public static class Builder { 63 | private URL serverURL; 64 | private String room; 65 | private String subject; 66 | private String token; 67 | 68 | private Bundle colorScheme; 69 | private Bundle featureFlags; 70 | 71 | private Boolean audioMuted; 72 | private Boolean audioOnly; 73 | private Boolean videoMuted; 74 | 75 | private RNJitsiMeetUserInfo userInfo; 76 | 77 | public Builder() { 78 | featureFlags = new Bundle(); 79 | } 80 | 81 | /**\ 82 | * Sets the server URL. 83 | * @param url - {@link URL} of the server where the conference should take place. 84 | * @return - The {@link Builder} object itself so the method calls can be chained. 85 | */ 86 | public Builder setServerURL(URL url) { 87 | this.serverURL = url; 88 | 89 | return this; 90 | } 91 | 92 | /** 93 | * Sets the room where the conference will take place. 94 | * @param room - Name of the room. 95 | * @return - The {@link Builder} object itself so the method calls can be chained. 96 | */ 97 | public Builder setRoom(String room) { 98 | this.room = room; 99 | 100 | return this; 101 | } 102 | 103 | /** 104 | * Sets the conference subject. 105 | * @param subject - Subject for the conference. 106 | * @return - The {@link Builder} object itself so the method calls can be chained. 107 | */ 108 | public Builder setSubject(String subject) { 109 | this.subject = subject; 110 | 111 | return this; 112 | } 113 | 114 | /** 115 | * Sets the JWT token to be used for authentication when joining a conference. 116 | * @param token - The JWT token to be used for authentication. 117 | * @return - The {@link Builder} object itself so the method calls can be chained. 118 | */ 119 | public Builder setToken(String token) { 120 | this.token = token; 121 | 122 | return this; 123 | } 124 | 125 | /** 126 | * Sets the color scheme override so the app is themed. See: 127 | * https://github.com/jitsi/jitsi-meet/blob/master/react/features/base/color-scheme/defaultScheme.js 128 | * for the structure. 129 | * @param colorScheme - A color scheme to be applied to the app. 130 | * @return - The {@link Builder} object itself so the method calls can be chained. 131 | */ 132 | public Builder setColorScheme(Bundle colorScheme) { 133 | this.colorScheme = colorScheme; 134 | 135 | return this; 136 | } 137 | 138 | /** 139 | * Indicates the conference will be joined with the microphone muted. 140 | * @param muted - Muted indication. 141 | * @return - The {@link Builder} object itself so the method calls can be chained. 142 | */ 143 | public Builder setAudioMuted(boolean muted) { 144 | this.audioMuted = muted; 145 | 146 | return this; 147 | } 148 | 149 | /** 150 | * Indicates the conference will be joined in audio-only mode. In this mode no video is 151 | * sent or received. 152 | * @param audioOnly - Audio-mode indicator. 153 | * @return - The {@link Builder} object itself so the method calls can be chained. 154 | */ 155 | public Builder setAudioOnly(boolean audioOnly) { 156 | this.audioOnly = audioOnly; 157 | 158 | return this; 159 | } 160 | /** 161 | * Indicates the conference will be joined with the camera muted. 162 | * @param videoMuted - Muted indication. 163 | * @return - The {@link Builder} object itself so the method calls can be chained. 164 | */ 165 | public Builder setVideoMuted(boolean videoMuted) { 166 | this.videoMuted = videoMuted; 167 | 168 | return this; 169 | } 170 | 171 | /** 172 | * Sets the welcome page enabled / disabled. The welcome page lists recent meetings and 173 | * calendar appointments and it's meant to be used by standalone applications. Defaults to 174 | * false. 175 | * @param enabled - Whether the welcome page should be enabled or not. 176 | * @return - The {@link Builder} object itself so the method calls can be chained. 177 | */ 178 | public Builder setWelcomePageEnabled(boolean enabled) { 179 | this.featureFlags.putBoolean("welcomepage.enabled", enabled); 180 | 181 | return this; 182 | } 183 | 184 | public Builder setFeatureFlag(String flag, boolean value) { 185 | this.featureFlags.putBoolean(flag, value); 186 | 187 | return this; 188 | } 189 | 190 | public Builder setFeatureFlag(String flag, String value) { 191 | this.featureFlags.putString(flag, value); 192 | 193 | return this; 194 | } 195 | 196 | public Builder setFeatureFlag(String flag, int value) { 197 | this.featureFlags.putInt(flag, value); 198 | 199 | return this; 200 | } 201 | 202 | public Builder setUserInfo(RNJitsiMeetUserInfo userInfo) { 203 | this.userInfo = userInfo; 204 | 205 | return this; 206 | } 207 | 208 | /** 209 | * Builds the immutable {@link RNJitsiMeetConferenceOptions} object with the configuration 210 | * that this {@link Builder} instance specified. 211 | * @return - The built {@link RNJitsiMeetConferenceOptions} object. 212 | */ 213 | public RNJitsiMeetConferenceOptions build() { 214 | RNJitsiMeetConferenceOptions options = new RNJitsiMeetConferenceOptions(); 215 | 216 | options.serverURL = this.serverURL; 217 | options.room = this.room; 218 | options.subject = this.subject; 219 | options.token = this.token; 220 | options.colorScheme = this.colorScheme; 221 | options.featureFlags = this.featureFlags; 222 | options.audioMuted = this.audioMuted; 223 | options.audioOnly = this.audioOnly; 224 | options.videoMuted = this.videoMuted; 225 | options.userInfo = this.userInfo; 226 | 227 | return options; 228 | } 229 | } 230 | 231 | private RNJitsiMeetConferenceOptions() { 232 | } 233 | 234 | private RNJitsiMeetConferenceOptions(Parcel in) { 235 | room = in.readString(); 236 | subject = in.readString(); 237 | token = in.readString(); 238 | colorScheme = in.readBundle(); 239 | featureFlags = in.readBundle(); 240 | userInfo = new RNJitsiMeetUserInfo(in.readBundle()); 241 | byte tmpAudioMuted = in.readByte(); 242 | audioMuted = tmpAudioMuted == 0 ? null : tmpAudioMuted == 1; 243 | byte tmpAudioOnly = in.readByte(); 244 | audioOnly = tmpAudioOnly == 0 ? null : tmpAudioOnly == 1; 245 | byte tmpVideoMuted = in.readByte(); 246 | videoMuted = tmpVideoMuted == 0 ? null : tmpVideoMuted == 1; 247 | } 248 | 249 | Bundle asProps() { 250 | Bundle props = new Bundle(); 251 | 252 | // Android always has the PiP flag set by default. 253 | if (!featureFlags.containsKey("pip.enabled")) { 254 | featureFlags.putBoolean("pip.enabled", true); 255 | } 256 | 257 | props.putBundle("flags", featureFlags); 258 | 259 | if (colorScheme != null) { 260 | props.putBundle("colorScheme", colorScheme); 261 | } 262 | 263 | Bundle config = new Bundle(); 264 | 265 | if (audioMuted != null) { 266 | config.putBoolean("startWithAudioMuted", audioMuted); 267 | } 268 | if (audioOnly != null) { 269 | config.putBoolean("startAudioOnly", audioOnly); 270 | } 271 | if (videoMuted != null) { 272 | config.putBoolean("startWithVideoMuted", videoMuted); 273 | } 274 | if (subject != null) { 275 | config.putString("subject", subject); 276 | } 277 | 278 | Bundle urlProps = new Bundle(); 279 | 280 | // The room is fully qualified 281 | if (room != null && room.contains("://")) { 282 | urlProps.putString("url", room); 283 | } else { 284 | if (serverURL != null) { 285 | urlProps.putString("serverURL", serverURL.toString()); 286 | } 287 | if (room != null) { 288 | urlProps.putString("room", room); 289 | } 290 | } 291 | 292 | if (token != null) { 293 | urlProps.putString("jwt", token); 294 | } 295 | 296 | if (token == null && userInfo != null) { 297 | props.putBundle("userInfo", userInfo.asBundle()); 298 | } 299 | 300 | urlProps.putBundle("config", config); 301 | props.putBundle("url", urlProps); 302 | 303 | return props; 304 | } 305 | 306 | // Parcelable interface 307 | // 308 | 309 | public static final Creator CREATOR = new Creator() { 310 | @Override 311 | public RNJitsiMeetConferenceOptions createFromParcel(Parcel in) { 312 | return new RNJitsiMeetConferenceOptions(in); 313 | } 314 | 315 | @Override 316 | public RNJitsiMeetConferenceOptions[] newArray(int size) { 317 | return new RNJitsiMeetConferenceOptions[size]; 318 | } 319 | }; 320 | 321 | @Override 322 | public void writeToParcel(Parcel dest, int flags) { 323 | dest.writeString(room); 324 | dest.writeString(subject); 325 | dest.writeString(token); 326 | dest.writeBundle(colorScheme); 327 | dest.writeBundle(featureFlags); 328 | dest.writeBundle(userInfo != null ? userInfo.asBundle() : new Bundle()); 329 | dest.writeByte((byte) (audioMuted == null ? 0 : audioMuted ? 1 : 2)); 330 | dest.writeByte((byte) (audioOnly == null ? 0 : audioOnly ? 1 : 2)); 331 | dest.writeByte((byte) (videoMuted == null ? 0 : videoMuted ? 1 : 2)); 332 | } 333 | 334 | @Override 335 | public int describeContents() { 336 | return 0; 337 | } 338 | } 339 | -------------------------------------------------------------------------------- /android/src/main/java/com/reactnativejitsimeet/RNJitsiMeetModule.java: -------------------------------------------------------------------------------- 1 | package com.reactnativejitsimeet; 2 | 3 | import android.util.Log; 4 | import java.net.URL; 5 | import java.net.MalformedURLException; 6 | 7 | import com.facebook.react.bridge.ReactApplicationContext; 8 | import com.facebook.react.bridge.ReactContextBaseJavaModule; 9 | import com.facebook.react.bridge.ReactMethod; 10 | import com.facebook.react.bridge.UiThreadUtil; 11 | import com.facebook.react.module.annotations.ReactModule; 12 | import com.facebook.react.bridge.ReadableMap; 13 | 14 | @ReactModule(name = RNJitsiMeetModule.MODULE_NAME) 15 | public class RNJitsiMeetModule extends ReactContextBaseJavaModule { 16 | public static final String MODULE_NAME = "RNJitsiMeetModule"; 17 | private IRNJitsiMeetViewReference mJitsiMeetViewReference; 18 | 19 | public RNJitsiMeetModule(ReactApplicationContext reactContext, IRNJitsiMeetViewReference jitsiMeetViewReference) { 20 | super(reactContext); 21 | mJitsiMeetViewReference = jitsiMeetViewReference; 22 | } 23 | 24 | @Override 25 | public String getName() { 26 | return MODULE_NAME; 27 | } 28 | 29 | @ReactMethod 30 | public void initialize() { 31 | Log.d("JitsiMeet", "Initialize is deprecated in v2"); 32 | } 33 | 34 | @ReactMethod 35 | public void call(String url, ReadableMap userInfo, ReadableMap meetOptions, ReadableMap meetFeatureFlags) { 36 | UiThreadUtil.runOnUiThread(new Runnable() { 37 | @Override 38 | public void run() { 39 | if (mJitsiMeetViewReference.getJitsiMeetView() != null) { 40 | RNJitsiMeetUserInfo _userInfo = new RNJitsiMeetUserInfo(); 41 | if (userInfo != null) { 42 | if (userInfo.hasKey("displayName")) { 43 | _userInfo.setDisplayName(userInfo.getString("displayName")); 44 | } 45 | if (userInfo.hasKey("email")) { 46 | _userInfo.setEmail(userInfo.getString("email")); 47 | } 48 | if (userInfo.hasKey("avatar")) { 49 | String avatarURL = userInfo.getString("avatar"); 50 | try { 51 | _userInfo.setAvatar(new URL(avatarURL)); 52 | } catch (MalformedURLException e) { 53 | } 54 | } 55 | } 56 | RNJitsiMeetConferenceOptions options = new RNJitsiMeetConferenceOptions.Builder() 57 | .setRoom(url) 58 | .setToken(meetOptions.hasKey("token") ? meetOptions.getString("token") : "") 59 | .setSubject(meetOptions.hasKey("subject") ? meetOptions.getString("subject") : "") 60 | .setAudioMuted(meetOptions.hasKey("audioMuted") ? meetOptions.getBoolean("audioMuted") : false) 61 | .setAudioOnly(meetOptions.hasKey("audioOnly") ? meetOptions.getBoolean("audioOnly") : false) 62 | .setVideoMuted(meetOptions.hasKey("videoMuted") ? meetOptions.getBoolean("videoMuted") : false) 63 | .setUserInfo(_userInfo) 64 | .setFeatureFlag("add-people.enabled", meetFeatureFlags.hasKey("addPeopleEnabled") ? meetFeatureFlags.getBoolean("addPeopleEnabled") : true) 65 | .setFeatureFlag("calendar.enabled", meetFeatureFlags.hasKey("calendarEnabled") ?meetFeatureFlags.getBoolean("calendarEnabled") : true) 66 | .setFeatureFlag("call-integration.enabled", meetFeatureFlags.hasKey("callIntegrationEnabled") ?meetFeatureFlags.getBoolean("callIntegrationEnabled") : true) 67 | .setFeatureFlag("chat.enabled", meetFeatureFlags.hasKey("chatEnabled") ?meetFeatureFlags.getBoolean("chatEnabled") : true) 68 | .setFeatureFlag("close-captions.enabled", meetFeatureFlags.hasKey("closeCaptionsEnabled") ?meetFeatureFlags.getBoolean("closeCaptionsEnabled") : true) 69 | .setFeatureFlag("invite.enabled", meetFeatureFlags.hasKey("inviteEnabled") ?meetFeatureFlags.getBoolean("inviteEnabled") : true) 70 | .setFeatureFlag("android.screensharing.enabled", meetFeatureFlags.hasKey("androidScreenSharingEnabled") ?meetFeatureFlags.getBoolean("androidScreenSharingEnabled") : true) 71 | .setFeatureFlag("live-streaming.enabled", meetFeatureFlags.hasKey("liveStreamingEnabled") ?meetFeatureFlags.getBoolean("liveStreamingEnabled") : true) 72 | .setFeatureFlag("meeting-name.enabled", meetFeatureFlags.hasKey("meetingNameEnabled") ?meetFeatureFlags.getBoolean("meetingNameEnabled") : true) 73 | .setFeatureFlag("meeting-password.enabled", meetFeatureFlags.hasKey("meetingPasswordEnabled") ?meetFeatureFlags.getBoolean("meetingPasswordEnabled") : true) 74 | .setFeatureFlag("pip.enabled", meetFeatureFlags.hasKey("pipEnabled") ?meetFeatureFlags.getBoolean("pipEnabled") : true) 75 | .setFeatureFlag("kick-out.enabled", meetFeatureFlags.hasKey("kickOutEnabled") ?meetFeatureFlags.getBoolean("kickOutEnabled") : true) 76 | .setFeatureFlag("conference-timer.enabled", meetFeatureFlags.hasKey("conferenceTimerEnabled") ?meetFeatureFlags.getBoolean("conferenceTimerEnabled") : true) 77 | .setFeatureFlag("video-share.enabled", meetFeatureFlags.hasKey("videoShareEnabled") ?meetFeatureFlags.getBoolean("videoShareEnabled") : true) 78 | .setFeatureFlag("recording.enabled", meetFeatureFlags.hasKey("recordingEnabled") ?meetFeatureFlags.getBoolean("recordingEnabled") : true) 79 | .setFeatureFlag("reactions.enabled", meetFeatureFlags.hasKey("reactionsEnabled") ?meetFeatureFlags.getBoolean("reactionsEnabled") : true) 80 | .setFeatureFlag("raise-hand.enabled", meetFeatureFlags.hasKey("raiseHandEnabled") ?meetFeatureFlags.getBoolean("raiseHandEnabled") : true) 81 | .setFeatureFlag("tile-view.enabled", meetFeatureFlags.hasKey("tileViewEnabled") ?meetFeatureFlags.getBoolean("tileViewEnabled") : true) 82 | .setFeatureFlag("toolbox.alwaysVisible", meetFeatureFlags.hasKey("toolboxAlwaysVisible") ?meetFeatureFlags.getBoolean("toolboxAlwaysVisible") : false) 83 | .setFeatureFlag("toolbox.enabled", meetFeatureFlags.hasKey("toolboxEnabled") ?meetFeatureFlags.getBoolean("toolboxEnabled") : true) 84 | .setFeatureFlag("welcomepage.enabled", meetFeatureFlags.hasKey("welcomePageEnabled") ?meetFeatureFlags.getBoolean("welcomePageEnabled") : false) 85 | .setFeatureFlag("prejoinpage.enabled", meetFeatureFlags.hasKey("prejoinPageEnabled") ?meetFeatureFlags.getBoolean("prejoinPageEnabled") : false) 86 | .build(); 87 | mJitsiMeetViewReference.getJitsiMeetView().join(options); 88 | } 89 | } 90 | }); 91 | } 92 | 93 | @ReactMethod 94 | public void audioCall(String url, ReadableMap userInfo) { 95 | UiThreadUtil.runOnUiThread(new Runnable() { 96 | @Override 97 | public void run() { 98 | if (mJitsiMeetViewReference.getJitsiMeetView() != null) { 99 | RNJitsiMeetUserInfo _userInfo = new RNJitsiMeetUserInfo(); 100 | if (userInfo != null) { 101 | if (userInfo.hasKey("displayName")) { 102 | _userInfo.setDisplayName(userInfo.getString("displayName")); 103 | } 104 | if (userInfo.hasKey("email")) { 105 | _userInfo.setEmail(userInfo.getString("email")); 106 | } 107 | if (userInfo.hasKey("avatar")) { 108 | String avatarURL = userInfo.getString("avatar"); 109 | try { 110 | _userInfo.setAvatar(new URL(avatarURL)); 111 | } catch (MalformedURLException e) { 112 | } 113 | } 114 | } 115 | RNJitsiMeetConferenceOptions options = new RNJitsiMeetConferenceOptions.Builder() 116 | .setRoom(url) 117 | .setAudioOnly(true) 118 | .setUserInfo(_userInfo) 119 | .build(); 120 | mJitsiMeetViewReference.getJitsiMeetView().join(options); 121 | } 122 | } 123 | }); 124 | } 125 | 126 | @ReactMethod 127 | public void endCall() { 128 | UiThreadUtil.runOnUiThread(new Runnable() { 129 | @Override 130 | public void run() { 131 | if (mJitsiMeetViewReference.getJitsiMeetView() != null) { 132 | mJitsiMeetViewReference.getJitsiMeetView().leave(); 133 | } 134 | } 135 | }); 136 | } 137 | } 138 | -------------------------------------------------------------------------------- /android/src/main/java/com/reactnativejitsimeet/RNJitsiMeetPackage.java: -------------------------------------------------------------------------------- 1 | package com.reactnativejitsimeet; 2 | 3 | import com.facebook.react.ReactPackage; 4 | import com.facebook.react.bridge.JavaScriptModule; 5 | import com.facebook.react.bridge.NativeModule; 6 | import com.facebook.react.bridge.ReactApplicationContext; 7 | import com.facebook.react.uimanager.ViewManager; 8 | 9 | import java.util.ArrayList; 10 | import java.util.Arrays; 11 | import java.util.Collections; 12 | import java.util.List; 13 | 14 | public class RNJitsiMeetPackage implements ReactPackage, IRNJitsiMeetViewReference { 15 | 16 | private RNJitsiMeetView mJitsiMeetView = null; 17 | 18 | public void setJitsiMeetView(RNJitsiMeetView jitsiMeetView) { 19 | mJitsiMeetView = jitsiMeetView; 20 | } 21 | 22 | public RNJitsiMeetView getJitsiMeetView() { 23 | return mJitsiMeetView; 24 | } 25 | 26 | @Override 27 | public List createNativeModules(ReactApplicationContext reactContext) { 28 | List modules = new ArrayList<>(); 29 | modules.add(new RNJitsiMeetModule(reactContext, this)); 30 | return modules; 31 | } 32 | 33 | public List> createJSModules() { 34 | return Collections.emptyList(); 35 | } 36 | 37 | @Override 38 | public List createViewManagers(ReactApplicationContext reactContext) { 39 | return Arrays.asList( 40 | new RNJitsiMeetViewManager(reactContext, this) 41 | ); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /android/src/main/java/com/reactnativejitsimeet/RNJitsiMeetUserInfo.java: -------------------------------------------------------------------------------- 1 | package com.reactnativejitsimeet; 2 | 3 | import android.os.Bundle; 4 | 5 | import java.net.MalformedURLException; 6 | import java.net.URL; 7 | 8 | /** 9 | * This class represents user information to be passed to {@link RNJitsiMeetConferenceOptions} for 10 | * identifying a user. 11 | */ 12 | public class RNJitsiMeetUserInfo { 13 | /** 14 | * User's display name. 15 | */ 16 | private String displayName; 17 | 18 | /** 19 | * User's email address. 20 | */ 21 | private String email; 22 | 23 | /** 24 | * User's avatar URL. 25 | */ 26 | private URL avatar; 27 | 28 | public RNJitsiMeetUserInfo() {} 29 | 30 | public RNJitsiMeetUserInfo(Bundle b) { 31 | super(); 32 | 33 | if (b.containsKey("displayName")) { 34 | displayName = b.getString("displayName"); 35 | } 36 | 37 | if (b.containsKey("email")) { 38 | email = b.getString("email"); 39 | } 40 | 41 | if (b.containsKey("avatarURL")) { 42 | String avatarURL = b.getString("avatarURL"); 43 | try { 44 | avatar = new URL(avatarURL); 45 | } catch (MalformedURLException e) { 46 | } 47 | } 48 | } 49 | 50 | public String getDisplayName() { 51 | return displayName; 52 | } 53 | 54 | public void setDisplayName(String displayName) { 55 | this.displayName = displayName; 56 | } 57 | 58 | public String getEmail() { 59 | return email; 60 | } 61 | 62 | public void setEmail(String email) { 63 | this.email = email; 64 | } 65 | 66 | public URL getAvatar() { 67 | return avatar; 68 | } 69 | 70 | public void setAvatar(URL avatar) { 71 | this.avatar = avatar; 72 | } 73 | 74 | Bundle asBundle() { 75 | Bundle b = new Bundle(); 76 | 77 | if (displayName != null) { 78 | b.putString("displayName", displayName); 79 | } 80 | 81 | if (email != null) { 82 | b.putString("email", email); 83 | } 84 | 85 | if (avatar != null) { 86 | b.putString("avatarURL", avatar.toString()); 87 | } 88 | 89 | return b; 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /android/src/main/java/com/reactnativejitsimeet/RNJitsiMeetView.java: -------------------------------------------------------------------------------- 1 | package com.reactnativejitsimeet; 2 | 3 | import android.content.Context; 4 | import android.os.Bundle; 5 | import androidx.annotation.NonNull; 6 | import androidx.annotation.Nullable; 7 | 8 | import com.facebook.react.bridge.ReadableMap; 9 | 10 | import org.jitsi.meet.sdk.BaseReactView; 11 | import org.jitsi.meet.sdk.JitsiMeet; 12 | import org.jitsi.meet.sdk.JitsiMeetViewListener; 13 | import org.jitsi.meet.sdk.ListenerUtils; 14 | import org.jitsi.meet.sdk.log.JitsiMeetLogger; 15 | 16 | import java.lang.reflect.Method; 17 | import java.util.Map; 18 | 19 | 20 | public class RNJitsiMeetView extends BaseReactView 21 | implements RNOngoingConferenceTracker.OngoingConferenceListener { 22 | 23 | /** 24 | * The {@code Method}s of {@code JitsiMeetViewListener} by event name i.e. 25 | * redux action types. 26 | */ 27 | private static final Map LISTENER_METHODS 28 | = ListenerUtils.mapListenerMethods(JitsiMeetViewListener.class); 29 | 30 | /** 31 | * The URL of the current conference. 32 | */ 33 | // XXX Currently, one thread writes and one thread reads, so it should be 34 | // fine to have this field volatile without additional synchronization. 35 | private volatile String url; 36 | 37 | /** 38 | * Helper method to recursively merge 2 {@link Bundle} objects representing React Native props. 39 | * 40 | * @param a - The first {@link Bundle}. 41 | * @param b - The second {@link Bundle}. 42 | * @return The merged {@link Bundle} object. 43 | */ 44 | private static Bundle mergeProps(@Nullable Bundle a, @Nullable Bundle b) { 45 | Bundle result = new Bundle(); 46 | 47 | if (a == null) { 48 | if (b != null) { 49 | result.putAll(b); 50 | } 51 | 52 | return result; 53 | } 54 | 55 | if (b == null) { 56 | result.putAll(a); 57 | 58 | return result; 59 | } 60 | 61 | // Start by putting all of a in the result. 62 | result.putAll(a); 63 | 64 | // Iterate over each key in b and override if appropriate. 65 | for (String key : b.keySet()) { 66 | Object bValue = b.get(key); 67 | Object aValue = a.get(key); 68 | String valueType = bValue.getClass().getSimpleName(); 69 | 70 | if (valueType.contentEquals("Boolean")) { 71 | result.putBoolean(key, (Boolean)bValue); 72 | } else if (valueType.contentEquals("String")) { 73 | result.putString(key, (String)bValue); 74 | } else if (valueType.contentEquals("Bundle")) { 75 | result.putBundle(key, mergeProps((Bundle)aValue, (Bundle)bValue)); 76 | } else { 77 | throw new RuntimeException("Unsupported type: " + valueType); 78 | } 79 | } 80 | 81 | return result; 82 | } 83 | 84 | public RNJitsiMeetView(@NonNull Context context) { 85 | super(context); 86 | 87 | RNOngoingConferenceTracker.getInstance().addListener(this); 88 | } 89 | 90 | @Override 91 | public void dispose() { 92 | RNOngoingConferenceTracker.getInstance().removeListener(this); 93 | super.dispose(); 94 | } 95 | 96 | /** 97 | * Enters Picture-In-Picture mode, if possible. This method is designed to 98 | * be called from the {@code Activity.onUserLeaveHint} method. 99 | * 100 | * This is currently not mandatory, but if used will provide automatic 101 | * handling of the picture in picture mode when user minimizes the app. It 102 | * will be probably the most useful in case the app is using the welcome 103 | * page. 104 | */ 105 | public void enterPictureInPicture() { 106 | JitsiMeetLogger.e("PiP not supported"); 107 | } 108 | 109 | /** 110 | * Joins the conference specified by the given {@link RNJitsiMeetConferenceOptions}. If there is 111 | * already an active conference, it will be left and the new one will be joined. 112 | * @param options - Description of what conference must be joined and what options will be used 113 | * when doing so. 114 | */ 115 | public void join(@Nullable RNJitsiMeetConferenceOptions options) { 116 | setProps(options != null ? options.asProps() : new Bundle()); 117 | } 118 | 119 | /** 120 | * Leaves the currently active conference. 121 | */ 122 | public void leave() { 123 | setProps(new Bundle()); 124 | } 125 | 126 | /** 127 | * Helper method to set the React Native props. 128 | * @param newProps - New props to be set on the React Native view. 129 | */ 130 | private void setProps(@NonNull Bundle newProps) { 131 | // Merge the default options with the newly provided ones. 132 | Bundle props = mergeProps(new Bundle(), newProps); 133 | 134 | // XXX The setProps() method is supposed to be imperative i.e. 135 | // a second invocation with one and the same URL is expected to join 136 | // the respective conference again if the first invocation was followed 137 | // by leaving the conference. However, React and, respectively, 138 | // appProperties/initialProperties are declarative expressions i.e. one 139 | // and the same URL will not trigger an automatic re-render in the 140 | // JavaScript source code. The workaround implemented bellow introduces 141 | // "imperativeness" in React Component props by defining a unique value 142 | // per setProps() invocation. 143 | props.putLong("timestamp", System.currentTimeMillis()); 144 | 145 | createReactRootView("App", props); 146 | } 147 | 148 | /** 149 | * Handler for {@link RNOngoingConferenceTracker} events. 150 | * @param conferenceUrl 151 | */ 152 | @Override 153 | public void onCurrentConferenceChanged(String conferenceUrl) { 154 | // This property was introduced in order to address 155 | // an exception in the Picture-in-Picture functionality which arose 156 | // because of delays related to bridging between JavaScript and Java. To 157 | // reduce these delays do not wait for the call to be transferred to the 158 | // UI thread. 159 | this.url = conferenceUrl; 160 | } 161 | 162 | /** 163 | * 164 | * @param name The name of the event. 165 | * @param data The details/specifics of the event to send determined 166 | * by/associated with the specified {@code name}. 167 | */ 168 | @Override 169 | protected void onExternalAPIEvent(String name, ReadableMap data) { 170 | onExternalAPIEvent(LISTENER_METHODS, name, data); 171 | } 172 | } -------------------------------------------------------------------------------- /android/src/main/java/com/reactnativejitsimeet/RNJitsiMeetViewManager.java: -------------------------------------------------------------------------------- 1 | package com.reactnativejitsimeet; 2 | 3 | import com.facebook.react.bridge.Arguments; 4 | import com.facebook.react.bridge.ReactApplicationContext; 5 | import com.facebook.react.bridge.ReactContext; 6 | import com.facebook.react.bridge.WritableMap; 7 | import com.facebook.react.common.MapBuilder; 8 | import com.facebook.react.uimanager.SimpleViewManager; 9 | import com.facebook.react.uimanager.ThemedReactContext; 10 | import com.facebook.react.uimanager.events.RCTEventEmitter; 11 | import com.facebook.react.module.annotations.ReactModule; 12 | 13 | import org.jitsi.meet.sdk.JitsiMeetViewListener; 14 | 15 | import java.util.Map; 16 | 17 | import static java.security.AccessController.getContext; 18 | 19 | @ReactModule(name = RNJitsiMeetViewManager.REACT_CLASS) 20 | public class RNJitsiMeetViewManager extends SimpleViewManager implements JitsiMeetViewListener { 21 | public static final String REACT_CLASS = "RNJitsiMeetView"; 22 | private IRNJitsiMeetViewReference mJitsiMeetViewReference; 23 | private ReactApplicationContext mReactContext; 24 | 25 | public RNJitsiMeetViewManager(ReactApplicationContext reactContext, IRNJitsiMeetViewReference jitsiMeetViewReference) { 26 | mJitsiMeetViewReference = jitsiMeetViewReference; 27 | mReactContext = reactContext; 28 | } 29 | 30 | @Override 31 | public String getName() { 32 | return REACT_CLASS; 33 | } 34 | 35 | @Override 36 | public RNJitsiMeetView createViewInstance(ThemedReactContext context) { 37 | if (mJitsiMeetViewReference.getJitsiMeetView() == null) { 38 | RNJitsiMeetView view = new RNJitsiMeetView(context.getCurrentActivity()); 39 | view.setListener(this); 40 | mJitsiMeetViewReference.setJitsiMeetView(view); 41 | } 42 | return mJitsiMeetViewReference.getJitsiMeetView(); 43 | } 44 | 45 | public void onConferenceJoined(Map data) { 46 | WritableMap event = Arguments.createMap(); 47 | event.putString("url", (String) data.get("url")); 48 | mReactContext.getJSModule(RCTEventEmitter.class).receiveEvent( 49 | mJitsiMeetViewReference.getJitsiMeetView().getId(), 50 | "conferenceJoined", 51 | event); 52 | } 53 | 54 | public void onConferenceTerminated(Map data) { 55 | WritableMap event = Arguments.createMap(); 56 | event.putString("url", (String) data.get("url")); 57 | event.putString("error", (String) data.get("error")); 58 | mReactContext.getJSModule(RCTEventEmitter.class).receiveEvent( 59 | mJitsiMeetViewReference.getJitsiMeetView().getId(), 60 | "conferenceTerminated", 61 | event); 62 | } 63 | 64 | public void onConferenceWillJoin(Map data) { 65 | WritableMap event = Arguments.createMap(); 66 | event.putString("url", (String) data.get("url")); 67 | mReactContext.getJSModule(RCTEventEmitter.class).receiveEvent( 68 | mJitsiMeetViewReference.getJitsiMeetView().getId(), 69 | "conferenceWillJoin", 70 | event); 71 | } 72 | 73 | public Map getExportedCustomBubblingEventTypeConstants() { 74 | return MapBuilder.builder() 75 | .put("conferenceJoined", MapBuilder.of("phasedRegistrationNames", MapBuilder.of("bubbled", "onConferenceJoined"))) 76 | .put("conferenceTerminated", MapBuilder.of("phasedRegistrationNames", MapBuilder.of("bubbled", "onConferenceTerminated"))) 77 | .put("conferenceWillJoin", MapBuilder.of("phasedRegistrationNames", MapBuilder.of("bubbled", "onConferenceWillJoin"))) 78 | .build(); 79 | } 80 | } -------------------------------------------------------------------------------- /android/src/main/java/com/reactnativejitsimeet/RNOngoingConferenceTracker.java: -------------------------------------------------------------------------------- 1 | package com.reactnativejitsimeet; 2 | 3 | import com.facebook.react.bridge.ReadableMap; 4 | 5 | import java.util.Collection; 6 | import java.util.Collections; 7 | import java.util.HashSet; 8 | 9 | 10 | /** 11 | * Helper class to keep track of what the current conference is. 12 | */ 13 | class RNOngoingConferenceTracker { 14 | private static final RNOngoingConferenceTracker instance = new RNOngoingConferenceTracker(); 15 | 16 | private static final String CONFERENCE_WILL_JOIN = "CONFERENCE_WILL_JOIN"; 17 | private static final String CONFERENCE_TERMINATED = "CONFERENCE_TERMINATED"; 18 | 19 | private final Collection listeners = 20 | Collections.synchronizedSet(new HashSet()); 21 | private String currentConference; 22 | 23 | public RNOngoingConferenceTracker() { 24 | } 25 | 26 | public static RNOngoingConferenceTracker getInstance() { 27 | return instance; 28 | } 29 | 30 | /** 31 | * Gets the current active conference URL. 32 | * 33 | * @return - The current conference URL as a String. 34 | */ 35 | synchronized String getCurrentConference() { 36 | return currentConference; 37 | } 38 | 39 | synchronized void onExternalAPIEvent(String name, ReadableMap data) { 40 | if (!data.hasKey("url")) { 41 | return; 42 | } 43 | 44 | String url = data.getString("url"); 45 | if (url == null) { 46 | return; 47 | } 48 | 49 | switch(name) { 50 | case CONFERENCE_WILL_JOIN: 51 | currentConference = url; 52 | updateListeners(); 53 | break; 54 | 55 | case CONFERENCE_TERMINATED: 56 | if (url.equals(currentConference)) { 57 | currentConference = null; 58 | updateListeners(); 59 | } 60 | break; 61 | } 62 | } 63 | 64 | void addListener(OngoingConferenceListener listener) { 65 | listeners.add(listener); 66 | } 67 | 68 | void removeListener(OngoingConferenceListener listener) { 69 | listeners.remove(listener); 70 | } 71 | 72 | private void updateListeners() { 73 | synchronized (listeners) { 74 | for (OngoingConferenceListener listener : listeners) { 75 | listener.onCurrentConferenceChanged(currentConference); 76 | } 77 | } 78 | } 79 | 80 | public interface OngoingConferenceListener { 81 | void onCurrentConferenceChanged(String conferenceUrl); 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /android/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skrafft/react-native-jitsi-meet/c8bebd35025d8a900f5d8dbb5a6d0b6b31a19f8d/android/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Jan 04 11:16:36 CET 2018 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip 7 | -------------------------------------------------------------------------------- /index.android.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @providesModule JitsiMeet 3 | */ 4 | 5 | import { NativeModules, requireNativeComponent } from 'react-native'; 6 | 7 | export const JitsiMeetView = requireNativeComponent('RNJitsiMeetView'); 8 | export const JitsiMeetModule = NativeModules.RNJitsiMeetModule 9 | const call = JitsiMeetModule.call; 10 | const audioCall = JitsiMeetModule.audioCall; 11 | const endCall = JitsiMeetModule.endCall; 12 | JitsiMeetModule.call = (url, userInfo, meetOptions, meetFeatureFlags) => { 13 | userInfo = userInfo || {}; 14 | meetOptions = meetOptions || {}; 15 | meetFeatureFlags = meetFeatureFlags || {}; 16 | call(url, userInfo, meetOptions, meetFeatureFlags); 17 | } 18 | JitsiMeetModule.audioCall = (url, userInfo) => { 19 | userInfo = userInfo || {}; 20 | audioCall(url, userInfo); 21 | } 22 | JitsiMeetModule.endCall = () => { 23 | endCall(); 24 | } 25 | export default JitsiMeetModule; 26 | 27 | 28 | -------------------------------------------------------------------------------- /index.ios.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @providesModule JitsiMeet 3 | */ 4 | 5 | import { NativeModules, requireNativeComponent } from 'react-native'; 6 | 7 | export const JitsiMeetView = requireNativeComponent('RNJitsiMeetView'); 8 | export const JitsiMeetModule = NativeModules.RNJitsiMeetView; 9 | const call = JitsiMeetModule.call; 10 | const audioCall = JitsiMeetModule.audioCall; 11 | const endCall = JitsiMeetModule.endCall; 12 | JitsiMeetModule.call = (url, userInfo, meetOptions, meetFeatureFlags) => { 13 | userInfo = userInfo || {}; 14 | meetOptions = meetOptions || {}; 15 | meetFeatureFlags = meetFeatureFlags || {}; 16 | call(url, userInfo, meetOptions, meetFeatureFlags); 17 | } 18 | JitsiMeetModule.audioCall = (url, userInfo) => { 19 | userInfo = userInfo || {}; 20 | audioCall(url, userInfo); 21 | } 22 | JitsiMeetModule.endCall = () => { 23 | endCall(); 24 | } 25 | export default JitsiMeetModule; 26 | 27 | 28 | -------------------------------------------------------------------------------- /ios/RNJitsiMeet.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 96EBEF4E2115B4A500BFE51E /* WebRTC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 96EBEF4C2115B4A400BFE51E /* WebRTC.framework */; }; 11 | 96EBEF4F2115B4A500BFE51E /* JitsiMeet.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 96EBEF4D2115B4A500BFE51E /* JitsiMeet.framework */; }; 12 | 96EBF0042119CADA00BFE51E /* JitsiMeetViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 96EBF0032119CADA00BFE51E /* JitsiMeetViewController.m */; }; 13 | 96EBF0062119CCFB00BFE51E /* RNJitsiMeetNavigator.m in Sources */ = {isa = PBXBuildFile; fileRef = 96EBF0052119CCFB00BFE51E /* RNJitsiMeetNavigator.m */; }; 14 | /* End PBXBuildFile section */ 15 | 16 | /* Begin PBXCopyFilesBuildPhase section */ 17 | 014A3B5A1C6CF33500B6D375 /* CopyFiles */ = { 18 | isa = PBXCopyFilesBuildPhase; 19 | buildActionMask = 2147483647; 20 | dstPath = "include/$(PRODUCT_NAME)"; 21 | dstSubfolderSpec = 16; 22 | files = ( 23 | ); 24 | runOnlyForDeploymentPostprocessing = 0; 25 | }; 26 | /* End PBXCopyFilesBuildPhase section */ 27 | 28 | /* Begin PBXFileReference section */ 29 | 014A3B5C1C6CF33500B6D375 /* libRNJitsiMeet.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNJitsiMeet.a; sourceTree = BUILT_PRODUCTS_DIR; }; 30 | 96EBEF4C2115B4A400BFE51E /* WebRTC.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = WebRTC.framework; sourceTree = ""; }; 31 | 96EBEF4D2115B4A500BFE51E /* JitsiMeet.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = JitsiMeet.framework; sourceTree = ""; }; 32 | 96EBF0012119CA2500BFE51E /* JitsiMeet.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = JitsiMeet.storyboard; sourceTree = ""; }; 33 | 96EBF0022119CADA00BFE51E /* JitsiMeetViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JitsiMeetViewController.h; sourceTree = ""; }; 34 | 96EBF0032119CADA00BFE51E /* JitsiMeetViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JitsiMeetViewController.m; sourceTree = ""; }; 35 | 96EBF0052119CCFB00BFE51E /* RNJitsiMeetNavigator.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNJitsiMeetNavigator.m; sourceTree = ""; }; 36 | 96EBF0072119CD7000BFE51E /* RNJitsiMeetNavigator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNJitsiMeetNavigator.h; sourceTree = ""; }; 37 | /* End PBXFileReference section */ 38 | 39 | /* Begin PBXFrameworksBuildPhase section */ 40 | 014A3B591C6CF33500B6D375 /* Frameworks */ = { 41 | isa = PBXFrameworksBuildPhase; 42 | buildActionMask = 2147483647; 43 | files = ( 44 | 96EBEF4E2115B4A500BFE51E /* WebRTC.framework in Frameworks */, 45 | 96EBEF4F2115B4A500BFE51E /* JitsiMeet.framework in Frameworks */, 46 | ); 47 | runOnlyForDeploymentPostprocessing = 0; 48 | }; 49 | /* End PBXFrameworksBuildPhase section */ 50 | 51 | /* Begin PBXGroup section */ 52 | 014A3B531C6CF33500B6D375 = { 53 | isa = PBXGroup; 54 | children = ( 55 | 96EBF0072119CD7000BFE51E /* RNJitsiMeetNavigator.h */, 56 | 96EBF0052119CCFB00BFE51E /* RNJitsiMeetNavigator.m */, 57 | 96EBF0022119CADA00BFE51E /* JitsiMeetViewController.h */, 58 | 96EBF0032119CADA00BFE51E /* JitsiMeetViewController.m */, 59 | 96EBF0012119CA2500BFE51E /* JitsiMeet.storyboard */, 60 | 96EBEF4D2115B4A500BFE51E /* JitsiMeet.framework */, 61 | 96EBEF4C2115B4A400BFE51E /* WebRTC.framework */, 62 | 014A3B5D1C6CF33500B6D375 /* Products */, 63 | ); 64 | sourceTree = ""; 65 | }; 66 | 014A3B5D1C6CF33500B6D375 /* Products */ = { 67 | isa = PBXGroup; 68 | children = ( 69 | 014A3B5C1C6CF33500B6D375 /* libRNJitsiMeet.a */, 70 | ); 71 | name = Products; 72 | sourceTree = ""; 73 | }; 74 | /* End PBXGroup section */ 75 | 76 | /* Begin PBXNativeTarget section */ 77 | 014A3B5B1C6CF33500B6D375 /* RNJitsiMeet */ = { 78 | isa = PBXNativeTarget; 79 | buildConfigurationList = 014A3B651C6CF33500B6D375 /* Build configuration list for PBXNativeTarget "RNJitsiMeet" */; 80 | buildPhases = ( 81 | 014A3B581C6CF33500B6D375 /* Sources */, 82 | 014A3B591C6CF33500B6D375 /* Frameworks */, 83 | 014A3B5A1C6CF33500B6D375 /* CopyFiles */, 84 | ); 85 | buildRules = ( 86 | ); 87 | dependencies = ( 88 | ); 89 | name = RNJitsiMeet; 90 | productName = RNJitsiMeetSDK; 91 | productReference = 014A3B5C1C6CF33500B6D375 /* libRNJitsiMeet.a */; 92 | productType = "com.apple.product-type.library.static"; 93 | }; 94 | /* End PBXNativeTarget section */ 95 | 96 | /* Begin PBXProject section */ 97 | 014A3B541C6CF33500B6D375 /* Project object */ = { 98 | isa = PBXProject; 99 | attributes = { 100 | LastUpgradeCheck = 0720; 101 | ORGANIZATIONNAME = "Marc Shilling"; 102 | TargetAttributes = { 103 | 014A3B5B1C6CF33500B6D375 = { 104 | CreatedOnToolsVersion = 7.2.1; 105 | }; 106 | }; 107 | }; 108 | buildConfigurationList = 014A3B571C6CF33500B6D375 /* Build configuration list for PBXProject "RNJitsiMeet" */; 109 | compatibilityVersion = "Xcode 3.2"; 110 | developmentRegion = English; 111 | hasScannedForEncodings = 0; 112 | knownRegions = ( 113 | en, 114 | ); 115 | mainGroup = 014A3B531C6CF33500B6D375; 116 | productRefGroup = 014A3B5D1C6CF33500B6D375 /* Products */; 117 | projectDirPath = ""; 118 | projectRoot = ""; 119 | targets = ( 120 | 014A3B5B1C6CF33500B6D375 /* RNJitsiMeet */, 121 | ); 122 | }; 123 | /* End PBXProject section */ 124 | 125 | /* Begin PBXSourcesBuildPhase section */ 126 | 014A3B581C6CF33500B6D375 /* Sources */ = { 127 | isa = PBXSourcesBuildPhase; 128 | buildActionMask = 2147483647; 129 | files = ( 130 | 96EBF0042119CADA00BFE51E /* JitsiMeetViewController.m in Sources */, 131 | 96EBF0062119CCFB00BFE51E /* RNJitsiMeetNavigator.m in Sources */, 132 | ); 133 | runOnlyForDeploymentPostprocessing = 0; 134 | }; 135 | /* End PBXSourcesBuildPhase section */ 136 | 137 | /* Begin XCBuildConfiguration section */ 138 | 014A3B631C6CF33500B6D375 /* Debug */ = { 139 | isa = XCBuildConfiguration; 140 | buildSettings = { 141 | ALWAYS_SEARCH_USER_PATHS = NO; 142 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 143 | CLANG_CXX_LIBRARY = "libc++"; 144 | CLANG_ENABLE_MODULES = YES; 145 | CLANG_ENABLE_OBJC_ARC = YES; 146 | CLANG_WARN_BOOL_CONVERSION = YES; 147 | CLANG_WARN_CONSTANT_CONVERSION = YES; 148 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 149 | CLANG_WARN_EMPTY_BODY = YES; 150 | CLANG_WARN_ENUM_CONVERSION = YES; 151 | CLANG_WARN_INT_CONVERSION = YES; 152 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 153 | CLANG_WARN_UNREACHABLE_CODE = YES; 154 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 155 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 156 | COPY_PHASE_STRIP = NO; 157 | DEBUG_INFORMATION_FORMAT = dwarf; 158 | ENABLE_STRICT_OBJC_MSGSEND = YES; 159 | ENABLE_TESTABILITY = YES; 160 | GCC_C_LANGUAGE_STANDARD = gnu99; 161 | GCC_DYNAMIC_NO_PIC = NO; 162 | GCC_NO_COMMON_BLOCKS = YES; 163 | GCC_OPTIMIZATION_LEVEL = 0; 164 | GCC_PREPROCESSOR_DEFINITIONS = ( 165 | "DEBUG=1", 166 | "$(inherited)", 167 | ); 168 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 169 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 170 | GCC_WARN_UNDECLARED_SELECTOR = YES; 171 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 172 | GCC_WARN_UNUSED_FUNCTION = YES; 173 | GCC_WARN_UNUSED_VARIABLE = YES; 174 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 175 | MTL_ENABLE_DEBUG_INFO = YES; 176 | ONLY_ACTIVE_ARCH = YES; 177 | SDKROOT = iphoneos; 178 | }; 179 | name = Debug; 180 | }; 181 | 014A3B641C6CF33500B6D375 /* Release */ = { 182 | isa = XCBuildConfiguration; 183 | buildSettings = { 184 | ALWAYS_SEARCH_USER_PATHS = NO; 185 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 186 | CLANG_CXX_LIBRARY = "libc++"; 187 | CLANG_ENABLE_MODULES = YES; 188 | CLANG_ENABLE_OBJC_ARC = YES; 189 | CLANG_WARN_BOOL_CONVERSION = YES; 190 | CLANG_WARN_CONSTANT_CONVERSION = YES; 191 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 192 | CLANG_WARN_EMPTY_BODY = YES; 193 | CLANG_WARN_ENUM_CONVERSION = YES; 194 | CLANG_WARN_INT_CONVERSION = YES; 195 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 196 | CLANG_WARN_UNREACHABLE_CODE = YES; 197 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 198 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 199 | COPY_PHASE_STRIP = NO; 200 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 201 | ENABLE_NS_ASSERTIONS = NO; 202 | ENABLE_STRICT_OBJC_MSGSEND = YES; 203 | GCC_C_LANGUAGE_STANDARD = gnu99; 204 | GCC_NO_COMMON_BLOCKS = YES; 205 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 206 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 207 | GCC_WARN_UNDECLARED_SELECTOR = YES; 208 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 209 | GCC_WARN_UNUSED_FUNCTION = YES; 210 | GCC_WARN_UNUSED_VARIABLE = YES; 211 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 212 | MTL_ENABLE_DEBUG_INFO = NO; 213 | SDKROOT = iphoneos; 214 | VALIDATE_PRODUCT = YES; 215 | }; 216 | name = Release; 217 | }; 218 | 014A3B661C6CF33500B6D375 /* Debug */ = { 219 | isa = XCBuildConfiguration; 220 | buildSettings = { 221 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 222 | CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO; 223 | FRAMEWORK_SEARCH_PATHS = ( 224 | "$(inherited)", 225 | "$(PROJECT_DIR)", 226 | ); 227 | HEADER_SEARCH_PATHS = ( 228 | "$(inherited)", 229 | "$(SRCROOT)/../../node_modules/react-native/React/**", 230 | "$(SRCROOT)/../../node_modules/react-native/Libraries/**", 231 | ); 232 | OTHER_LDFLAGS = "-ObjC"; 233 | PRODUCT_NAME = "$(TARGET_NAME)"; 234 | SKIP_INSTALL = YES; 235 | SYSTEM_HEADER_SEARCH_PATHS = ""; 236 | USER_HEADER_SEARCH_PATHS = ""; 237 | }; 238 | name = Debug; 239 | }; 240 | 014A3B671C6CF33500B6D375 /* Release */ = { 241 | isa = XCBuildConfiguration; 242 | buildSettings = { 243 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 244 | CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO; 245 | FRAMEWORK_SEARCH_PATHS = ( 246 | "$(inherited)", 247 | "$(PROJECT_DIR)", 248 | ); 249 | HEADER_SEARCH_PATHS = ( 250 | "$(inherited)", 251 | "$(SRCROOT)/../../node_modules/react-native/React/**", 252 | "$(SRCROOT)/../../node_modules/react-native/Libraries/**", 253 | ); 254 | LDFLAGS = ""; 255 | OTHER_LDFLAGS = "-ObjC"; 256 | PRODUCT_NAME = "$(TARGET_NAME)"; 257 | SKIP_INSTALL = YES; 258 | SYSTEM_HEADER_SEARCH_PATHS = ""; 259 | USER_HEADER_SEARCH_PATHS = ""; 260 | }; 261 | name = Release; 262 | }; 263 | /* End XCBuildConfiguration section */ 264 | 265 | /* Begin XCConfigurationList section */ 266 | 014A3B571C6CF33500B6D375 /* Build configuration list for PBXProject "RNJitsiMeet" */ = { 267 | isa = XCConfigurationList; 268 | buildConfigurations = ( 269 | 014A3B631C6CF33500B6D375 /* Debug */, 270 | 014A3B641C6CF33500B6D375 /* Release */, 271 | ); 272 | defaultConfigurationIsVisible = 0; 273 | defaultConfigurationName = Release; 274 | }; 275 | 014A3B651C6CF33500B6D375 /* Build configuration list for PBXNativeTarget "RNJitsiMeet" */ = { 276 | isa = XCConfigurationList; 277 | buildConfigurations = ( 278 | 014A3B661C6CF33500B6D375 /* Debug */, 279 | 014A3B671C6CF33500B6D375 /* Release */, 280 | ); 281 | defaultConfigurationIsVisible = 0; 282 | defaultConfigurationName = Release; 283 | }; 284 | /* End XCConfigurationList section */ 285 | }; 286 | rootObject = 014A3B541C6CF33500B6D375 /* Project object */; 287 | } 288 | -------------------------------------------------------------------------------- /ios/RNJitsiMeetView.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @import JitsiMeetSDK; 4 | 5 | @interface RNJitsiMeetView : JitsiMeetView 6 | @property (nonatomic, copy) RCTBubblingEventBlock onConferenceJoined; 7 | @property (nonatomic, copy) RCTBubblingEventBlock onConferenceTerminated; 8 | @property (nonatomic, copy) RCTBubblingEventBlock onConferenceWillJoin; 9 | @property (nonatomic, copy) RCTBubblingEventBlock onEnteredPip; 10 | @end -------------------------------------------------------------------------------- /ios/RNJitsiMeetView.m: -------------------------------------------------------------------------------- 1 | #import "RNJitsiMeetView.h" 2 | 3 | @implementation RNJitsiMeetView 4 | 5 | @end -------------------------------------------------------------------------------- /ios/RNJitsiMeetViewManager.h: -------------------------------------------------------------------------------- 1 | #import 2 | @import JitsiMeetSDK; 3 | 4 | @interface RNJitsiMeetViewManager : RCTViewManager 5 | @end -------------------------------------------------------------------------------- /ios/RNJitsiMeetViewManager.m: -------------------------------------------------------------------------------- 1 | #import "RNJitsiMeetViewManager.h" 2 | #import "RNJitsiMeetView.h" 3 | #import 4 | 5 | @implementation RNJitsiMeetViewManager{ 6 | RNJitsiMeetView *jitsiMeetView; 7 | } 8 | 9 | RCT_EXPORT_MODULE(RNJitsiMeetView) 10 | RCT_EXPORT_VIEW_PROPERTY(onConferenceJoined, RCTBubblingEventBlock) 11 | RCT_EXPORT_VIEW_PROPERTY(onConferenceTerminated, RCTBubblingEventBlock) 12 | RCT_EXPORT_VIEW_PROPERTY(onConferenceWillJoin, RCTBubblingEventBlock) 13 | RCT_EXPORT_VIEW_PROPERTY(onEnteredPip, RCTBubblingEventBlock) 14 | 15 | - (UIView *)view 16 | { 17 | jitsiMeetView = [[RNJitsiMeetView alloc] init]; 18 | jitsiMeetView.delegate = self; 19 | return jitsiMeetView; 20 | } 21 | 22 | RCT_EXPORT_METHOD(initialize) 23 | { 24 | RCTLogInfo(@"Initialize is deprecated in v2"); 25 | } 26 | 27 | RCT_EXPORT_METHOD( 28 | call:(NSString *)urlString 29 | userInfo:(NSDictionary *)userInfo 30 | meetOptions:(NSDictionary *)meetOptions 31 | meetFeatureFlags:(NSDictionary *)meetFeatureFlags 32 | ) 33 | { 34 | RCTLogInfo(@"Load URL %@", urlString); 35 | JitsiMeetUserInfo * _userInfo = [[JitsiMeetUserInfo alloc] init]; 36 | if (userInfo != NULL) { 37 | if (userInfo[@"displayName"] != NULL) { 38 | _userInfo.displayName = userInfo[@"displayName"]; 39 | } 40 | if (userInfo[@"email"] != NULL) { 41 | _userInfo.email = userInfo[@"email"]; 42 | } 43 | if (userInfo[@"avatar"] != NULL) { 44 | NSURL *url = [NSURL URLWithString:[userInfo[@"avatar"] stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]]]; 45 | _userInfo.avatar = url; 46 | } 47 | } 48 | dispatch_sync(dispatch_get_main_queue(), ^{ 49 | JitsiMeetConferenceOptions *options = [JitsiMeetConferenceOptions fromBuilder:^(JitsiMeetConferenceOptionsBuilder *builder) { 50 | builder.room = urlString; 51 | if(meetOptions[@"token"] != NULL) 52 | builder.token = meetOptions[@"token"]; 53 | if(meetOptions[@"subject"] != NULL) 54 | builder.subject = meetOptions[@"subject"]; 55 | if(meetOptions[@"videoMuted"] != NULL) 56 | builder.videoMuted = [[meetOptions objectForKey:@"videoMuted"] boolValue]; 57 | if(meetOptions[@"audioOnly"] != NULL) 58 | builder.audioOnly = [[meetOptions objectForKey:@"audioOnly"] boolValue]; 59 | if(meetOptions[@"audioMuted"] != NULL) 60 | builder.audioMuted = [[meetOptions objectForKey:@"audioMuted"] boolValue]; 61 | 62 | if(meetFeatureFlags[@"addPeopleEnabled"] != NULL) 63 | [builder setFeatureFlag:@"add-people.enabled" withBoolean:[[meetFeatureFlags objectForKey:@"addPeopleEnabled"] boolValue]]; 64 | if(meetFeatureFlags[@"calendarEnabled"] != NULL) 65 | [builder setFeatureFlag:@"calendar.enabled" withBoolean:[[meetFeatureFlags objectForKey:@"calendarEnabled"] boolValue]]; 66 | if(meetFeatureFlags[@"callIntegrationEnabled"] != NULL) 67 | [builder setFeatureFlag:@"call-integration.enabled" withBoolean:[[meetFeatureFlags objectForKey:@"callIntegrationEnabled"] boolValue]]; 68 | if(meetFeatureFlags[@"chatEnabled"] != NULL) 69 | [builder setFeatureFlag:@"chat.enabled" withBoolean:[[meetFeatureFlags objectForKey:@"chatEnabled"] boolValue]]; 70 | if(meetFeatureFlags[@"closeCaptionsEnabled"] != NULL) 71 | [builder setFeatureFlag:@"close-captions.enabled" withBoolean:[[meetFeatureFlags objectForKey:@"closeCaptionsEnabled"] boolValue]]; 72 | if(meetFeatureFlags[@"inviteEnabled"] != NULL) 73 | [builder setFeatureFlag:@"invite.enabled" withBoolean:[[meetFeatureFlags objectForKey:@"inviteEnabled"] boolValue]]; 74 | if(meetFeatureFlags[@"iosRecordingEnabled"] != NULL) 75 | [builder setFeatureFlag:@"ios-recording.enabled" withBoolean:[[meetFeatureFlags objectForKey:@"iosRecordingEnabled"] boolValue]]; 76 | if(meetFeatureFlags[@"liveStreamingEnabled"] != NULL) 77 | [builder setFeatureFlag:@"live-streaming.enabled" withBoolean:[[meetFeatureFlags objectForKey:@"liveStreamingEnabled"] boolValue]]; 78 | if(meetFeatureFlags[@"meetingNameEnabled"] != NULL) 79 | [builder setFeatureFlag:@"meeting-name.enabled" withBoolean:[[meetFeatureFlags objectForKey:@"meetingNameEnabled"] boolValue]]; 80 | if(meetFeatureFlags[@"toolboxEnabled"] != NULL) 81 | [builder setFeatureFlag:@"toolbox.enabled" withBoolean:[[meetFeatureFlags objectForKey:@"toolboxEnabled"] boolValue]]; 82 | if(meetFeatureFlags[@"toolboxAlwaysVisible"] != NULL) 83 | [builder setFeatureFlag:@"toolbox.alwaysVisible" withBoolean:[[meetFeatureFlags objectForKey:@"toolboxAlwaysVisible"] boolValue]]; 84 | if(meetFeatureFlags[@"raiseHandEnabled"] != NULL) 85 | [builder setFeatureFlag:@"raise-hand.enabled" withBoolean:[[meetFeatureFlags objectForKey:@"raiseHandEnabled"] boolValue]]; 86 | if(meetFeatureFlags[@"reactionsEnabled"] != NULL) 87 | [builder setFeatureFlag:@"reactions.enabled" withBoolean:[[meetFeatureFlags objectForKey:@"reactionsEnabled"] boolValue]]; 88 | if(meetFeatureFlags[@"kickOutEnabled"] != NULL) 89 | [builder setFeatureFlag:@"kick-out.enabled" withBoolean:[[meetFeatureFlags objectForKey:@"kickOutEnabled"] boolValue]]; 90 | if(meetFeatureFlags[@"conferenceTimerEnabled"] != NULL) 91 | [builder setFeatureFlag:@"conference-timer.enabled" withBoolean:[[meetFeatureFlags objectForKey:@"conferenceTimerEnabled"] boolValue]]; 92 | if(meetFeatureFlags[@"videoShareEnabled"] != NULL) 93 | [builder setFeatureFlag:@"video-share.enabled" withBoolean:[[meetFeatureFlags objectForKey:@"videoShareEnabled"] boolValue]]; 94 | if(meetFeatureFlags[@"meetingPasswordEnabled"] != NULL) 95 | [builder setFeatureFlag:@"meeting-password.enabled" withBoolean:[[meetFeatureFlags objectForKey:@"meetingPasswordEnabled"] boolValue]]; 96 | if(meetFeatureFlags[@"pipEnabled"] != NULL) 97 | [builder setFeatureFlag:@"pip.enabled" withBoolean:[[meetFeatureFlags objectForKey:@"pipEnabled"] boolValue]]; 98 | if(meetFeatureFlags[@"tileViewEnabled"] != NULL) 99 | [builder setFeatureFlag:@"tile-view.enabled" withBoolean:[[meetFeatureFlags objectForKey:@"tileViewEnabled"] boolValue]]; 100 | if(meetFeatureFlags[@"welcomePageEnabled"] != NULL) 101 | [builder setFeatureFlag:@"welcomepage.enabled" withBoolean:[[meetFeatureFlags objectForKey:@"welcomePageEnabled"] boolValue]]; 102 | if(meetFeatureFlags[@"prejoinPageEnabled"] != NULL) 103 | [builder setFeatureFlag:@"prejoinpage.enabled" withBoolean:[[meetFeatureFlags objectForKey:@"prejoinPageEnabled"] boolValue]]; 104 | 105 | builder.userInfo = _userInfo; 106 | }]; 107 | [jitsiMeetView join:options]; 108 | }); 109 | } 110 | 111 | RCT_EXPORT_METHOD(audioCall:(NSString *)urlString userInfo:(NSDictionary *)userInfo) 112 | { 113 | RCTLogInfo(@"Load Audio only URL %@", urlString); 114 | JitsiMeetUserInfo * _userInfo = [[JitsiMeetUserInfo alloc] init]; 115 | if (userInfo != NULL) { 116 | if (userInfo[@"displayName"] != NULL) { 117 | _userInfo.displayName = userInfo[@"displayName"]; 118 | } 119 | if (userInfo[@"email"] != NULL) { 120 | _userInfo.email = userInfo[@"email"]; 121 | } 122 | if (userInfo[@"avatar"] != NULL) { 123 | NSURL *url = [NSURL URLWithString:[userInfo[@"avatar"] stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]]]; 124 | _userInfo.avatar = url; 125 | } 126 | } 127 | dispatch_sync(dispatch_get_main_queue(), ^{ 128 | JitsiMeetConferenceOptions *options = [JitsiMeetConferenceOptions fromBuilder:^(JitsiMeetConferenceOptionsBuilder *builder) { 129 | builder.room = urlString; 130 | builder.userInfo = _userInfo; 131 | builder.audioOnly = YES; 132 | }]; 133 | [jitsiMeetView join:options]; 134 | }); 135 | } 136 | 137 | RCT_EXPORT_METHOD(endCall) 138 | { 139 | dispatch_sync(dispatch_get_main_queue(), ^{ 140 | [jitsiMeetView leave]; 141 | }); 142 | } 143 | 144 | #pragma mark JitsiMeetViewDelegate 145 | 146 | - (void)conferenceJoined:(NSDictionary *)data { 147 | RCTLogInfo(@"Conference joined"); 148 | if (!jitsiMeetView.onConferenceJoined) { 149 | return; 150 | } 151 | 152 | jitsiMeetView.onConferenceJoined(data); 153 | } 154 | 155 | - (void)conferenceTerminated:(NSDictionary *)data { 156 | RCTLogInfo(@"Conference terminated"); 157 | if (!jitsiMeetView.onConferenceTerminated) { 158 | return; 159 | } 160 | 161 | jitsiMeetView.onConferenceTerminated(data); 162 | } 163 | 164 | - (void)conferenceWillJoin:(NSDictionary *)data { 165 | RCTLogInfo(@"Conference will join"); 166 | if (!jitsiMeetView.onConferenceWillJoin) { 167 | return; 168 | } 169 | 170 | jitsiMeetView.onConferenceWillJoin(data); 171 | } 172 | 173 | - (void)enterPictureInPicture:(NSDictionary *)data { 174 | RCTLogInfo(@"Enter Picture in Picture"); 175 | if (!jitsiMeetView.onEnteredPip) { 176 | return; 177 | } 178 | 179 | jitsiMeetView.onEnteredPip(data); 180 | } 181 | 182 | @end 183 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-native-jitsi-meet", 3 | "description": "Jitsi Meet SDK wrapper for React Native.", 4 | "version": "2.3.1", 5 | "author": { 6 | "name": "Sébastien Krafft", 7 | "email": "skrafft@gmail.com" 8 | }, 9 | "contributors": [ 10 | ], 11 | "homepage": "https://github.com/skrafft/react-native-jitsi-meet", 12 | "bugs": { 13 | "url": "https://github.com/skrafft/react-native-jitsi-meet/issues" 14 | }, 15 | "dependencies": { 16 | }, 17 | "keywords": [ 18 | "jitsi", 19 | "jitsi meet", 20 | "video", 21 | "chat", 22 | "call", 23 | "voice", 24 | "native", 25 | "react", 26 | "react-native", 27 | "react-native-component" 28 | ], 29 | "license": "Apache-2.0", 30 | "main": "index", 31 | "nativePackage": true, 32 | "repository": { 33 | "type": "git", 34 | "url": "https://github.com/skrafft/react-native-jitsi-meet.git" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /react-native-jitsi-meet.podspec: -------------------------------------------------------------------------------- 1 | require 'json' 2 | 3 | package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) 4 | 5 | Pod::Spec.new do |s| 6 | s.name = package['name'] 7 | s.version = package['version'] 8 | s.summary = package['description'] 9 | s.license = package['license'] 10 | 11 | s.authors = package['author'] 12 | s.homepage = package['homepage'] 13 | s.platform = :ios, "12.0" 14 | 15 | s.source = { :git => "https://github.com/skrafft/react-native-jitsi-meet.git", :tag => "v#{s.version}" } 16 | s.source_files = "ios/**/*.{h,m}" 17 | 18 | s.dependency 'React' 19 | s.dependency 'JitsiMeetSDK', '5.1.1' 20 | end 21 | --------------------------------------------------------------------------------