├── .watchmanconfig
├── jest.config.js
├── .bundle
└── config
├── app.json
├── .eslintrc.js
├── tsconfig.json
├── babel.config.js
├── android
├── app
│ ├── debug.keystore
│ ├── src
│ │ ├── main
│ │ │ ├── res
│ │ │ │ ├── values
│ │ │ │ │ ├── strings.xml
│ │ │ │ │ └── styles.xml
│ │ │ │ ├── raw
│ │ │ │ │ └── ringtone.mp3
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── package.json
│ │ │ │ └── drawable
│ │ │ │ │ └── rn_edit_text_material.xml
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── videocall
│ │ │ │ │ ├── MainActivity.kt
│ │ │ │ │ └── MainApplication.kt
│ │ │ └── AndroidManifest.xml
│ │ └── debug
│ │ │ └── AndroidManifest.xml
│ ├── proguard-rules.pro
│ ├── google-services.json
│ └── build.gradle
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── settings.gradle
├── build.gradle
├── gradle.properties
├── gradlew.bat
└── gradlew
├── ios
├── videoCall
│ ├── Images.xcassets
│ │ ├── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── AppDelegate.h
│ ├── main.m
│ ├── AppDelegate.mm
│ ├── PrivacyInfo.xcprivacy
│ ├── Info.plist
│ └── LaunchScreen.storyboard
├── .xcode.env
├── videoCallTests
│ ├── Info.plist
│ └── videoCallTests.m
├── Podfile
└── videoCall.xcodeproj
│ ├── xcshareddata
│ └── xcschemes
│ │ └── videoCall.xcscheme
│ └── project.pbxproj
├── .prettierrc.js
├── metro.config.js
├── src
├── screens
│ ├── LoadingScreen.tsx
│ ├── Login.tsx
│ └── VideoCallScreen.tsx
├── hook
│ ├── useSocketConnection.ts
│ ├── useWebRTC.ts
│ ├── api.ts
│ └── useUser.tsx
├── components
│ ├── LoginForm.tsx
│ ├── VideoStreamView.tsx
│ └── CallControls.tsx
├── remoteNotification
│ └── RemoteNotification.ts
└── localNotification
│ └── LocalNotification.ts
├── Gemfile
├── __tests__
└── App.test.tsx
├── codemagic.yaml
├── .gitignore
├── App.tsx
├── package.json
├── index.js
└── README.md
/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | preset: 'react-native',
3 | };
4 |
--------------------------------------------------------------------------------
/.bundle/config:
--------------------------------------------------------------------------------
1 | BUNDLE_PATH: "vendor/bundle"
2 | BUNDLE_FORCE_RUBY_PLATFORM: 1
3 |
--------------------------------------------------------------------------------
/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "videoCall",
3 | "displayName": "videoCall"
4 | }
5 |
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: '@react-native',
4 | };
5 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@react-native/typescript-config/tsconfig.json"
3 | }
4 |
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: ['module:@react-native/babel-preset'],
3 | };
4 |
--------------------------------------------------------------------------------
/android/app/debug.keystore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darshan15062002/video-call-react-native/HEAD/android/app/debug.keystore
--------------------------------------------------------------------------------
/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | videoCall
3 |
4 |
--------------------------------------------------------------------------------
/ios/videoCall/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/ios/videoCall/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : RCTAppDelegate
5 |
6 | @end
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/raw/ringtone.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darshan15062002/video-call-react-native/HEAD/android/app/src/main/res/raw/ringtone.mp3
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darshan15062002/video-call-react-native/HEAD/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/.prettierrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | arrowParens: 'avoid',
3 | bracketSameLine: true,
4 | bracketSpacing: false,
5 | singleQuote: true,
6 | trailingComma: 'all',
7 | };
8 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darshan15062002/video-call-react-native/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darshan15062002/video-call-react-native/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darshan15062002/video-call-react-native/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darshan15062002/video-call-react-native/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darshan15062002/video-call-react-native/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/ios/videoCall/main.m:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char *argv[])
6 | {
7 | @autoreleasepool {
8 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'videoCall'
2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
3 | include ':app'
4 | includeBuild('../node_modules/@react-native/gradle-plugin')
5 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
4 | networkTimeout=10000
5 | validateDistributionUrl=true
6 | zipStoreBase=GRADLE_USER_HOME
7 | zipStorePath=wrapper/dists
8 |
--------------------------------------------------------------------------------
/metro.config.js:
--------------------------------------------------------------------------------
1 | const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
2 |
3 | /**
4 | * Metro configuration
5 | * https://reactnative.dev/docs/metro
6 | *
7 | * @type {import('metro-config').MetroConfig}
8 | */
9 | const config = {};
10 |
11 | module.exports = mergeConfig(getDefaultConfig(__dirname), config);
12 |
--------------------------------------------------------------------------------
/src/screens/LoadingScreen.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {View, ActivityIndicator} from 'react-native';
3 |
4 | const LoadingScreen = () => {
5 | return (
6 |
7 |
8 |
9 | );
10 | };
11 |
12 | export default LoadingScreen;
13 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
9 |
10 |
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 |
3 | # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4 | ruby ">= 2.6.10"
5 |
6 | # Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
7 | # bound in the template on Cocoapods with next React Native release.
8 | gem 'cocoapods', '>= 1.13', '< 1.15'
9 | gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
10 |
--------------------------------------------------------------------------------
/__tests__/App.test.tsx:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import 'react-native';
6 | import React from 'react';
7 | import App from '../App';
8 |
9 | // Note: import explicitly to use the types shipped with jest.
10 | import {it} from '@jest/globals';
11 |
12 | // Note: test renderer must be required after react-native.
13 | import renderer from 'react-test-renderer';
14 |
15 | it('renders correctly', () => {
16 | renderer.create();
17 | });
18 |
--------------------------------------------------------------------------------
/ios/.xcode.env:
--------------------------------------------------------------------------------
1 | # This `.xcode.env` file is versioned and is used to source the environment
2 | # used when running script phases inside Xcode.
3 | # To customize your local environment, you can create an `.xcode.env.local`
4 | # file that is not versioned.
5 |
6 | # NODE_BINARY variable contains the PATH to the node executable.
7 | #
8 | # Customize the NODE_BINARY variable here.
9 | # For example, to use nvm with brew, add the following line
10 | # . "$(brew --prefix nvm)/nvm.sh" --no-use
11 | export NODE_BINARY=$(command -v node)
12 |
--------------------------------------------------------------------------------
/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 |
12 | -keep class org.webrtc.** { *; }
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
12 |
13 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext {
3 | buildToolsVersion = "34.0.0"
4 | minSdkVersion = 23
5 | compileSdkVersion = 34
6 | targetSdkVersion = 34
7 | ndkVersion = "26.1.10909125"
8 | kotlinVersion = "1.9.22"
9 | }
10 | repositories {
11 | google()
12 | mavenCentral()
13 | }
14 | dependencies {
15 | classpath("com.android.tools.build:gradle")
16 | classpath("com.facebook.react:react-native-gradle-plugin")
17 | classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
18 | classpath("com.google.gms:google-services:4.4.0")
19 | }
20 | }
21 |
22 | apply plugin: "com.facebook.react.rootproject"
23 |
--------------------------------------------------------------------------------
/android/app/google-services.json:
--------------------------------------------------------------------------------
1 | {
2 | "project_info": {
3 | "project_number": "1068459975610",
4 | "project_id": "videocall-webrtc-d5695",
5 | "storage_bucket": "videocall-webrtc-d5695.appspot.com"
6 | },
7 | "client": [
8 | {
9 | "client_info": {
10 | "mobilesdk_app_id": "1:1068459975610:android:8104384fbc0e8005533383",
11 | "android_client_info": {
12 | "package_name": "com.videocall"
13 | }
14 | },
15 | "oauth_client": [],
16 | "api_key": [
17 | {
18 | "current_key": "AIzaSyBPOoU_iRF7qoFszTWwUyLtAGyiGu5yJHI"
19 | }
20 | ],
21 | "services": {
22 | "appinvite_service": {
23 | "other_platform_oauth_client": []
24 | }
25 | }
26 | }
27 | ],
28 | "configuration_version": "1"
29 | }
--------------------------------------------------------------------------------
/ios/videoCallTests/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 |
--------------------------------------------------------------------------------
/codemagic.yaml:
--------------------------------------------------------------------------------
1 | workflows:
2 | react-native-android:
3 | name: React Native Android Build
4 | max_build_duration: 120
5 | instance_type: mac_mini_m2
6 | environment:
7 | vars:
8 | PACKAGE_NAME: 'com.videoCall.package'
9 | scripts:
10 | - name: Set Android SDK location
11 | script: |
12 | echo "sdk.dir=$ANDROID_SDK_ROOT" > "$CM_BUILD_DIR/android/local.properties"
13 | - name: Install npm dependencies
14 | script: |
15 | npm install
16 | - name: Set executable permission for Gradle wrapper
17 | script: |
18 | cd android
19 | chmod +x gradlew
20 | - name: Build Android release APK
21 | script: |
22 | cd android # Ensure we're in the android folder
23 | ./gradlew assembleRelease
24 | artifacts:
25 | - android/app/build/outputs/**/*.apk
26 |
--------------------------------------------------------------------------------
/ios/videoCall/AppDelegate.mm:
--------------------------------------------------------------------------------
1 | #import "AppDelegate.h"
2 |
3 | #import
4 |
5 | @implementation AppDelegate
6 |
7 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
8 | {
9 | self.moduleName = @"videoCall";
10 | // You can add your custom initial props in the dictionary below.
11 | // They will be passed down to the ViewController used by React Native.
12 | self.initialProps = @{};
13 |
14 | return [super application:application didFinishLaunchingWithOptions:launchOptions];
15 | }
16 |
17 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
18 | {
19 | return [self bundleURL];
20 | }
21 |
22 | - (NSURL *)bundleURL
23 | {
24 | #if DEBUG
25 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
26 | #else
27 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
28 | #endif
29 | }
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/videocall/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.videocall
2 |
3 | import com.facebook.react.ReactActivity
4 | import com.facebook.react.ReactActivityDelegate
5 | import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
6 | import com.facebook.react.defaults.DefaultReactActivityDelegate
7 |
8 | class MainActivity : ReactActivity() {
9 |
10 | /**
11 | * Returns the name of the main component registered from JavaScript. This is used to schedule
12 | * rendering of the component.
13 | */
14 | override fun getMainComponentName(): String = "videoCall"
15 |
16 | /**
17 | * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
18 | * which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
19 | */
20 | override fun createReactActivityDelegate(): ReactActivityDelegate =
21 | DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
22 | }
23 |
--------------------------------------------------------------------------------
/ios/videoCall/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "scale" : "2x",
6 | "size" : "20x20"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "scale" : "3x",
11 | "size" : "20x20"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "scale" : "2x",
16 | "size" : "29x29"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "scale" : "3x",
21 | "size" : "29x29"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "scale" : "2x",
26 | "size" : "40x40"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "scale" : "3x",
31 | "size" : "40x40"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "scale" : "2x",
36 | "size" : "60x60"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "scale" : "3x",
41 | "size" : "60x60"
42 | },
43 | {
44 | "idiom" : "ios-marketing",
45 | "scale" : "1x",
46 | "size" : "1024x1024"
47 | }
48 | ],
49 | "info" : {
50 | "author" : "xcode",
51 | "version" : 1
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/src/hook/useSocketConnection.ts:
--------------------------------------------------------------------------------
1 | import {useState, useEffect, useRef} from 'react';
2 | import {io, Socket} from 'socket.io-client';
3 |
4 | export const useSocketConnection = (
5 | handleNewUserJoin: (data: any) => void,
6 | handleIncommingCall: (data: any) => void,
7 | handleCallAccepted: (data: any) => void
8 | ) => {
9 | const [socket, setSocket] = useState(null);
10 |
11 | useEffect(() => {
12 | const _socket = io('https://ice-server-socket.onrender.com');
13 | setSocket(_socket);
14 |
15 | return () => {
16 | _socket.disconnect(); // Ensure proper cleanup
17 | };
18 | }, []);
19 |
20 | useEffect(() => {
21 | if (socket) {
22 | socket.on('user_joined', handleNewUserJoin);
23 | socket.on('incomming_call', handleIncommingCall);
24 | socket.on('call_accepted', handleCallAccepted);
25 |
26 | return () => {
27 | socket.off('user_joined', handleNewUserJoin);
28 | socket.off('incomming_call', handleIncommingCall);
29 | socket.off('call_accepted', handleCallAccepted);
30 | };
31 | }
32 | }, [socket]);
33 |
34 | return socket;
35 | };
36 |
--------------------------------------------------------------------------------
/src/hook/useWebRTC.ts:
--------------------------------------------------------------------------------
1 | import {useEffect, useRef, useState} from 'react';
2 | import {mediaDevices, RTCPeerConnection, MediaStream} from 'react-native-webrtc';
3 | import { Socket } from 'socket.io-client';
4 |
5 | export const useWebRTC = (socket: Socket | null) => {
6 | const [stream, setStream] = useState(null);
7 | const [remoteStream, setRemoteStream] = useState(null);
8 | const peerConnection = useRef(
9 | new RTCPeerConnection({
10 | iceServers: [
11 | {urls: 'stun:stun.l.google.com:19302'},
12 | {urls: 'stun:stun1.l.google.com:19302'},
13 | ],
14 | })
15 | );
16 |
17 | useEffect(() => {
18 | const startStream = async () => {
19 | const _stream = await mediaDevices.getUserMedia({
20 | video: {facingMode: 'user'},
21 | audio: true,
22 | });
23 | setStream(_stream);
24 | _stream.getTracks().forEach(track => peerConnection.current.addTrack(track, _stream));
25 | };
26 |
27 | socket?.on('joined_room', () => startStream());
28 | }, [socket]);
29 |
30 | return {stream, remoteStream, peerConnection, setRemoteStream};
31 | };
32 |
--------------------------------------------------------------------------------
/ios/videoCall/PrivacyInfo.xcprivacy:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | NSPrivacyCollectedDataTypes
6 |
7 |
8 | NSPrivacyAccessedAPITypes
9 |
10 |
11 | NSPrivacyAccessedAPIType
12 | NSPrivacyAccessedAPICategoryFileTimestamp
13 | NSPrivacyAccessedAPITypeReasons
14 |
15 | C617.1
16 |
17 |
18 |
19 | NSPrivacyAccessedAPIType
20 | NSPrivacyAccessedAPICategoryUserDefaults
21 | NSPrivacyAccessedAPITypeReasons
22 |
23 | CA92.1
24 |
25 |
26 |
27 | NSPrivacyAccessedAPIType
28 | NSPrivacyAccessedAPICategorySystemBootTime
29 | NSPrivacyAccessedAPITypeReasons
30 |
31 | 35F9.1
32 |
33 |
34 |
35 | NSPrivacyTracking
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Resolve react_native_pods.rb with node to allow for hoisting
2 | require Pod::Executable.execute_command('node', ['-p',
3 | 'require.resolve(
4 | "react-native/scripts/react_native_pods.rb",
5 | {paths: [process.argv[1]]},
6 | )', __dir__]).strip
7 |
8 | platform :ios, min_ios_version_supported
9 | prepare_react_native_project!
10 |
11 | linkage = ENV['USE_FRAMEWORKS']
12 | if linkage != nil
13 | Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
14 | use_frameworks! :linkage => linkage.to_sym
15 | end
16 |
17 | target 'videoCall' do
18 | config = use_native_modules!
19 |
20 | use_react_native!(
21 | :path => config[:reactNativePath],
22 | # An absolute path to your application root.
23 | :app_path => "#{Pod::Config.instance.installation_root}/.."
24 | )
25 |
26 | target 'videoCallTests' do
27 | inherit! :complete
28 | # Pods for testing
29 | end
30 |
31 | post_install do |installer|
32 | # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
33 | react_native_post_install(
34 | installer,
35 | config[:reactNativePath],
36 | :mac_catalyst_enabled => false,
37 | # :ccache_enabled => true
38 | )
39 | end
40 | end
41 |
--------------------------------------------------------------------------------
/src/components/LoginForm.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {StyleSheet} from 'react-native';
3 | import {TextInput, Button, View} from 'react-native';
4 |
5 | interface LoginFormProps {
6 | phone: string;
7 | password: string;
8 | setPhone: (value: string) => void;
9 | setPassword: (value: string) => void;
10 | handleLogin: () => void;
11 | styles: any;
12 | }
13 |
14 | const LoginForm: React.FC = ({
15 | phone,
16 | password,
17 | setPhone,
18 | setPassword,
19 | handleLogin,
20 | styles,
21 | }) => {
22 | return (
23 |
31 |
38 |
46 |
47 |
48 | );
49 | };
50 |
51 | export default LoginForm;
52 |
--------------------------------------------------------------------------------
/.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 | **/.xcode.env.local
24 |
25 | # Android/IntelliJ
26 | #
27 | build/
28 | .idea
29 | .gradle
30 | local.properties
31 | *.iml
32 | *.hprof
33 | .cxx/
34 | *.keystore
35 | !debug.keystore
36 |
37 | # node.js
38 | #
39 | node_modules/
40 | npm-debug.log
41 | yarn-error.log
42 |
43 | # fastlane
44 | #
45 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
46 | # screenshots whenever they are needed.
47 | # For more information about the recommended setup visit:
48 | # https://docs.fastlane.tools/best-practices/source-control/
49 |
50 | **/fastlane/report.xml
51 | **/fastlane/Preview.html
52 | **/fastlane/screenshots
53 | **/fastlane/test_output
54 |
55 | # Bundle artifact
56 | *.jsbundle
57 |
58 | # Ruby / CocoaPods
59 | **/Pods/
60 | /vendor/bundle/
61 |
62 | # Temporary files created by Metro to check the health of the file watcher
63 | .metro-health-check*
64 |
65 | # testing
66 | /coverage
67 |
68 | # Yarn
69 | .yarn/*
70 | !.yarn/patches
71 | !.yarn/plugins
72 | !.yarn/releases
73 | !.yarn/sdks
74 | !.yarn/versions
75 |
--------------------------------------------------------------------------------
/src/components/VideoStreamView.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {MediaStream, RTCView} from 'react-native-webrtc';
3 |
4 | interface VideoStreamViewProps {
5 | stream: MediaStream | null;
6 | remoteStream: MediaStream | null;
7 | localWebcamOn: boolean;
8 | }
9 |
10 | const VideoStreamView: React.FC = ({
11 | stream,
12 | remoteStream,
13 | localWebcamOn,
14 | }) => {
15 | return (
16 | <>
17 | {!remoteStream && localWebcamOn && stream && (
18 |
24 | )}
25 | {remoteStream && (
26 | <>
27 |
33 | {stream && localWebcamOn && (
34 |
46 | )}
47 | >
48 | )}
49 | >
50 | );
51 | };
52 |
53 | export default VideoStreamView;
54 |
--------------------------------------------------------------------------------
/android/app/src/main/res/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "genwe_clone",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "android": "react-native run-android",
7 | "ios": "react-native run-ios",
8 | "lint": "eslint .",
9 | "start": "react-native start",
10 | "test": "jest"
11 | },
12 | "dependencies": {
13 | "@react-native-masked-view/masked-view": "^0.3.1",
14 | "@react-navigation/native": "^6.1.17",
15 | "@react-navigation/native-stack": "^6.9.26",
16 | "@react-navigation/stack": "^6.3.29",
17 | "@reduxjs/toolkit": "^2.2.5",
18 | "@tanstack/react-query": "^5.40.0",
19 | "react": "18.2.0",
20 | "react-native": "^0.74.1",
21 | "react-native-gesture-handler": "^2.16.2",
22 | "react-native-root-siblings": "^5.0.1",
23 | "react-native-safe-area-context": "^4.10.3",
24 | "react-native-screens": "^3.31.1",
25 | "react-redux": "^9.1.2"
26 | },
27 | "devDependencies": {
28 | "@babel/core": "^7.20.0",
29 | "@babel/preset-env": "^7.20.0",
30 | "@babel/runtime": "^7.20.0",
31 | "@react-native/babel-preset": "0.74.83",
32 | "@react-native/eslint-config": "0.74.83",
33 | "@react-native/metro-config": "0.74.83",
34 | "@react-native/typescript-config": "0.74.83",
35 | "@types/react": "^18.2.6",
36 | "@types/react-test-renderer": "^18.0.0",
37 | "babel-jest": "^29.6.3",
38 | "eslint": "^8.19.0",
39 | "jest": "^29.6.3",
40 | "prettier": "2.8.8",
41 | "react-test-renderer": "18.2.0",
42 | "typescript": "5.0.4"
43 | },
44 | "engines": {
45 | "node": ">=18"
46 | },
47 | "packageManager": "yarn@3.6.4"
48 | }
49 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/videocall/MainApplication.kt:
--------------------------------------------------------------------------------
1 | package com.videocall
2 |
3 | import android.app.Application
4 | import com.facebook.react.PackageList
5 | import com.facebook.react.ReactApplication
6 | import com.facebook.react.ReactHost
7 | import com.facebook.react.ReactNativeHost
8 | import com.facebook.react.ReactPackage
9 | import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
10 | import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
11 | import com.facebook.react.defaults.DefaultReactNativeHost
12 | import com.facebook.soloader.SoLoader
13 |
14 | class MainApplication : Application(), ReactApplication {
15 |
16 | override val reactNativeHost: ReactNativeHost =
17 | object : DefaultReactNativeHost(this) {
18 | override fun getPackages(): List =
19 | PackageList(this).packages.apply {
20 | // Packages that cannot be autolinked yet can be added manually here, for example:
21 | // add(MyReactNativePackage())
22 | }
23 |
24 | override fun getJSMainModuleName(): String = "index"
25 |
26 | override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
27 |
28 | override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
29 | override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
30 | }
31 |
32 | override val reactHost: ReactHost
33 | get() = getDefaultReactHost(applicationContext, reactNativeHost)
34 |
35 | override fun onCreate() {
36 | super.onCreate()
37 |
38 | SoLoader.init(this, false)
39 | if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
40 | // If you opted-in for the New Architecture, we load the native entry point for this app.
41 | load()
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/ios/videoCall/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | videoCall
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 | $(MARKETING_VERSION)
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | $(CURRENT_PROJECT_VERSION)
25 | LSRequiresIPhoneOS
26 |
27 | NSAppTransportSecurity
28 |
29 |
30 | NSAllowsArbitraryLoads
31 |
32 | NSAllowsLocalNetworking
33 |
34 |
35 | NSLocationWhenInUseUsageDescription
36 |
37 | UILaunchStoryboardName
38 | LaunchScreen
39 | UIRequiredDeviceCapabilities
40 |
41 | arm64
42 |
43 | UISupportedInterfaceOrientations
44 |
45 | UIInterfaceOrientationPortrait
46 | UIInterfaceOrientationLandscapeLeft
47 | UIInterfaceOrientationLandscapeRight
48 |
49 | UIViewControllerBasedStatusBarAppearance
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/src/remoteNotification/RemoteNotification.ts:
--------------------------------------------------------------------------------
1 | import { useEffect } from "react";
2 | import messaging from '@react-native-firebase/messaging';
3 | import { sendTokenToServer } from "../hook/api";
4 |
5 | import { showIncomingCallNotification } from "../localNotification/LocalNotification";
6 |
7 | const requestUserPermission = async () => {
8 | const authStatus = await messaging().requestPermission();
9 | const enabled =
10 | authStatus === messaging.AuthorizationStatus.AUTHORIZED ||
11 | authStatus === messaging.AuthorizationStatus.PROVISIONAL;
12 |
13 | if (enabled) {
14 | console.log('Authorization status:', authStatus);
15 | } else {
16 | console.warn('Notification permission not granted.');
17 | }
18 | };
19 | const RemoteNotification = () => {
20 | useEffect(() => {
21 | // Request permission for notifications
22 | requestUserPermission();
23 |
24 | // Get FCM token
25 | const getFCMToken = async () => {
26 | const token = await messaging().getToken();
27 | if (token) {
28 | console.log('FCM Token:', token);
29 | await sendTokenToServer(token); // Send token to your server
30 | }
31 | };
32 |
33 | // Register FCM token
34 | getFCMToken();
35 |
36 | // Handle foreground messages
37 | const unsubscribe = messaging().onMessage(async (remoteMessage) => {
38 | console.log('A new FCM message arrived!', remoteMessage);
39 |
40 | const { callerName, callId, isVideo } = remoteMessage.data;
41 |
42 | if (remoteMessage.data.type === 'call') {
43 | showIncomingCallNotification()
44 | }
45 |
46 | });
47 |
48 |
49 |
50 | // Clean up the listener on unmount
51 | return unsubscribe;
52 | }, []);
53 |
54 | return null;
55 | };
56 | export default RemoteNotification;
57 |
58 |
--------------------------------------------------------------------------------
/src/hook/api.ts:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 |
3 | const server = "https://ice-server-socket.onrender.com/api/v1"
4 | // const server = "http://10.0.2.2:8000/api/v1"
5 | export const loadUser = async () => {
6 | try {
7 |
8 |
9 |
10 |
11 | // Axios
12 | const res = await axios.get(`${server}/me`, {
13 | "withCredentials": true
14 | })
15 |
16 |
17 |
18 | return res.data
19 | } catch (error:any) {
20 |
21 | return error.response
22 | }
23 |
24 | }
25 |
26 | export const login = async (phone:string, password:string) => {
27 | try {
28 |
29 | // Axios
30 | const res = await axios.post(`${server}/login`, {
31 | phone, password
32 | }, {
33 | headers: {
34 | "Content-Type": "application/json"
35 | },
36 | "withCredentials": true
37 | })
38 |
39 |
40 |
41 | return res.data
42 |
43 | } catch (error) {
44 |
45 | return error.response.data.message
46 |
47 | }
48 | }
49 |
50 | export const loadUserList = async () => {
51 | try {
52 |
53 |
54 | // Axios
55 | const res = await axios.get(`${server}/user-list`, {
56 | "withCredentials": true
57 | })
58 |
59 |
60 | return res.data
61 | } catch (error) {
62 |
63 | return error.response.data
64 | }
65 |
66 | }
67 |
68 | export const sendTokenToServer = async (token:string) => {
69 | try {
70 |
71 |
72 | const res = await axios.post(`${server}/save-token`,
73 | { token }, {
74 | headers: {
75 | "Content-Type": "application/json"
76 | },
77 | "withCredentials": true
78 | }
79 | );
80 |
81 | } catch (error) {
82 | console.error('Failed to send device token to server:', error);
83 | }
84 | };
85 |
--------------------------------------------------------------------------------
/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: -Xmx512m -XX:MaxMetaspaceSize=256m
13 | org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
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 | # Use this property to specify which architecture you want to build.
28 | # You can also override it from the CLI using
29 | # ./gradlew -PreactNativeArchitectures=x86_64
30 | reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
31 |
32 | # Use this property to enable support to the new architecture.
33 | # This will allow you to use TurboModules and the Fabric render in
34 | # your application. You should enable this flag either if you want
35 | # to write custom TurboModules/Fabric components OR use libraries that
36 | # are providing them.
37 | newArchEnabled=false
38 |
39 | # Use this property to enable or disable the Hermes JS engine.
40 | # If set to false, you will be using JSC instead.
41 | hermesEnabled=true
42 |
--------------------------------------------------------------------------------
/App.tsx:
--------------------------------------------------------------------------------
1 | import React, {useEffect} from 'react';
2 | import {NavigationContainer, useNavigation} from '@react-navigation/native';
3 | import {createStackNavigator} from '@react-navigation/stack';
4 | import {UserProvider} from './src/hook/useUser';
5 | import Login from './src/screens/Login';
6 | import VideoCallScreen from './src/screens/VideoCallScreen';
7 | import RemoteNotification from './src/remoteNotification/RemoteNotification';
8 | import notifee, {AndroidImportance} from '@notifee/react-native';
9 | import messaging from '@react-native-firebase/messaging';
10 |
11 | const Stack = createStackNavigator();
12 |
13 | function AppNavigator() {
14 | return (
15 |
16 |
17 |
23 |
24 | );
25 | }
26 |
27 | const linking = {
28 | prefixes: ['videocall://'],
29 | config: {
30 | screens: {
31 | VideoCall: 'video-call/:email/:roomId',
32 | },
33 | },
34 | };
35 |
36 | function App(): React.JSX.Element {
37 | useEffect(() => {
38 | async function createChannel() {
39 | await notifee.createChannel({
40 | id: 'call',
41 | name: 'Incoming Call Channel',
42 | sound: 'ringtone', // Ensure ringtone is placed in 'res/raw' for Android
43 | importance: AndroidImportance.HIGH,
44 | });
45 | }
46 | createChannel();
47 | }, []);
48 |
49 | useEffect(() => {
50 | async function requestPermission() {
51 | await notifee.requestPermission();
52 | }
53 | requestPermission();
54 | }, []);
55 |
56 | return (
57 |
58 |
59 |
60 |
61 |
62 |
63 | );
64 | }
65 |
66 | export default App;
67 |
--------------------------------------------------------------------------------
/src/components/CallControls.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {TouchableOpacity, View} from 'react-native';
3 | import Icon from 'react-native-vector-icons/FontAwesome';
4 | import Feather from 'react-native-vector-icons/Feather';
5 |
6 | interface CallControlsProps {
7 | localMicOn: boolean;
8 | localWebcamOn: boolean;
9 | toggleMic: () => void;
10 | toggleCamera: () => void;
11 | handleHangout: () => void;
12 | }
13 |
14 | const CallControls: React.FC = ({
15 | localMicOn,
16 | localWebcamOn,
17 | toggleMic,
18 | toggleCamera,
19 | handleHangout,
20 | }) => {
21 | return (
22 |
37 |
38 |
43 |
44 |
45 |
46 |
51 |
52 |
53 |
61 |
62 |
63 |
64 | {}}>
65 |
66 |
67 |
68 | );
69 | };
70 |
71 | export default CallControls;
72 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/rn_edit_text_material.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
22 |
23 |
24 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "videoCall",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "android": "react-native run-android",
7 | "ios": "react-native run-ios",
8 | "lint": "eslint .",
9 | "start": "react-native start",
10 | "test": "jest",
11 | "install-r-apk": "adb -d install .\\android\\app\\build\\outputs\\apk\\release\\app-release.apk",
12 | "install-device-apk": "adb -d install ./android/app/build/outputs/apk/debug/app-debug.apk"
13 | },
14 | "dependencies": {
15 | "@notifee/react-native": "^9.1.2",
16 | "@react-native-firebase/app": "^20.4.0",
17 | "@react-native-firebase/messaging": "^20.5.0",
18 | "@react-navigation/native": "^6.1.18",
19 | "@react-navigation/stack": "^6.4.1",
20 | "axios": "^1.7.5",
21 | "react": "18.2.0",
22 | "react-native": "0.74.1",
23 | "react-native-callkeep": "^4.3.14",
24 | "react-native-eventemitter": "^0.0.1",
25 | "react-native-full-screen-notification-incoming-call": "^1.0.1",
26 | "react-native-gesture-handler": "^2.20.0",
27 | "react-native-safe-area-context": "^4.11.1",
28 | "react-native-screens": "^3.34.0",
29 | "react-native-vector-icons": "^10.1.0",
30 | "react-native-video": "^6.4.5",
31 | "react-native-webrtc": "^124.0.4",
32 | "socket.io-client": "^4.7.5"
33 | },
34 | "devDependencies": {
35 | "@babel/core": "^7.20.0",
36 | "@babel/preset-env": "^7.20.0",
37 | "@babel/runtime": "^7.20.0",
38 | "@react-native/babel-preset": "0.74.83",
39 | "@react-native/eslint-config": "0.74.83",
40 | "@react-native/metro-config": "0.74.83",
41 | "@react-native/typescript-config": "0.74.83",
42 | "@types/react": "^18.2.6",
43 | "@types/react-native-push-notification": "^8.1.4",
44 | "@types/react-native-vector-icons": "^6.4.18",
45 | "@types/react-test-renderer": "^18.0.0",
46 | "babel-jest": "^29.6.3",
47 | "eslint": "^8.19.0",
48 | "jest": "^29.6.3",
49 | "prettier": "2.8.8",
50 | "react-test-renderer": "18.2.0",
51 | "typescript": "5.0.4"
52 | },
53 | "engines": {
54 | "node": ">=18"
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/src/localNotification/LocalNotification.ts:
--------------------------------------------------------------------------------
1 |
2 | import RNNotificationCall from 'react-native-full-screen-notification-incoming-call';
3 | import notifee, { AndroidImportance, EventType } from '@notifee/react-native';
4 |
5 |
6 |
7 |
8 | export const showIncomingCallNotification=async()=>{
9 |
10 | await notifee.displayNotification({
11 | title: 'Incoming Video Call',
12 | body: 'John Doe is calling...',
13 | android: {
14 | channelId: 'call',
15 | sound: 'ringtone',
16 | fullScreenAction: {
17 | id: 'default', // This ensures full-screen display on Android
18 | },
19 | importance: AndroidImportance.HIGH,
20 | actions: [
21 | { title: 'Answer', pressAction: { id: 'answer' } },
22 | { title: 'Decline', pressAction: { id: 'decline' } },
23 | ],
24 | ongoing: true
25 | },
26 | ios: {
27 | sound: 'ringtone.caf', // Ensure sound is added in iOS project
28 | categoryId: 'call', // Define call notification category
29 | actions: [
30 | { title: 'Answer', pressAction: { id: 'answer' }, input: false },
31 | { title: 'Decline', pressAction: { id: 'decline' }, input: false },
32 | ],
33 | },
34 | });
35 |
36 |
37 |
38 |
39 | // RNNotificationCall.displayNotification(
40 | // '22221a97-8eb4-4ac2-b2cf-0a3c0b9100ad',
41 | // null,
42 | // 30000,
43 | // {
44 | // channelId: 'com.abc.incomingcall',
45 | // channelName: 'Incoming video call',
46 | // notificationIcon: 'ic_launcher', //mipmap
47 | // notificationTitle: 'Linh Vo',
48 | // notificationBody: 'Incoming video call',
49 | // answerText: 'Answer',
50 | // declineText: 'Decline',
51 | // notificationColor: 'colorAccent',
52 | // isVideo:true,
53 | // notificationSound: "marimba_soft", //raw
54 | // //mainComponent:'MyReactNativeApp',//AppRegistry.registerComponent('MyReactNativeApp', () => CustomIncomingCall);
55 | // // payload:{name:'Test',Body:'test'}
56 | // }
57 | // );
58 | }
59 |
60 |
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/src/hook/useUser.tsx:
--------------------------------------------------------------------------------
1 | import React, {createContext, useContext, useEffect, useState} from 'react';
2 | import {loadUser, loadUserList} from './api';
3 |
4 | interface User {
5 | name: string;
6 | phone: string;
7 | code: string;
8 | // Add more fields as needed
9 | }
10 |
11 | interface UserContextType {
12 | user: User | null;
13 | setUser: React.Dispatch>;
14 | userList: User[]; // To store the user list
15 | loading: boolean;
16 | refetch: () => Promise; // Function to refetch user data
17 | }
18 |
19 | const UserContext = createContext(undefined);
20 |
21 | export const useUser = () => {
22 | const context = useContext(UserContext);
23 | if (!context) {
24 | throw new Error('useUser must be used within a UserProvider');
25 | }
26 | return context;
27 | };
28 |
29 | export const UserProvider: React.FC<{children: React.ReactNode}> = ({
30 | children,
31 | }) => {
32 | const [user, setUser] = useState(null);
33 | const [userList, setUserList] = useState([]);
34 | const [loading, setLoading] = useState(true);
35 |
36 | // Function to fetch the user and user list data
37 | const fetchUser = async () => {
38 | setLoading(true);
39 | try {
40 | const data = await loadUser(); // Load the current user
41 | if (data?.user) {
42 | setUser(data.user); // Set user data
43 |
44 | const {users} = await loadUserList(); // Fetch user list
45 | setUserList(users); // Set user list
46 | } else {
47 | setUser(null); // If no user, set to null
48 | }
49 | } catch (error) {
50 | console.error('Error fetching user:', error);
51 | } finally {
52 | setLoading(false); // Stop loading
53 | }
54 | };
55 |
56 | // Expose a refetch function that can be used to manually reload the user and user list
57 | const refetch = async () => {
58 | await fetchUser();
59 | };
60 |
61 | useEffect(() => {
62 | fetchUser(); // Fetch user data when the provider mounts
63 | }, []);
64 |
65 | return (
66 |
67 | {children}
68 |
69 | );
70 | };
71 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import { AppRegistry, DeviceEventEmitter, Linking } from 'react-native';
6 | import App from './App';
7 | import { name as appName } from './app.json';
8 | import messaging from '@react-native-firebase/messaging';
9 | import { showIncomingCallNotification } from './src/localNotification/LocalNotification';
10 | import RNNotificationCall from 'react-native-full-screen-notification-incoming-call';
11 | import { loadUser } from './src/hook/api';
12 | import notifee, { AndroidImportance, EventType } from '@notifee/react-native';
13 |
14 | notifee.onBackgroundEvent(async ({ type, detail }) => {
15 | if (type === EventType.ACTION_PRESS) {
16 | if (detail.pressAction.id === 'answer') {
17 | // Handle answering the call
18 | console.log('User answered the call');
19 | const userData = await loadUser();
20 | console.log(userData?.user?.phone, userData?.user?.code);
21 |
22 | if (userData?.user) {
23 | const phone = userData.user.phone;
24 | const roomId = userData.user.code;
25 |
26 | const link = `videocall://video-call/${phone}/${roomId}`;
27 | console.log(link);
28 |
29 | // Open the deep link
30 | Linking.openURL(link)
31 | .catch(err => console.error('Failed to open URL:', err));
32 |
33 | console.log("Call connection successful");
34 |
35 | }
36 | } else if (detail.pressAction.id === 'decline') {
37 | // Handle declining the call
38 | console.log('User declined the call');
39 | }
40 | }
41 | });
42 |
43 | messaging().setBackgroundMessageHandler(async (remoteMessage) => {
44 | console.log('Message handled in the background!', remoteMessage);
45 |
46 | const { data } = remoteMessage;
47 | if (data && data.type === 'call') { // Ensure it's a call notification
48 | console.log('Displaying incoming call:', data);
49 |
50 |
51 | showIncomingCallNotification()
52 |
53 |
54 |
55 |
56 | }
57 | });
58 |
59 |
60 |
61 |
62 | // Register the main application component
63 | AppRegistry.registerComponent(appName, () => App);
64 |
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/ios/videoCallTests/videoCallTests.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 videoCallTests : XCTestCase
11 |
12 | @end
13 |
14 | @implementation videoCallTests
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(
38 | ^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
39 | if (level >= RCTLogLevelError) {
40 | redboxError = message;
41 | }
42 | });
43 | #endif
44 |
45 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
46 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
47 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
48 |
49 | foundElement = [self findSubviewInView:vc.view
50 | matching:^BOOL(UIView *view) {
51 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
52 | return YES;
53 | }
54 | return NO;
55 | }];
56 | }
57 |
58 | #ifdef DEBUG
59 | RCTSetLogFunction(RCTDefaultLogFunction);
60 | #endif
61 |
62 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
63 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
64 | }
65 |
66 | @end
67 |
--------------------------------------------------------------------------------
/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 | @rem This is normally unused
30 | set APP_BASE_NAME=%~n0
31 | set APP_HOME=%DIRNAME%
32 |
33 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
34 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
35 |
36 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
37 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
38 |
39 | @rem Find java.exe
40 | if defined JAVA_HOME goto findJavaFromJavaHome
41 |
42 | set JAVA_EXE=java.exe
43 | %JAVA_EXE% -version >NUL 2>&1
44 | if %ERRORLEVEL% equ 0 goto execute
45 |
46 | echo. 1>&2
47 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
48 | echo. 1>&2
49 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2
50 | echo location of your Java installation. 1>&2
51 |
52 | goto fail
53 |
54 | :findJavaFromJavaHome
55 | set JAVA_HOME=%JAVA_HOME:"=%
56 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
57 |
58 | if exist "%JAVA_EXE%" goto execute
59 |
60 | echo. 1>&2
61 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
62 | echo. 1>&2
63 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2
64 | echo location of your Java installation. 1>&2
65 |
66 | goto fail
67 |
68 | :execute
69 | @rem Setup the command line
70 |
71 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
72 |
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 %*
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if %ERRORLEVEL% equ 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 | set EXIT_CODE=%ERRORLEVEL%
85 | if %EXIT_CODE% equ 0 set EXIT_CODE=1
86 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
87 | exit /b %EXIT_CODE%
88 |
89 | :mainEnd
90 | if "%OS%"=="Windows_NT" endlocal
91 |
92 | :omega
93 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | This is a new [**React Native**](https://reactnative.dev) project, bootstrapped using [`@react-native-community/cli`](https://github.com/react-native-community/cli).
2 |
3 | # Getting Started
4 |
5 | >**Note**: Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/environment-setup) instructions till "Creating a new application" step, before proceeding.
6 |
7 | ## Step 1: Start the Metro Server
8 |
9 | First, you will need to start **Metro**, the JavaScript _bundler_ that ships _with_ React Native.
10 |
11 | To start Metro, run the following command from the _root_ of your React Native project:
12 |
13 | ```bash
14 | # using npm
15 | npm start
16 |
17 | # OR using Yarn
18 | yarn start
19 | ```
20 |
21 | ## Step 2: Start your Application
22 |
23 | Let Metro Bundler run in its _own_ terminal. Open a _new_ terminal from the _root_ of your React Native project. Run the following command to start your _Android_ or _iOS_ app:
24 |
25 | ### For Android
26 |
27 | ```bash
28 | # using npm
29 | npm run android
30 |
31 | # OR using Yarn
32 | yarn android
33 | ```
34 |
35 | ### For iOS
36 |
37 | ```bash
38 | # using npm
39 | npm run ios
40 |
41 | # OR using Yarn
42 | yarn ios
43 | ```
44 |
45 | If everything is set up _correctly_, you should see your new app running in your _Android Emulator_ or _iOS Simulator_ shortly provided you have set up your emulator/simulator correctly.
46 |
47 | This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively.
48 |
49 | ## Step 3: Modifying your App
50 |
51 | Now that you have successfully run the app, let's modify it.
52 |
53 | 1. Open `App.tsx` in your text editor of choice and edit some lines.
54 | 2. For **Android**: Press the R key twice or select **"Reload"** from the **Developer Menu** (Ctrl + M (on Window and Linux) or Cmd ⌘ + M (on macOS)) to see your changes!
55 |
56 | For **iOS**: Hit Cmd ⌘ + R in your iOS Simulator to reload the app and see your changes!
57 |
58 | ## Congratulations! :tada:
59 |
60 | You've successfully run and modified your React Native App. :partying_face:
61 |
62 | ### Now what?
63 |
64 | - If you want to add this new React Native code to an existing application, check out the [Integration guide](https://reactnative.dev/docs/integration-with-existing-apps).
65 | - If you're curious to learn more about React Native, check out the [Introduction to React Native](https://reactnative.dev/docs/getting-started).
66 |
67 | # Troubleshooting
68 |
69 | If you can't get this to work, see the [Troubleshooting](https://reactnative.dev/docs/troubleshooting) page.
70 |
71 | # Learn More
72 |
73 | To learn more about React Native, take a look at the following resources:
74 |
75 | - [React Native Website](https://reactnative.dev) - learn more about React Native.
76 | - [Getting Started](https://reactnative.dev/docs/environment-setup) - an **overview** of React Native and how setup your environment.
77 | - [Learn the Basics](https://reactnative.dev/docs/getting-started) - a **guided tour** of the React Native **basics**.
78 | - [Blog](https://reactnative.dev/blog) - read the latest official React Native **Blog** posts.
79 | - [`@facebook/react-native`](https://github.com/facebook/react-native) - the Open Source; GitHub **repository** for React Native.
80 |
--------------------------------------------------------------------------------
/ios/videoCall.xcodeproj/xcshareddata/xcschemes/videoCall.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 |
--------------------------------------------------------------------------------
/ios/videoCall/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
24 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: "com.android.application"
2 | apply plugin: "org.jetbrains.kotlin.android"
3 | apply plugin: "com.facebook.react"
4 | apply plugin: "com.google.gms.google-services"
5 |
6 | /**
7 | * This is the configuration block to customize your React Native Android app.
8 | * By default you don't need to apply any configuration, just uncomment the lines you need.
9 | */
10 | react {
11 | /* Folders */
12 | // The root of your project, i.e. where "package.json" lives. Default is '..'
13 | // root = file("../")
14 | // The folder where the react-native NPM package is. Default is ../node_modules/react-native
15 | // reactNativeDir = file("../node_modules/react-native")
16 | // The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
17 | // codegenDir = file("../node_modules/@react-native/codegen")
18 | // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
19 | // cliFile = file("../node_modules/react-native/cli.js")
20 |
21 | /* Variants */
22 | // The list of variants to that are debuggable. For those we're going to
23 | // skip the bundling of the JS bundle and the assets. By default is just 'debug'.
24 | // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
25 | // debuggableVariants = ["liteDebug", "prodDebug"]
26 |
27 | /* Bundling */
28 | // A list containing the node command and its flags. Default is just 'node'.
29 | // nodeExecutableAndArgs = ["node"]
30 | //
31 | // The command to run when bundling. By default is 'bundle'
32 | // bundleCommand = "ram-bundle"
33 | //
34 | // The path to the CLI configuration file. Default is empty.
35 | // bundleConfig = file(../rn-cli.config.js)
36 | //
37 | // The name of the generated asset file containing your JS bundle
38 | // bundleAssetName = "MyApplication.android.bundle"
39 | //
40 | // The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
41 | // entryFile = file("../js/MyApplication.android.js")
42 | //
43 | // A list of extra flags to pass to the 'bundle' commands.
44 | // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
45 | // extraPackagerArgs = []
46 |
47 | /* Hermes Commands */
48 | // The hermes compiler command to run. By default it is 'hermesc'
49 | // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
50 | //
51 | // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
52 | // hermesFlags = ["-O", "-output-source-map"]
53 | }
54 |
55 | /**
56 | * Set this to true to Run Proguard on Release builds to minify the Java bytecode.
57 | */
58 | def enableProguardInReleaseBuilds = false
59 |
60 | /**
61 | * The preferred build flavor of JavaScriptCore (JSC)
62 | *
63 | * For example, to use the international variant, you can use:
64 | * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
65 | *
66 | * The international variant includes ICU i18n library and necessary data
67 | * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
68 | * give correct results when using with locales other than en-US. Note that
69 | * this variant is about 6MiB larger per architecture than default.
70 | */
71 | def jscFlavor = 'org.webkit:android-jsc:+'
72 |
73 | android {
74 | ndkVersion rootProject.ext.ndkVersion
75 | buildToolsVersion rootProject.ext.buildToolsVersion
76 | compileSdk rootProject.ext.compileSdkVersion
77 |
78 | namespace "com.videocall"
79 | defaultConfig {
80 | applicationId "com.videocall"
81 | minSdkVersion rootProject.ext.minSdkVersion
82 | targetSdkVersion rootProject.ext.targetSdkVersion
83 | versionCode 1
84 | versionName "1.0"
85 | }
86 | signingConfigs {
87 | debug {
88 | storeFile file('debug.keystore')
89 | storePassword 'android'
90 | keyAlias 'androiddebugkey'
91 | keyPassword 'android'
92 | }
93 | }
94 | buildTypes {
95 | debug {
96 | signingConfig signingConfigs.debug
97 | }
98 | release {
99 | // Caution! In production, you need to generate your own keystore file.
100 | // see https://reactnative.dev/docs/signed-apk-android.
101 | signingConfig signingConfigs.debug
102 | minifyEnabled enableProguardInReleaseBuilds
103 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
104 | }
105 | }
106 | compileOptions {
107 | sourceCompatibility JavaVersion.VERSION_1_8
108 | targetCompatibility JavaVersion.VERSION_1_8
109 | }
110 | }
111 |
112 | dependencies {
113 | implementation platform('com.google.firebase:firebase-bom:32.0.0') // Use the latest version
114 | implementation 'com.google.firebase:firebase-messaging'
115 | // The version of react-native is set by the React Native Gradle Plugin
116 | implementation("com.facebook.react:react-android")
117 |
118 | if (hermesEnabled.toBoolean()) {
119 | implementation("com.facebook.react:hermes-android")
120 | } else {
121 | implementation jscFlavor
122 | }
123 | }
124 |
125 | apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
126 | apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
127 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
38 |
39 |
40 |
43 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
74 |
75 |
83 |
84 |
90 |
91 |
95 |
96 |
97 |
98 |
99 |
100 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
--------------------------------------------------------------------------------
/src/screens/Login.tsx:
--------------------------------------------------------------------------------
1 | import {useEffect, useState} from 'react';
2 | import {useUser} from '../hook/useUser';
3 | import {loadUser, login} from '../hook/api';
4 | import notifee, {AndroidImportance, EventType} from '@notifee/react-native';
5 |
6 | import {
7 | ActivityIndicator,
8 | Linking,
9 | SafeAreaView,
10 | Text,
11 | TouchableOpacity,
12 | View,
13 | } from 'react-native';
14 | import LoginForm from '../components/LoginForm';
15 | import {StyleSheet} from 'react-native';
16 | import Icon from 'react-native-vector-icons/FontAwesome';
17 | import messaging from '@react-native-firebase/messaging';
18 |
19 | function Login({navigation}: any): React.JSX.Element {
20 | const {user, loading: userLoading, userList, refetch} = useUser();
21 | const [phone, setPhone] = useState();
22 | const [password, setPassword] = useState();
23 | const [loading, setLoading] = useState(false);
24 | const [me, setMe] = useState({});
25 |
26 | const handleLogin = async () => {
27 | const res = await login(phone, password);
28 | refetch();
29 | };
30 |
31 | useEffect(() => {
32 | // Listen for notification actions
33 |
34 | messaging().onNotificationOpenedApp(remoteMessage => {
35 | console.log(
36 | 'Notification caused app to open from background state:',
37 | remoteMessage,
38 | );
39 |
40 | // Navigate to the VideoCallScreen or any other screen with parameters
41 | if (remoteMessage.data && remoteMessage.data.type === 'call') {
42 | const phone = remoteMessage.data.phone;
43 | const roomId = remoteMessage.data.roomId;
44 | const url = `myapp://video-call/${phone}/${roomId}`;
45 |
46 | Linking.openURL(url).catch(err =>
47 | console.error('Failed to open URL:', err),
48 | );
49 | }
50 | });
51 |
52 | const unsubscribe = notifee.onForegroundEvent(async ({type, detail}) => {
53 | if (type === EventType.ACTION_PRESS) {
54 | if (detail.pressAction.id === 'answer') {
55 | // Handle answer logic
56 | console.log('User answered the call');
57 | const userData = await loadUser();
58 | console.log(userData?.user?.phone, userData?.user?.code);
59 |
60 | if (userData?.user) {
61 | handleMakeConnection(
62 | userData?.user?.name,
63 | userData?.user?.code,
64 | true,
65 | );
66 | }
67 | } else if (detail.pressAction.id === 'decline') {
68 | // Handle decline logic
69 | console.log('User declined the call');
70 | }
71 | }
72 | });
73 |
74 | messaging()
75 | .getInitialNotification()
76 | .then(remoteMessage => {
77 | if (remoteMessage) {
78 | console.log(
79 | 'Notification caused app to open from quit state:',
80 | remoteMessage,
81 | );
82 |
83 | // Handle the navigation for deep linking
84 | if (remoteMessage.data && remoteMessage.data.type === 'call') {
85 | const phone = remoteMessage.data.phone;
86 | const roomId = remoteMessage.data.roomId;
87 | const url = `myapp://video-call/${phone}/${roomId}`;
88 |
89 | Linking.openURL(url).catch(err =>
90 | console.error('Failed to open URL:', err),
91 | );
92 | }
93 | }
94 | });
95 |
96 | return () => unsubscribe();
97 | }, []);
98 |
99 | const handleMakeConnection = (
100 | email: string,
101 | roomId: string,
102 | self: boolean,
103 | ) => {
104 | // Implement your call connection logic here
105 | console.log(`Initiating call to ${email} in room ${roomId}`);
106 | navigation.navigate('VideoCall', {email, roomId, self});
107 | };
108 |
109 | if (userLoading) {
110 | return (
111 |
112 |
113 |
114 | );
115 | }
116 | return (
117 |
119 | {!user ? (
120 | // Show login form if not logged in
121 |
129 | ) : (
130 | // Show user list if logged in
131 |
135 |
136 | Welcome, {user.name}! Select a user to call:
137 |
138 |
139 | {userList.length > 0 ? (
140 | userList.map(item => (
141 |
155 | {item.name}
156 |
158 | handleMakeConnection(user.phone, item.code, false)
159 | }
160 | style={{
161 | backgroundColor: 'green',
162 | borderRadius: 50,
163 | paddingVertical: 10,
164 | paddingHorizontal: 15,
165 | }}>
166 |
167 |
168 |
169 | ))
170 | ) : (
171 | No users available to call.
172 | )}
173 |
174 | )}
175 |
176 | );
177 | }
178 |
179 | export default Login;
180 |
181 | const styles = StyleSheet.create({
182 | inputContainer: {
183 | padding: 20,
184 | },
185 | input: {
186 | height: 50,
187 | borderColor: 'gray',
188 | borderWidth: 1,
189 | borderRadius: 8,
190 | marginBottom: 10,
191 | width: '70%',
192 | paddingHorizontal: 10,
193 | color: 'black',
194 | },
195 | });
196 |
--------------------------------------------------------------------------------
/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | #
4 | # Copyright © 2015-2021 the original 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 POSIX generated by Gradle.
22 | #
23 | # Important for running:
24 | #
25 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
26 | # noncompliant, but you have some other compliant shell such as ksh or
27 | # bash, then to run this script, type that shell name before the whole
28 | # command line, like:
29 | #
30 | # ksh Gradle
31 | #
32 | # Busybox and similar reduced shells will NOT work, because this script
33 | # requires all of these POSIX shell features:
34 | # * functions;
35 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
36 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»;
37 | # * compound commands having a testable exit status, especially «case»;
38 | # * various built-in commands including «command», «set», and «ulimit».
39 | #
40 | # Important for patching:
41 | #
42 | # (2) This script targets any POSIX shell, so it avoids extensions provided
43 | # by Bash, Ksh, etc; in particular arrays are avoided.
44 | #
45 | # The "traditional" practice of packing multiple parameters into a
46 | # space-separated string is a well documented source of bugs and security
47 | # problems, so this is (mostly) avoided, by progressively accumulating
48 | # options in "$@", and eventually passing that to Java.
49 | #
50 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
51 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
52 | # see the in-line comments for details.
53 | #
54 | # There are tweaks for specific operating systems such as AIX, CygWin,
55 | # Darwin, MinGW, and NonStop.
56 | #
57 | # (3) This script is generated from the Groovy template
58 | # https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
59 | # within the Gradle project.
60 | #
61 | # You can find Gradle at https://github.com/gradle/gradle/.
62 | #
63 | ##############################################################################
64 |
65 | # Attempt to set APP_HOME
66 |
67 | # Resolve links: $0 may be a link
68 | app_path=$0
69 |
70 | # Need this for daisy-chained symlinks.
71 | while
72 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
73 | [ -h "$app_path" ]
74 | do
75 | ls=$( ls -ld "$app_path" )
76 | link=${ls#*' -> '}
77 | case $link in #(
78 | /*) app_path=$link ;; #(
79 | *) app_path=$APP_HOME$link ;;
80 | esac
81 | done
82 |
83 | # This is normally unused
84 | # shellcheck disable=SC2034
85 | APP_BASE_NAME=${0##*/}
86 | # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87 | APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
88 |
89 | # Use the maximum available, or set MAX_FD != -1 to use that value.
90 | MAX_FD=maximum
91 |
92 | warn () {
93 | echo "$*"
94 | } >&2
95 |
96 | die () {
97 | echo
98 | echo "$*"
99 | echo
100 | exit 1
101 | } >&2
102 |
103 | # OS specific support (must be 'true' or 'false').
104 | cygwin=false
105 | msys=false
106 | darwin=false
107 | nonstop=false
108 | case "$( uname )" in #(
109 | CYGWIN* ) cygwin=true ;; #(
110 | Darwin* ) darwin=true ;; #(
111 | MSYS* | MINGW* ) msys=true ;; #(
112 | NONSTOP* ) nonstop=true ;;
113 | esac
114 |
115 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
116 |
117 |
118 | # Determine the Java command to use to start the JVM.
119 | if [ -n "$JAVA_HOME" ] ; then
120 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
121 | # IBM's JDK on AIX uses strange locations for the executables
122 | JAVACMD=$JAVA_HOME/jre/sh/java
123 | else
124 | JAVACMD=$JAVA_HOME/bin/java
125 | fi
126 | if [ ! -x "$JAVACMD" ] ; then
127 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
128 |
129 | Please set the JAVA_HOME variable in your environment to match the
130 | location of your Java installation."
131 | fi
132 | else
133 | JAVACMD=java
134 | if ! command -v java >/dev/null 2>&1
135 | then
136 | die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137 |
138 | Please set the JAVA_HOME variable in your environment to match the
139 | location of your Java installation."
140 | fi
141 | fi
142 |
143 | # Increase the maximum file descriptors if we can.
144 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
145 | case $MAX_FD in #(
146 | max*)
147 | # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
148 | # shellcheck disable=SC2039,SC3045
149 | MAX_FD=$( ulimit -H -n ) ||
150 | warn "Could not query maximum file descriptor limit"
151 | esac
152 | case $MAX_FD in #(
153 | '' | soft) :;; #(
154 | *)
155 | # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
156 | # shellcheck disable=SC2039,SC3045
157 | ulimit -n "$MAX_FD" ||
158 | warn "Could not set maximum file descriptor limit to $MAX_FD"
159 | esac
160 | fi
161 |
162 | # Collect all arguments for the java command, stacking in reverse order:
163 | # * args from the command line
164 | # * the main class name
165 | # * -classpath
166 | # * -D...appname settings
167 | # * --module-path (only if needed)
168 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
169 |
170 | # For Cygwin or MSYS, switch paths to Windows format before running java
171 | if "$cygwin" || "$msys" ; then
172 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
173 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
174 |
175 | JAVACMD=$( cygpath --unix "$JAVACMD" )
176 |
177 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
178 | for arg do
179 | if
180 | case $arg in #(
181 | -*) false ;; # don't mess with options #(
182 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
183 | [ -e "$t" ] ;; #(
184 | *) false ;;
185 | esac
186 | then
187 | arg=$( cygpath --path --ignore --mixed "$arg" )
188 | fi
189 | # Roll the args list around exactly as many times as the number of
190 | # args, so each arg winds up back in the position where it started, but
191 | # possibly modified.
192 | #
193 | # NB: a `for` loop captures its iteration list before it begins, so
194 | # changing the positional parameters here affects neither the number of
195 | # iterations, nor the values presented in `arg`.
196 | shift # remove old arg
197 | set -- "$@" "$arg" # push replacement arg
198 | done
199 | fi
200 |
201 |
202 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
203 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
204 |
205 | # Collect all arguments for the java command:
206 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
207 | # and any embedded shellness will be escaped.
208 | # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
209 | # treated as '${Hostname}' itself on the command line.
210 |
211 | set -- \
212 | "-Dorg.gradle.appname=$APP_BASE_NAME" \
213 | -classpath "$CLASSPATH" \
214 | org.gradle.wrapper.GradleWrapperMain \
215 | "$@"
216 |
217 | # Stop when "xargs" is not available.
218 | if ! command -v xargs >/dev/null 2>&1
219 | then
220 | die "xargs is not available"
221 | fi
222 |
223 | # Use "xargs" to parse quoted args.
224 | #
225 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed.
226 | #
227 | # In Bash we could simply go:
228 | #
229 | # readarray ARGS < <( xargs -n1 <<<"$var" ) &&
230 | # set -- "${ARGS[@]}" "$@"
231 | #
232 | # but POSIX shell has neither arrays nor command substitution, so instead we
233 | # post-process each arg (as a line of input to sed) to backslash-escape any
234 | # character that might be a shell metacharacter, then use eval to reverse
235 | # that process (while maintaining the separation between arguments), and wrap
236 | # the whole thing up as a single "set" statement.
237 | #
238 | # This will of course break if any of these variables contains a newline or
239 | # an unmatched quote.
240 | #
241 |
242 | eval "set -- $(
243 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
244 | xargs -n1 |
245 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
246 | tr '\n' ' '
247 | )" '"$@"'
248 |
249 | exec "$JAVACMD" "$@"
250 |
--------------------------------------------------------------------------------
/src/screens/VideoCallScreen.tsx:
--------------------------------------------------------------------------------
1 | import {useEffect, useRef, useState} from 'react';
2 | import {
3 | mediaDevices,
4 | MediaStream,
5 | RTCIceCandidate,
6 | RTCPeerConnection,
7 | RTCSessionDescription,
8 | } from 'react-native-webrtc';
9 | import {io, Socket} from 'socket.io-client';
10 |
11 | import {SafeAreaView} from 'react-native';
12 | import VideoStreamView from '../components/VideoStreamView';
13 | import CallControls from '../components/CallControls';
14 | import {useUser} from '../hook/useUser';
15 |
16 | const VideoCallScreen = ({route, navigation}: any) => {
17 | const {user} = useUser();
18 | const {email, roomId, self} = route.params;
19 | const [socket, setSocket] = useState(null);
20 | const [roomJoin, setRoomJoin] = useState('');
21 | const [stream, setStream] = useState(null);
22 | const [remoteEmailId, setRemoteEmailId] = useState();
23 | const [remoteStream, setRemoteStream] = useState(null);
24 | const [EventMessage, setEventMessage] = useState('');
25 | const [localMicOn, setlocalMicOn] = useState(true);
26 | const [localWebcamOn, setlocalWebcamOn] = useState(true);
27 |
28 | const peerConnection = useRef(null);
29 |
30 | // create socket connection and emit with email and code
31 | const handleMakeConnection = (
32 | email: string,
33 | roomId: string,
34 | self: boolean = true,
35 | ) => {
36 | try {
37 | let _socket = socket;
38 | if (!_socket) {
39 | _socket = io('https://ice-server-socket.onrender.com');
40 | // const _socket = io('http://10.0.2.2:8000');
41 | // _socket.emit('set-status', {code});
42 | setSocket(_socket);
43 | }
44 |
45 | if (_socket) {
46 | // const roomId = generateRandomString(10);
47 | // const email = user${generateRandomString(5)}@example.com;
48 |
49 | setEventMessage('Connecting...');
50 | console.log(roomId, email, self);
51 |
52 | _socket.emit('join_room', {room_id: roomId, email_id: email, self});
53 | } else {
54 | // console.log('socket not present');
55 | }
56 | } catch (error) {
57 | // console.log(error);
58 | }
59 | };
60 |
61 | // --------------------------------------------------------------------------------
62 | // when there is new user with same code on server this even trigger
63 | // we create offer and send buy socket newly arrived user
64 | const createOffer = async () => {
65 | if (!peerConnection.current) return;
66 | try {
67 | const offer = await peerConnection.current.createOffer({});
68 | await peerConnection.current.setLocalDescription(offer);
69 |
70 | return offer;
71 | } catch (error) {
72 | console.error('Error creating offer:', error);
73 | // Handle error appropriately
74 | }
75 | };
76 |
77 | const handleNewUserJoin = async ({email_id}: any) => {
78 | if (socket) {
79 | const offer = await createOffer();
80 | console.log('new USer Arrive ');
81 | socket.emit('call_user', {email_id, offer});
82 | setRemoteEmailId(email_id);
83 | }
84 | };
85 | // --------------------------------------------------------------------------------------
86 |
87 | // --------------------------------------------------------------------------------------
88 | // when newly arrive user receive offer he create ans
89 | // and send back to user who start calling
90 | const createAns = async (offer: any) => {
91 | if (!peerConnection.current) return;
92 | try {
93 | // console.log('offer recived to peer', offer);
94 | const offerDescription = new RTCSessionDescription(offer);
95 | await peerConnection.current.setRemoteDescription(offerDescription);
96 | const answerDescription = await peerConnection.current.createAnswer();
97 | await peerConnection.current.setLocalDescription(answerDescription);
98 |
99 | return answerDescription;
100 | } catch (error) {
101 | console.error('Error creating ans:', error);
102 | }
103 | };
104 | const handleIncommingCall = async (data: any) => {
105 | if (socket) {
106 | const {fromEmail, offer} = data;
107 | const ans = await createAns(offer);
108 |
109 | socket.emit('call_accepted', {email_id: fromEmail, ans});
110 | setRemoteEmailId(fromEmail);
111 | }
112 | };
113 | // --------------------------------------------------------------------------------------
114 |
115 | // --------------------------------------------------------------------------------------
116 | // when call accepted user Receive the ans of offer
117 | // set to there remote description
118 | const handleCallAccepted = async ({ans}: any) => {
119 | if (peerConnection.current) {
120 | try {
121 | const answerDescription = new RTCSessionDescription(ans);
122 | await peerConnection.current.setRemoteDescription(answerDescription);
123 | } catch (error) {
124 | console.error('Error setting setRemoteDescription:', error);
125 | }
126 | }
127 | };
128 | // --------------------------------------------------------------------------------------
129 |
130 | // --------------------------------------------------------------------------------------
131 | // when user get connected with socket by code and email
132 | // we get joined_room Event
133 | // than we start camera and set Room join
134 | useEffect(() => {
135 | if (socket) {
136 | const startStream = async () => {
137 | try {
138 | const _stream = await mediaDevices.getUserMedia({
139 | video: {
140 | facingMode: 'user',
141 | },
142 | audio: true,
143 | });
144 |
145 | setStream(_stream);
146 |
147 | // Add each track from the local stream to the peer connection
148 | _stream.getTracks().forEach(track => {
149 | peerConnection.current.addTrack(track, _stream);
150 | });
151 |
152 | // Set the stream to be shown locally in the RTCView
153 | } catch (error) {
154 | console.error('Error accessing media devices.', error);
155 | }
156 | };
157 |
158 | const handleRoomJoined = (data: RoomJoinedData) => {
159 | setRoomJoin(data.room_id);
160 | setEventMessage('');
161 | startStream();
162 | };
163 |
164 | socket.on('joined_room', handleRoomJoined);
165 |
166 | return () => {
167 | socket.off('joined_room', handleRoomJoined);
168 | socket.disconnect(); // Ensure proper disconnection
169 | };
170 | }
171 | }, [socket]);
172 | // --------------------------------------------------------------------------------------
173 |
174 | useEffect(() => {
175 | if (socket) {
176 | socket.on('user_joined', handleNewUserJoin);
177 | socket.on('incomming_call', handleIncommingCall);
178 | socket.on('call_accepted', handleCallAccepted);
179 | socket.on('call_ended', handleEndCall);
180 | socket.on('ice_candidate', handleIceCandidate);
181 |
182 | return () => {
183 | socket.off('user_joined', handleNewUserJoin);
184 | socket.off('incomming_call', handleIncommingCall);
185 | socket.off('call_accepted', handleCallAccepted);
186 | socket.off('call_ended', handleEndCall);
187 | socket.off('ice_candidate', handleIceCandidate);
188 | };
189 | }
190 | }, [socket]);
191 |
192 | const handleIceCandidate = async ({candidate}: any) => {
193 | try {
194 | if (candidate && peerConnection.current) {
195 | await peerConnection.current.addIceCandidate(
196 | new RTCIceCandidate(candidate),
197 | );
198 | }
199 | } catch (error) {
200 | console.error('Error adding received ICE candidate', error);
201 | }
202 | };
203 |
204 | const handleEndCall = () => {
205 | console.log('call ended');
206 |
207 | // Close the peer connection
208 | if (peerConnection.current) {
209 | peerConnection.current.close();
210 | peerConnection.current = null; // Clear the reference
211 | }
212 |
213 | // Stop all local media tracks
214 | if (stream) {
215 | stream.getTracks().forEach(track => track.stop());
216 | }
217 |
218 | // Reset state variables
219 | setStream(null);
220 | setRemoteStream(null);
221 | setRoomJoin('');
222 |
223 | if (navigation.canGoBack()) {
224 | navigation.goBack();
225 | } else {
226 | navigation.navigate('Login');
227 | }
228 | };
229 |
230 | useEffect(() => {
231 | if (socket && peerConnection.current) {
232 | peerConnection.current.onicecandidate = event => {
233 | if (event.candidate && remoteEmailId) {
234 | socket.emit('ice_candidate', {
235 | email_id: remoteEmailId,
236 | candidate: event.candidate,
237 | });
238 | }
239 | };
240 |
241 | peerConnection.current.ontrack = event => {
242 | const [remoteStream] = event.streams;
243 |
244 | if (remoteStream) {
245 | setRemoteStream(remoteStream);
246 | }
247 | };
248 |
249 | peerConnection.current.onconnectionstatechange = () => {
250 | const connectionState = peerConnection.current.connectionState;
251 |
252 | if (connectionState === 'connected') {
253 | console.log('Peers connected');
254 | } else if (
255 | connectionState === 'disconnected' ||
256 | connectionState === 'failed'
257 | ) {
258 | console.log('Connection failed or disconnected');
259 | }
260 | };
261 | }
262 | }, [socket, peerConnection, remoteEmailId]);
263 |
264 | useEffect(() => {
265 | peerConnection.current = new RTCPeerConnection({
266 | iceServers: [
267 | {
268 | urls: 'stun:stun.l.google.com:19302',
269 | },
270 | {
271 | urls: 'stun:stun1.l.google.com:19302',
272 | },
273 | {
274 | urls: 'stun:stun2.l.google.com:19302',
275 | },
276 | ],
277 | });
278 |
279 | const _socket = io('https://ice-server-socket.onrender.com');
280 | // const _socket = io('http://10.0.2.2:8000');
281 | // _socket.emit('set-status', {code});
282 | setSocket(_socket);
283 | }, []);
284 |
285 | const handleHagout = () => {
286 | if (peerConnection.current && socket) {
287 | socket.emit('end-call', {room_id: roomId});
288 | handleEndCall();
289 | }
290 | };
291 |
292 | function toggleMic() {
293 | if (stream) {
294 | setlocalMicOn(prev => !prev);
295 | stream.getAudioTracks().forEach(track => {
296 | localMicOn ? (track.enabled = false) : (track.enabled = true);
297 | });
298 | }
299 | }
300 |
301 | // Switch Camera
302 | // function switchCamera() {
303 | // localStream.getVideoTracks().forEach((track) => {
304 | // track._switchCamera();
305 | // });
306 | // }
307 |
308 | // Enable/Disable Camera
309 | function toggleCamera() {
310 | if (stream) {
311 | setlocalWebcamOn(prev => !prev);
312 | stream.getVideoTracks().forEach(track => {
313 | localWebcamOn ? (track.enabled = false) : (track.enabled = true);
314 | });
315 | }
316 | }
317 |
318 | function switchCamera() {
319 | if (stream) {
320 | stream.getVideoTracks().forEach(track => {
321 | track._switchCamera();
322 | });
323 | }
324 | }
325 |
326 | useEffect(() => {
327 | email && roomId && handleMakeConnection(email, roomId, self);
328 | }, [email, roomId, self]);
329 |
330 | return (
331 |
336 |
341 |
342 | {(remoteStream || stream) && (
343 |
350 | )}
351 |
352 | );
353 | };
354 |
355 | export default VideoCallScreen;
356 |
--------------------------------------------------------------------------------
/ios/videoCall.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 54;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 00E356F31AD99517003FC87E /* videoCallTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* videoCallTests.m */; };
11 | 0C80B921A6F3F58F76C31292 /* libPods-videoCall.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-videoCall.a */; };
12 | 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; };
13 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
14 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
15 | 7699B88040F8A987B510C191 /* libPods-videoCall-videoCallTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-videoCall-videoCallTests.a */; };
16 | 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
17 | /* End PBXBuildFile section */
18 |
19 | /* Begin PBXContainerItemProxy section */
20 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = {
21 | isa = PBXContainerItemProxy;
22 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
23 | proxyType = 1;
24 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A;
25 | remoteInfo = videoCall;
26 | };
27 | /* End PBXContainerItemProxy section */
28 |
29 | /* Begin PBXFileReference section */
30 | 00E356EE1AD99517003FC87E /* videoCallTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = videoCallTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
31 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
32 | 00E356F21AD99517003FC87E /* videoCallTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = videoCallTests.m; sourceTree = ""; };
33 | 13B07F961A680F5B00A75B9A /* videoCall.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = videoCall.app; sourceTree = BUILT_PRODUCTS_DIR; };
34 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = videoCall/AppDelegate.h; sourceTree = ""; };
35 | 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = videoCall/AppDelegate.mm; sourceTree = ""; };
36 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = videoCall/Images.xcassets; sourceTree = ""; };
37 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = videoCall/Info.plist; sourceTree = ""; };
38 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = videoCall/main.m; sourceTree = ""; };
39 | 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = videoCall/PrivacyInfo.xcprivacy; sourceTree = ""; };
40 | 19F6CBCC0A4E27FBF8BF4A61 /* libPods-videoCall-videoCallTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-videoCall-videoCallTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
41 | 3B4392A12AC88292D35C810B /* Pods-videoCall.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-videoCall.debug.xcconfig"; path = "Target Support Files/Pods-videoCall/Pods-videoCall.debug.xcconfig"; sourceTree = ""; };
42 | 5709B34CF0A7D63546082F79 /* Pods-videoCall.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-videoCall.release.xcconfig"; path = "Target Support Files/Pods-videoCall/Pods-videoCall.release.xcconfig"; sourceTree = ""; };
43 | 5B7EB9410499542E8C5724F5 /* Pods-videoCall-videoCallTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-videoCall-videoCallTests.debug.xcconfig"; path = "Target Support Files/Pods-videoCall-videoCallTests/Pods-videoCall-videoCallTests.debug.xcconfig"; sourceTree = ""; };
44 | 5DCACB8F33CDC322A6C60F78 /* libPods-videoCall.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-videoCall.a"; sourceTree = BUILT_PRODUCTS_DIR; };
45 | 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = videoCall/LaunchScreen.storyboard; sourceTree = ""; };
46 | 89C6BE57DB24E9ADA2F236DE /* Pods-videoCall-videoCallTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-videoCall-videoCallTests.release.xcconfig"; path = "Target Support Files/Pods-videoCall-videoCallTests/Pods-videoCall-videoCallTests.release.xcconfig"; sourceTree = ""; };
47 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
48 | /* End PBXFileReference section */
49 |
50 | /* Begin PBXFrameworksBuildPhase section */
51 | 00E356EB1AD99517003FC87E /* Frameworks */ = {
52 | isa = PBXFrameworksBuildPhase;
53 | buildActionMask = 2147483647;
54 | files = (
55 | 7699B88040F8A987B510C191 /* libPods-videoCall-videoCallTests.a in Frameworks */,
56 | );
57 | runOnlyForDeploymentPostprocessing = 0;
58 | };
59 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
60 | isa = PBXFrameworksBuildPhase;
61 | buildActionMask = 2147483647;
62 | files = (
63 | 0C80B921A6F3F58F76C31292 /* libPods-videoCall.a in Frameworks */,
64 | );
65 | runOnlyForDeploymentPostprocessing = 0;
66 | };
67 | /* End PBXFrameworksBuildPhase section */
68 |
69 | /* Begin PBXGroup section */
70 | 00E356EF1AD99517003FC87E /* videoCallTests */ = {
71 | isa = PBXGroup;
72 | children = (
73 | 00E356F21AD99517003FC87E /* videoCallTests.m */,
74 | 00E356F01AD99517003FC87E /* Supporting Files */,
75 | );
76 | path = videoCallTests;
77 | sourceTree = "";
78 | };
79 | 00E356F01AD99517003FC87E /* Supporting Files */ = {
80 | isa = PBXGroup;
81 | children = (
82 | 00E356F11AD99517003FC87E /* Info.plist */,
83 | );
84 | name = "Supporting Files";
85 | sourceTree = "";
86 | };
87 | 13B07FAE1A68108700A75B9A /* videoCall */ = {
88 | isa = PBXGroup;
89 | children = (
90 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */,
91 | 13B07FB01A68108700A75B9A /* AppDelegate.mm */,
92 | 13B07FB51A68108700A75B9A /* Images.xcassets */,
93 | 13B07FB61A68108700A75B9A /* Info.plist */,
94 | 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */,
95 | 13B07FB71A68108700A75B9A /* main.m */,
96 | 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */,
97 | );
98 | name = videoCall;
99 | sourceTree = "";
100 | };
101 | 2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
102 | isa = PBXGroup;
103 | children = (
104 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
105 | 5DCACB8F33CDC322A6C60F78 /* libPods-videoCall.a */,
106 | 19F6CBCC0A4E27FBF8BF4A61 /* libPods-videoCall-videoCallTests.a */,
107 | );
108 | name = Frameworks;
109 | sourceTree = "";
110 | };
111 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = {
112 | isa = PBXGroup;
113 | children = (
114 | );
115 | name = Libraries;
116 | sourceTree = "";
117 | };
118 | 83CBB9F61A601CBA00E9B192 = {
119 | isa = PBXGroup;
120 | children = (
121 | 13B07FAE1A68108700A75B9A /* videoCall */,
122 | 832341AE1AAA6A7D00B99B32 /* Libraries */,
123 | 00E356EF1AD99517003FC87E /* videoCallTests */,
124 | 83CBBA001A601CBA00E9B192 /* Products */,
125 | 2D16E6871FA4F8E400B85C8A /* Frameworks */,
126 | BBD78D7AC51CEA395F1C20DB /* Pods */,
127 | );
128 | indentWidth = 2;
129 | sourceTree = "";
130 | tabWidth = 2;
131 | usesTabs = 0;
132 | };
133 | 83CBBA001A601CBA00E9B192 /* Products */ = {
134 | isa = PBXGroup;
135 | children = (
136 | 13B07F961A680F5B00A75B9A /* videoCall.app */,
137 | 00E356EE1AD99517003FC87E /* videoCallTests.xctest */,
138 | );
139 | name = Products;
140 | sourceTree = "";
141 | };
142 | BBD78D7AC51CEA395F1C20DB /* Pods */ = {
143 | isa = PBXGroup;
144 | children = (
145 | 3B4392A12AC88292D35C810B /* Pods-videoCall.debug.xcconfig */,
146 | 5709B34CF0A7D63546082F79 /* Pods-videoCall.release.xcconfig */,
147 | 5B7EB9410499542E8C5724F5 /* Pods-videoCall-videoCallTests.debug.xcconfig */,
148 | 89C6BE57DB24E9ADA2F236DE /* Pods-videoCall-videoCallTests.release.xcconfig */,
149 | );
150 | path = Pods;
151 | sourceTree = "";
152 | };
153 | /* End PBXGroup section */
154 |
155 | /* Begin PBXNativeTarget section */
156 | 00E356ED1AD99517003FC87E /* videoCallTests */ = {
157 | isa = PBXNativeTarget;
158 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "videoCallTests" */;
159 | buildPhases = (
160 | A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */,
161 | 00E356EA1AD99517003FC87E /* Sources */,
162 | 00E356EB1AD99517003FC87E /* Frameworks */,
163 | 00E356EC1AD99517003FC87E /* Resources */,
164 | C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */,
165 | F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */,
166 | );
167 | buildRules = (
168 | );
169 | dependencies = (
170 | 00E356F51AD99517003FC87E /* PBXTargetDependency */,
171 | );
172 | name = videoCallTests;
173 | productName = videoCallTests;
174 | productReference = 00E356EE1AD99517003FC87E /* videoCallTests.xctest */;
175 | productType = "com.apple.product-type.bundle.unit-test";
176 | };
177 | 13B07F861A680F5B00A75B9A /* videoCall */ = {
178 | isa = PBXNativeTarget;
179 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "videoCall" */;
180 | buildPhases = (
181 | C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */,
182 | 13B07F871A680F5B00A75B9A /* Sources */,
183 | 13B07F8C1A680F5B00A75B9A /* Frameworks */,
184 | 13B07F8E1A680F5B00A75B9A /* Resources */,
185 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
186 | 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */,
187 | E235C05ADACE081382539298 /* [CP] Copy Pods Resources */,
188 | );
189 | buildRules = (
190 | );
191 | dependencies = (
192 | );
193 | name = videoCall;
194 | productName = videoCall;
195 | productReference = 13B07F961A680F5B00A75B9A /* videoCall.app */;
196 | productType = "com.apple.product-type.application";
197 | };
198 | /* End PBXNativeTarget section */
199 |
200 | /* Begin PBXProject section */
201 | 83CBB9F71A601CBA00E9B192 /* Project object */ = {
202 | isa = PBXProject;
203 | attributes = {
204 | LastUpgradeCheck = 1210;
205 | TargetAttributes = {
206 | 00E356ED1AD99517003FC87E = {
207 | CreatedOnToolsVersion = 6.2;
208 | TestTargetID = 13B07F861A680F5B00A75B9A;
209 | };
210 | 13B07F861A680F5B00A75B9A = {
211 | LastSwiftMigration = 1120;
212 | };
213 | };
214 | };
215 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "videoCall" */;
216 | compatibilityVersion = "Xcode 12.0";
217 | developmentRegion = en;
218 | hasScannedForEncodings = 0;
219 | knownRegions = (
220 | en,
221 | Base,
222 | );
223 | mainGroup = 83CBB9F61A601CBA00E9B192;
224 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
225 | projectDirPath = "";
226 | projectRoot = "";
227 | targets = (
228 | 13B07F861A680F5B00A75B9A /* videoCall */,
229 | 00E356ED1AD99517003FC87E /* videoCallTests */,
230 | );
231 | };
232 | /* End PBXProject section */
233 |
234 | /* Begin PBXResourcesBuildPhase section */
235 | 00E356EC1AD99517003FC87E /* Resources */ = {
236 | isa = PBXResourcesBuildPhase;
237 | buildActionMask = 2147483647;
238 | files = (
239 | );
240 | runOnlyForDeploymentPostprocessing = 0;
241 | };
242 | 13B07F8E1A680F5B00A75B9A /* Resources */ = {
243 | isa = PBXResourcesBuildPhase;
244 | buildActionMask = 2147483647;
245 | files = (
246 | 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */,
247 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
248 | );
249 | runOnlyForDeploymentPostprocessing = 0;
250 | };
251 | /* End PBXResourcesBuildPhase section */
252 |
253 | /* Begin PBXShellScriptBuildPhase section */
254 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {
255 | isa = PBXShellScriptBuildPhase;
256 | buildActionMask = 2147483647;
257 | files = (
258 | );
259 | inputPaths = (
260 | "$(SRCROOT)/.xcode.env.local",
261 | "$(SRCROOT)/.xcode.env",
262 | );
263 | name = "Bundle React Native code and images";
264 | outputPaths = (
265 | );
266 | runOnlyForDeploymentPostprocessing = 0;
267 | shellPath = /bin/sh;
268 | shellScript = "set -e\n\nWITH_ENVIRONMENT=\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"$REACT_NATIVE_PATH/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
269 | };
270 | 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = {
271 | isa = PBXShellScriptBuildPhase;
272 | buildActionMask = 2147483647;
273 | files = (
274 | );
275 | inputFileListPaths = (
276 | "${PODS_ROOT}/Target Support Files/Pods-videoCall/Pods-videoCall-frameworks-${CONFIGURATION}-input-files.xcfilelist",
277 | );
278 | name = "[CP] Embed Pods Frameworks";
279 | outputFileListPaths = (
280 | "${PODS_ROOT}/Target Support Files/Pods-videoCall/Pods-videoCall-frameworks-${CONFIGURATION}-output-files.xcfilelist",
281 | );
282 | runOnlyForDeploymentPostprocessing = 0;
283 | shellPath = /bin/sh;
284 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-videoCall/Pods-videoCall-frameworks.sh\"\n";
285 | showEnvVarsInLog = 0;
286 | };
287 | A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */ = {
288 | isa = PBXShellScriptBuildPhase;
289 | buildActionMask = 2147483647;
290 | files = (
291 | );
292 | inputFileListPaths = (
293 | );
294 | inputPaths = (
295 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
296 | "${PODS_ROOT}/Manifest.lock",
297 | );
298 | name = "[CP] Check Pods Manifest.lock";
299 | outputFileListPaths = (
300 | );
301 | outputPaths = (
302 | "$(DERIVED_FILE_DIR)/Pods-videoCall-videoCallTests-checkManifestLockResult.txt",
303 | );
304 | runOnlyForDeploymentPostprocessing = 0;
305 | shellPath = /bin/sh;
306 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
307 | showEnvVarsInLog = 0;
308 | };
309 | C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = {
310 | isa = PBXShellScriptBuildPhase;
311 | buildActionMask = 2147483647;
312 | files = (
313 | );
314 | inputFileListPaths = (
315 | );
316 | inputPaths = (
317 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
318 | "${PODS_ROOT}/Manifest.lock",
319 | );
320 | name = "[CP] Check Pods Manifest.lock";
321 | outputFileListPaths = (
322 | );
323 | outputPaths = (
324 | "$(DERIVED_FILE_DIR)/Pods-videoCall-checkManifestLockResult.txt",
325 | );
326 | runOnlyForDeploymentPostprocessing = 0;
327 | shellPath = /bin/sh;
328 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
329 | showEnvVarsInLog = 0;
330 | };
331 | C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */ = {
332 | isa = PBXShellScriptBuildPhase;
333 | buildActionMask = 2147483647;
334 | files = (
335 | );
336 | inputFileListPaths = (
337 | "${PODS_ROOT}/Target Support Files/Pods-videoCall-videoCallTests/Pods-videoCall-videoCallTests-frameworks-${CONFIGURATION}-input-files.xcfilelist",
338 | );
339 | name = "[CP] Embed Pods Frameworks";
340 | outputFileListPaths = (
341 | "${PODS_ROOT}/Target Support Files/Pods-videoCall-videoCallTests/Pods-videoCall-videoCallTests-frameworks-${CONFIGURATION}-output-files.xcfilelist",
342 | );
343 | runOnlyForDeploymentPostprocessing = 0;
344 | shellPath = /bin/sh;
345 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-videoCall-videoCallTests/Pods-videoCall-videoCallTests-frameworks.sh\"\n";
346 | showEnvVarsInLog = 0;
347 | };
348 | E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = {
349 | isa = PBXShellScriptBuildPhase;
350 | buildActionMask = 2147483647;
351 | files = (
352 | );
353 | inputFileListPaths = (
354 | "${PODS_ROOT}/Target Support Files/Pods-videoCall/Pods-videoCall-resources-${CONFIGURATION}-input-files.xcfilelist",
355 | );
356 | name = "[CP] Copy Pods Resources";
357 | outputFileListPaths = (
358 | "${PODS_ROOT}/Target Support Files/Pods-videoCall/Pods-videoCall-resources-${CONFIGURATION}-output-files.xcfilelist",
359 | );
360 | runOnlyForDeploymentPostprocessing = 0;
361 | shellPath = /bin/sh;
362 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-videoCall/Pods-videoCall-resources.sh\"\n";
363 | showEnvVarsInLog = 0;
364 | };
365 | F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */ = {
366 | isa = PBXShellScriptBuildPhase;
367 | buildActionMask = 2147483647;
368 | files = (
369 | );
370 | inputFileListPaths = (
371 | "${PODS_ROOT}/Target Support Files/Pods-videoCall-videoCallTests/Pods-videoCall-videoCallTests-resources-${CONFIGURATION}-input-files.xcfilelist",
372 | );
373 | name = "[CP] Copy Pods Resources";
374 | outputFileListPaths = (
375 | "${PODS_ROOT}/Target Support Files/Pods-videoCall-videoCallTests/Pods-videoCall-videoCallTests-resources-${CONFIGURATION}-output-files.xcfilelist",
376 | );
377 | runOnlyForDeploymentPostprocessing = 0;
378 | shellPath = /bin/sh;
379 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-videoCall-videoCallTests/Pods-videoCall-videoCallTests-resources.sh\"\n";
380 | showEnvVarsInLog = 0;
381 | };
382 | /* End PBXShellScriptBuildPhase section */
383 |
384 | /* Begin PBXSourcesBuildPhase section */
385 | 00E356EA1AD99517003FC87E /* Sources */ = {
386 | isa = PBXSourcesBuildPhase;
387 | buildActionMask = 2147483647;
388 | files = (
389 | 00E356F31AD99517003FC87E /* videoCallTests.m in Sources */,
390 | );
391 | runOnlyForDeploymentPostprocessing = 0;
392 | };
393 | 13B07F871A680F5B00A75B9A /* Sources */ = {
394 | isa = PBXSourcesBuildPhase;
395 | buildActionMask = 2147483647;
396 | files = (
397 | 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */,
398 | 13B07FC11A68108700A75B9A /* main.m in Sources */,
399 | );
400 | runOnlyForDeploymentPostprocessing = 0;
401 | };
402 | /* End PBXSourcesBuildPhase section */
403 |
404 | /* Begin PBXTargetDependency section */
405 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = {
406 | isa = PBXTargetDependency;
407 | target = 13B07F861A680F5B00A75B9A /* videoCall */;
408 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */;
409 | };
410 | /* End PBXTargetDependency section */
411 |
412 | /* Begin XCBuildConfiguration section */
413 | 00E356F61AD99517003FC87E /* Debug */ = {
414 | isa = XCBuildConfiguration;
415 | baseConfigurationReference = 5B7EB9410499542E8C5724F5 /* Pods-videoCall-videoCallTests.debug.xcconfig */;
416 | buildSettings = {
417 | BUNDLE_LOADER = "$(TEST_HOST)";
418 | GCC_PREPROCESSOR_DEFINITIONS = (
419 | "DEBUG=1",
420 | "$(inherited)",
421 | );
422 | INFOPLIST_FILE = videoCallTests/Info.plist;
423 | IPHONEOS_DEPLOYMENT_TARGET = 13.4;
424 | LD_RUNPATH_SEARCH_PATHS = (
425 | "$(inherited)",
426 | "@executable_path/Frameworks",
427 | "@loader_path/Frameworks",
428 | );
429 | OTHER_LDFLAGS = (
430 | "-ObjC",
431 | "-lc++",
432 | "$(inherited)",
433 | );
434 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
435 | PRODUCT_NAME = "$(TARGET_NAME)";
436 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/videoCall.app/videoCall";
437 | };
438 | name = Debug;
439 | };
440 | 00E356F71AD99517003FC87E /* Release */ = {
441 | isa = XCBuildConfiguration;
442 | baseConfigurationReference = 89C6BE57DB24E9ADA2F236DE /* Pods-videoCall-videoCallTests.release.xcconfig */;
443 | buildSettings = {
444 | BUNDLE_LOADER = "$(TEST_HOST)";
445 | COPY_PHASE_STRIP = NO;
446 | INFOPLIST_FILE = videoCallTests/Info.plist;
447 | IPHONEOS_DEPLOYMENT_TARGET = 13.4;
448 | LD_RUNPATH_SEARCH_PATHS = (
449 | "$(inherited)",
450 | "@executable_path/Frameworks",
451 | "@loader_path/Frameworks",
452 | );
453 | OTHER_LDFLAGS = (
454 | "-ObjC",
455 | "-lc++",
456 | "$(inherited)",
457 | );
458 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
459 | PRODUCT_NAME = "$(TARGET_NAME)";
460 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/videoCall.app/videoCall";
461 | };
462 | name = Release;
463 | };
464 | 13B07F941A680F5B00A75B9A /* Debug */ = {
465 | isa = XCBuildConfiguration;
466 | baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-videoCall.debug.xcconfig */;
467 | buildSettings = {
468 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
469 | CLANG_ENABLE_MODULES = YES;
470 | CURRENT_PROJECT_VERSION = 1;
471 | ENABLE_BITCODE = NO;
472 | INFOPLIST_FILE = videoCall/Info.plist;
473 | LD_RUNPATH_SEARCH_PATHS = (
474 | "$(inherited)",
475 | "@executable_path/Frameworks",
476 | );
477 | MARKETING_VERSION = 1.0;
478 | OTHER_LDFLAGS = (
479 | "$(inherited)",
480 | "-ObjC",
481 | "-lc++",
482 | );
483 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
484 | PRODUCT_NAME = videoCall;
485 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
486 | SWIFT_VERSION = 5.0;
487 | VERSIONING_SYSTEM = "apple-generic";
488 | };
489 | name = Debug;
490 | };
491 | 13B07F951A680F5B00A75B9A /* Release */ = {
492 | isa = XCBuildConfiguration;
493 | baseConfigurationReference = 5709B34CF0A7D63546082F79 /* Pods-videoCall.release.xcconfig */;
494 | buildSettings = {
495 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
496 | CLANG_ENABLE_MODULES = YES;
497 | CURRENT_PROJECT_VERSION = 1;
498 | INFOPLIST_FILE = videoCall/Info.plist;
499 | LD_RUNPATH_SEARCH_PATHS = (
500 | "$(inherited)",
501 | "@executable_path/Frameworks",
502 | );
503 | MARKETING_VERSION = 1.0;
504 | OTHER_LDFLAGS = (
505 | "$(inherited)",
506 | "-ObjC",
507 | "-lc++",
508 | );
509 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
510 | PRODUCT_NAME = videoCall;
511 | SWIFT_VERSION = 5.0;
512 | VERSIONING_SYSTEM = "apple-generic";
513 | };
514 | name = Release;
515 | };
516 | 83CBBA201A601CBA00E9B192 /* Debug */ = {
517 | isa = XCBuildConfiguration;
518 | buildSettings = {
519 | ALWAYS_SEARCH_USER_PATHS = NO;
520 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
521 | CLANG_CXX_LANGUAGE_STANDARD = "c++20";
522 | CLANG_CXX_LIBRARY = "libc++";
523 | CLANG_ENABLE_MODULES = YES;
524 | CLANG_ENABLE_OBJC_ARC = YES;
525 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
526 | CLANG_WARN_BOOL_CONVERSION = YES;
527 | CLANG_WARN_COMMA = YES;
528 | CLANG_WARN_CONSTANT_CONVERSION = YES;
529 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
530 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
531 | CLANG_WARN_EMPTY_BODY = YES;
532 | CLANG_WARN_ENUM_CONVERSION = YES;
533 | CLANG_WARN_INFINITE_RECURSION = YES;
534 | CLANG_WARN_INT_CONVERSION = YES;
535 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
536 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
537 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
538 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
539 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
540 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
541 | CLANG_WARN_STRICT_PROTOTYPES = YES;
542 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
543 | CLANG_WARN_UNREACHABLE_CODE = YES;
544 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
545 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
546 | COPY_PHASE_STRIP = NO;
547 | ENABLE_STRICT_OBJC_MSGSEND = YES;
548 | ENABLE_TESTABILITY = YES;
549 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
550 | GCC_C_LANGUAGE_STANDARD = gnu99;
551 | GCC_DYNAMIC_NO_PIC = NO;
552 | GCC_NO_COMMON_BLOCKS = YES;
553 | GCC_OPTIMIZATION_LEVEL = 0;
554 | GCC_PREPROCESSOR_DEFINITIONS = (
555 | "DEBUG=1",
556 | "$(inherited)",
557 | );
558 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
559 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
560 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
561 | GCC_WARN_UNDECLARED_SELECTOR = YES;
562 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
563 | GCC_WARN_UNUSED_FUNCTION = YES;
564 | GCC_WARN_UNUSED_VARIABLE = YES;
565 | IPHONEOS_DEPLOYMENT_TARGET = 13.4;
566 | LD_RUNPATH_SEARCH_PATHS = (
567 | /usr/lib/swift,
568 | "$(inherited)",
569 | );
570 | LIBRARY_SEARCH_PATHS = (
571 | "\"$(SDKROOT)/usr/lib/swift\"",
572 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
573 | "\"$(inherited)\"",
574 | );
575 | MTL_ENABLE_DEBUG_INFO = YES;
576 | ONLY_ACTIVE_ARCH = YES;
577 | OTHER_CPLUSPLUSFLAGS = (
578 | "$(OTHER_CFLAGS)",
579 | "-DFOLLY_NO_CONFIG",
580 | "-DFOLLY_MOBILE=1",
581 | "-DFOLLY_USE_LIBCPP=1",
582 | "-DFOLLY_CFG_NO_COROUTINES=1",
583 | "-DFOLLY_HAVE_CLOCK_GETTIME=1",
584 | );
585 | SDKROOT = iphoneos;
586 | };
587 | name = Debug;
588 | };
589 | 83CBBA211A601CBA00E9B192 /* Release */ = {
590 | isa = XCBuildConfiguration;
591 | buildSettings = {
592 | ALWAYS_SEARCH_USER_PATHS = NO;
593 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
594 | CLANG_CXX_LANGUAGE_STANDARD = "c++20";
595 | CLANG_CXX_LIBRARY = "libc++";
596 | CLANG_ENABLE_MODULES = YES;
597 | CLANG_ENABLE_OBJC_ARC = YES;
598 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
599 | CLANG_WARN_BOOL_CONVERSION = YES;
600 | CLANG_WARN_COMMA = YES;
601 | CLANG_WARN_CONSTANT_CONVERSION = YES;
602 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
603 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
604 | CLANG_WARN_EMPTY_BODY = YES;
605 | CLANG_WARN_ENUM_CONVERSION = YES;
606 | CLANG_WARN_INFINITE_RECURSION = YES;
607 | CLANG_WARN_INT_CONVERSION = YES;
608 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
609 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
610 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
611 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
612 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
613 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
614 | CLANG_WARN_STRICT_PROTOTYPES = YES;
615 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
616 | CLANG_WARN_UNREACHABLE_CODE = YES;
617 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
618 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
619 | COPY_PHASE_STRIP = YES;
620 | ENABLE_NS_ASSERTIONS = NO;
621 | ENABLE_STRICT_OBJC_MSGSEND = YES;
622 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
623 | GCC_C_LANGUAGE_STANDARD = gnu99;
624 | GCC_NO_COMMON_BLOCKS = YES;
625 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
626 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
627 | GCC_WARN_UNDECLARED_SELECTOR = YES;
628 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
629 | GCC_WARN_UNUSED_FUNCTION = YES;
630 | GCC_WARN_UNUSED_VARIABLE = YES;
631 | IPHONEOS_DEPLOYMENT_TARGET = 13.4;
632 | LD_RUNPATH_SEARCH_PATHS = (
633 | /usr/lib/swift,
634 | "$(inherited)",
635 | );
636 | LIBRARY_SEARCH_PATHS = (
637 | "\"$(SDKROOT)/usr/lib/swift\"",
638 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
639 | "\"$(inherited)\"",
640 | );
641 | MTL_ENABLE_DEBUG_INFO = NO;
642 | OTHER_CPLUSPLUSFLAGS = (
643 | "$(OTHER_CFLAGS)",
644 | "-DFOLLY_NO_CONFIG",
645 | "-DFOLLY_MOBILE=1",
646 | "-DFOLLY_USE_LIBCPP=1",
647 | "-DFOLLY_CFG_NO_COROUTINES=1",
648 | "-DFOLLY_HAVE_CLOCK_GETTIME=1",
649 | );
650 | SDKROOT = iphoneos;
651 | VALIDATE_PRODUCT = YES;
652 | };
653 | name = Release;
654 | };
655 | /* End XCBuildConfiguration section */
656 |
657 | /* Begin XCConfigurationList section */
658 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "videoCallTests" */ = {
659 | isa = XCConfigurationList;
660 | buildConfigurations = (
661 | 00E356F61AD99517003FC87E /* Debug */,
662 | 00E356F71AD99517003FC87E /* Release */,
663 | );
664 | defaultConfigurationIsVisible = 0;
665 | defaultConfigurationName = Release;
666 | };
667 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "videoCall" */ = {
668 | isa = XCConfigurationList;
669 | buildConfigurations = (
670 | 13B07F941A680F5B00A75B9A /* Debug */,
671 | 13B07F951A680F5B00A75B9A /* Release */,
672 | );
673 | defaultConfigurationIsVisible = 0;
674 | defaultConfigurationName = Release;
675 | };
676 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "videoCall" */ = {
677 | isa = XCConfigurationList;
678 | buildConfigurations = (
679 | 83CBBA201A601CBA00E9B192 /* Debug */,
680 | 83CBBA211A601CBA00E9B192 /* Release */,
681 | );
682 | defaultConfigurationIsVisible = 0;
683 | defaultConfigurationName = Release;
684 | };
685 | /* End XCConfigurationList section */
686 | };
687 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
688 | }
689 |
--------------------------------------------------------------------------------