├── .buckconfig
├── .gitattributes
├── .gitignore
├── .watchmanconfig
├── README.md
├── android
├── app
│ ├── BUCK
│ ├── build.gradle
│ ├── build_defs.bzl
│ ├── proguard-rules.pro
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── wazoreactnativedemo
│ │ │ ├── MainActivity.java
│ │ │ ├── MainApplication.java
│ │ │ └── generated
│ │ │ └── BasePackageList.java
│ │ └── res
│ │ ├── drawable
│ │ ├── splashscreen.xml
│ │ └── splashscreen_image.png
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ └── values
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── styles.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── keystores
│ ├── BUCK
│ └── debug.keystore.properties
└── settings.gradle
├── app.json
├── assets
├── icon.png
└── splash.png
├── babel.config.js
├── index.js
├── ios
├── Podfile
├── Podfile.lock
├── WazoReactNativeDemo-tvOS
│ └── Info.plist
├── WazoReactNativeDemo-tvOSTests
│ └── Info.plist
├── WazoReactNativeDemo.xcodeproj
│ ├── project.pbxproj
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── WazoReactNativeDemo.xcscheme
├── WazoReactNativeDemo.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
├── WazoReactNativeDemo
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Base.lproj
│ │ └── LaunchScreen.xib
│ ├── Images.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Contents.json
│ │ └── SplashScreen.imageset
│ │ │ ├── Contents.json
│ │ │ └── splashscreen.png
│ ├── Info.plist
│ ├── SplashScreen.storyboard
│ ├── Supporting
│ │ └── Expo.plist
│ └── main.m
└── WazoReactNativeDemoTests
│ ├── Info.plist
│ └── WazoReactNativeDemoTests.m
├── metro.config.js
├── package.json
├── src
├── App.js
├── Dialer.js
├── Login.js
└── logo.png
└── yarn.lock
/.buckconfig:
--------------------------------------------------------------------------------
1 |
2 | [android]
3 | target = Google Inc.:Google APIs:23
4 |
5 | [maven_repositories]
6 | central = https://repo1.maven.org/maven2
7 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.pbxproj -text
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
4 |
5 | # Xcode
6 | #
7 | build/
8 | *.pbxuser
9 | !default.pbxuser
10 | *.mode1v3
11 | !default.mode1v3
12 | *.mode2v3
13 | !default.mode2v3
14 | *.perspectivev3
15 | !default.perspectivev3
16 | xcuserdata
17 | *.xccheckout
18 | *.moved-aside
19 | DerivedData
20 | *.hmap
21 | *.ipa
22 | *.xcuserstate
23 | project.xcworkspace
24 |
25 | # Android/IntelliJ
26 | #
27 | build/
28 | .idea
29 | .gradle
30 | local.properties
31 | *.iml
32 |
33 | # node.js
34 | #
35 | node_modules/
36 | npm-debug.log
37 | yarn-error.log
38 |
39 | # BUCK
40 | buck-out/
41 | \.buckd/
42 | *.keystore
43 |
44 | # fastlane
45 | #
46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47 | # screenshots whenever they are needed.
48 | # For more information about the recommended setup visit:
49 | # https://docs.fastlane.tools/best-practices/source-control/
50 |
51 | */fastlane/report.xml
52 | */fastlane/Preview.html
53 | */fastlane/screenshots
54 |
55 | # Bundle artifacts
56 | *.jsbundle
57 |
58 | # CocoaPods
59 | /ios/Pods/
60 |
61 | # Expo
62 | .expo/*
63 | web-build/
64 |
--------------------------------------------------------------------------------
/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # wazo-react-native-demo
2 | A simple demonstration of Wazo's SDK with React Native
3 |
4 |
5 | ## Development
6 |
7 | ### Issues
8 | To fix react build.
9 |
10 | - Go to xcode, add scheme React. Product, schemes, manage schemes and add React.
11 |
12 | To fix glog build.
13 |
14 | ```sh
15 | cd node_modules/react-native/third-party/glog-0.3.4
16 | sh ../../scripts/ios-configure-glog.sh
17 | ```
18 |
19 | #### WebRTC.framework/WebRTC' does not contain bitcode.
20 |
21 | Run :
22 | ```sh
23 | yarn download-webrtc-bitecode
24 | ```
25 |
--------------------------------------------------------------------------------
/android/app/BUCK:
--------------------------------------------------------------------------------
1 | # To learn about Buck see [Docs](https://buckbuild.com/).
2 | # To run your application with Buck:
3 | # - install Buck
4 | # - `npm start` - to start the packager
5 | # - `cd android`
6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
8 | # - `buck install -r android/app` - compile, install and run application
9 | #
10 |
11 | load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
12 |
13 | lib_deps = []
14 |
15 | create_aar_targets(glob(["libs/*.aar"]))
16 |
17 | create_jar_targets(glob(["libs/*.jar"]))
18 |
19 | android_library(
20 | name = "all-libs",
21 | exported_deps = lib_deps,
22 | )
23 |
24 | android_library(
25 | name = "app-code",
26 | srcs = glob([
27 | "src/main/java/**/*.java",
28 | ]),
29 | deps = [
30 | ":all-libs",
31 | ":build_config",
32 | ":res",
33 | ],
34 | )
35 |
36 | android_build_config(
37 | name = "build_config",
38 | package = "com.wazoreactnativedemo",
39 | )
40 |
41 | android_resource(
42 | name = "res",
43 | package = "com.wazoreactnativedemo",
44 | res = "src/main/res",
45 | )
46 |
47 | android_binary(
48 | name = "app",
49 | keystore = "//android/keystores:debug",
50 | manifest = "src/main/AndroidManifest.xml",
51 | package_type = "debug",
52 | deps = [
53 | ":app-code",
54 | ],
55 | )
56 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: "com.android.application"
2 |
3 | import com.android.build.OutputFile
4 |
5 | /**
6 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
7 | * and bundleReleaseJsAndAssets).
8 | * These basically call `react-native bundle` with the correct arguments during the Android build
9 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
10 | * bundle directly from the development server. Below you can see all the possible configurations
11 | * and their defaults. If you decide to add a configuration block, make sure to add it before the
12 | * `apply from: "../../node_modules/react-native/react.gradle"` line.
13 | *
14 | * project.ext.react = [
15 | * // the name of the generated asset file containing your JS bundle
16 | * bundleAssetName: "index.android.bundle",
17 | *
18 | * // the entry file for bundle generation
19 | * entryFile: "index.android.js",
20 | *
21 | * // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format
22 | * bundleCommand: "ram-bundle",
23 | *
24 | * // whether to bundle JS and assets in debug mode
25 | * bundleInDebug: false,
26 | *
27 | * // whether to bundle JS and assets in release mode
28 | * bundleInRelease: true,
29 | *
30 | * // whether to bundle JS and assets in another build variant (if configured).
31 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
32 | * // The configuration property can be in the following formats
33 | * // 'bundleIn${productFlavor}${buildType}'
34 | * // 'bundleIn${buildType}'
35 | * // bundleInFreeDebug: true,
36 | * // bundleInPaidRelease: true,
37 | * // bundleInBeta: true,
38 | *
39 | * // whether to disable dev mode in custom build variants (by default only disabled in release)
40 | * // for example: to disable dev mode in the staging build type (if configured)
41 | * devDisabledInStaging: true,
42 | * // The configuration property can be in the following formats
43 | * // 'devDisabledIn${productFlavor}${buildType}'
44 | * // 'devDisabledIn${buildType}'
45 | *
46 | * // the root of your project, i.e. where "package.json" lives
47 | * root: "../../",
48 | *
49 | * // where to put the JS bundle asset in debug mode
50 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
51 | *
52 | * // where to put the JS bundle asset in release mode
53 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release",
54 | *
55 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
56 | * // require('./image.png')), in debug mode
57 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
58 | *
59 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
60 | * // require('./image.png')), in release mode
61 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
62 | *
63 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means
64 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
65 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle
66 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
67 | * // for example, you might want to remove it from here.
68 | * inputExcludes: ["android/**", "ios/**"],
69 | *
70 | * // override which node gets called and with what additional arguments
71 | * nodeExecutableAndArgs: ["node"],
72 | *
73 | * // supply additional arguments to the packager
74 | * extraPackagerArgs: []
75 | * ]
76 | */
77 |
78 | project.ext.react = [
79 | entryFile: "index.js",
80 | enableHermes: false
81 | ]
82 |
83 | apply from: '../../node_modules/react-native-unimodules/gradle.groovy'
84 | apply from: "../../node_modules/react-native/react.gradle"
85 | apply from: "../../node_modules/expo-updates/scripts/create-manifest-android.gradle"
86 |
87 | /**
88 | * Set this to true to create two separate APKs instead of one:
89 | * - An APK that only works on ARM devices
90 | * - An APK that only works on x86 devices
91 | * The advantage is the size of the APK is reduced by about 4MB.
92 | * Upload all the APKs to the Play Store and people will download
93 | * the correct one based on the CPU architecture of their device.
94 | */
95 | def enableSeparateBuildPerCPUArchitecture = false
96 |
97 | /**
98 | * Run Proguard to shrink the Java bytecode in release builds.
99 | */
100 | def enableProguardInReleaseBuilds = false
101 |
102 | /**
103 | * The preferred build flavor of JavaScriptCore.
104 | *
105 | * For example, to use the international variant, you can use:
106 | * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
107 | *
108 | * The international variant includes ICU i18n library and necessary data
109 | * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
110 | * give correct results when using with locales other than en-US. Note that
111 | * this variant is about 6MiB larger per architecture than default.
112 | */
113 | def jscFlavor = 'org.webkit:android-jsc:+'
114 |
115 | /**
116 | * Whether to enable the Hermes VM.
117 | *
118 | * This should be set on project.ext.react and mirrored here. If it is not set
119 | * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
120 | * and the benefits of using Hermes will therefore be sharply reduced.
121 | */
122 | def enableHermes = project.ext.react.get("enableHermes", false);
123 |
124 | android {
125 | compileSdkVersion rootProject.ext.compileSdkVersion
126 |
127 | compileOptions {
128 | sourceCompatibility JavaVersion.VERSION_1_8
129 | targetCompatibility JavaVersion.VERSION_1_8
130 | }
131 |
132 | defaultConfig {
133 | applicationId "com.wazoreactnativedemo"
134 | minSdkVersion rootProject.ext.minSdkVersion
135 | targetSdkVersion rootProject.ext.targetSdkVersion
136 | versionCode 1
137 | versionName "1.0"
138 | }
139 | splits {
140 | abi {
141 | reset()
142 | enable enableSeparateBuildPerCPUArchitecture
143 | universalApk false // If true, also generate a universal APK
144 | include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
145 | }
146 | }
147 | signingConfigs {
148 | debug {
149 | storeFile file('debug.keystore')
150 | storePassword 'android'
151 | keyAlias 'androiddebugkey'
152 | keyPassword 'android'
153 | }
154 | }
155 | buildTypes {
156 | debug {
157 | signingConfig signingConfigs.debug
158 | }
159 | release {
160 | // Caution! In production, you need to generate your own keystore file.
161 | // see https://facebook.github.io/react-native/docs/signed-apk-android.
162 | signingConfig signingConfigs.debug
163 | minifyEnabled enableProguardInReleaseBuilds
164 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
165 | }
166 | }
167 | // applicationVariants are e.g. debug, release
168 | applicationVariants.all { variant ->
169 | variant.outputs.each { output ->
170 | // For each separate APK per architecture, set a unique version code as described here:
171 | // https://developer.android.com/studio/build/configure-apk-splits.html
172 | def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
173 | def abi = output.getFilter(OutputFile.ABI)
174 | if (abi != null) { // null for the universal-debug, universal-release variants
175 | output.versionCodeOverride =
176 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
177 | }
178 |
179 | }
180 | }
181 | }
182 |
183 | dependencies {
184 | implementation fileTree(dir: "libs", include: ["*.jar"])
185 | implementation "com.facebook.react:react-native:+" // From node_modules
186 | addUnimodulesDependencies()
187 |
188 | if (enableHermes) {
189 | def hermesPath = "../../node_modules/hermes-engine/android/";
190 | debugImplementation files(hermesPath + "hermes-debug.aar")
191 | releaseImplementation files(hermesPath + "hermes-release.aar")
192 | } else {
193 | implementation jscFlavor
194 | }
195 | }
196 |
197 | // Run this once to be able to run the application with BUCK
198 | // puts all compile dependencies into folder libs for BUCK to use
199 | task copyDownloadableDepsToLibs(type: Copy) {
200 | from configurations.compile
201 | into 'libs'
202 | }
203 |
204 | apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
205 |
--------------------------------------------------------------------------------
/android/app/build_defs.bzl:
--------------------------------------------------------------------------------
1 | """Helper definitions to glob .aar and .jar targets"""
2 |
3 | def create_aar_targets(aarfiles):
4 | for aarfile in aarfiles:
5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
6 | lib_deps.append(":" + name)
7 | android_prebuilt_aar(
8 | name = name,
9 | aar = aarfile,
10 | )
11 |
12 | def create_jar_targets(jarfiles):
13 | for jarfile in jarfiles:
14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
15 | lib_deps.append(":" + name)
16 | prebuilt_jar(
17 | name = name,
18 | binary_jar = jarfile,
19 | )
20 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
27 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/wazoreactnativedemo/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.wazoreactnativedemo;
2 |
3 | import android.os.Bundle;
4 |
5 | import com.facebook.react.ReactActivity;
6 | import com.facebook.react.ReactActivityDelegate;
7 | import com.facebook.react.ReactRootView;
8 | import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
9 |
10 | import expo.modules.splashscreen.SplashScreen;
11 | import expo.modules.splashscreen.SplashScreenImageResizeMode;
12 | import io.wazo.callkeep.RNCallKeepModule;
13 |
14 | public class MainActivity extends ReactActivity {
15 | @Override
16 | protected void onCreate(Bundle savedInstanceState) {
17 | super.onCreate(savedInstanceState);
18 | // SplashScreen.show(...) has to be called after super.onCreate(...)
19 | // Below line is handled by '@expo/configure-splash-screen' command and it's discouraged to modify it manually
20 | SplashScreen.show(this, SplashScreenImageResizeMode.CONTAIN, ReactRootView.class);
21 | }
22 |
23 |
24 | /**
25 | * Returns the name of the main component registered from JavaScript.
26 | * This is used to schedule rendering of the component.
27 | */
28 | @Override
29 | protected String getMainComponentName() {
30 | return "WazoReactNativeDemo";
31 | }
32 |
33 | @Override
34 | protected ReactActivityDelegate createReactActivityDelegate() {
35 | return new ReactActivityDelegate(this, getMainComponentName()) {
36 | @Override
37 | protected ReactRootView createRootView() {
38 | return new RNGestureHandlerEnabledRootView(MainActivity.this);
39 | }
40 | };
41 | }
42 |
43 | // Permission results
44 | @Override
45 | public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
46 | super.onRequestPermissionsResult(requestCode, permissions, grantResults);
47 |
48 | if (grantResults.length > 0) {
49 | switch (requestCode) {
50 | case RNCallKeepModule.REQUEST_READ_PHONE_STATE:
51 | RNCallKeepModule.onRequestPermissionsResult(requestCode, permissions, grantResults);
52 | break;
53 | }
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/wazoreactnativedemo/MainApplication.java:
--------------------------------------------------------------------------------
1 | package com.wazoreactnativedemo;
2 |
3 | import android.app.Application;
4 | import android.content.Context;
5 | import android.net.Uri;
6 |
7 | import com.facebook.react.PackageList;
8 | import com.facebook.react.ReactApplication;
9 | import com.facebook.react.ReactNativeHost;
10 | import com.facebook.react.ReactPackage;
11 | import com.facebook.react.shell.MainReactPackage;
12 | import com.facebook.soloader.SoLoader;
13 | import com.wazoreactnativedemo.generated.BasePackageList;
14 |
15 | import org.unimodules.adapters.react.ReactAdapterPackage;
16 | import org.unimodules.adapters.react.ModuleRegistryAdapter;
17 | import org.unimodules.adapters.react.ReactModuleRegistryProvider;
18 | import org.unimodules.core.interfaces.Package;
19 | import org.unimodules.core.interfaces.SingletonModule;
20 | import expo.modules.constants.ConstantsPackage;
21 | import expo.modules.permissions.PermissionsPackage;
22 | import expo.modules.filesystem.FileSystemPackage;
23 | import expo.modules.updates.UpdatesController;
24 |
25 | import java.lang.reflect.InvocationTargetException;
26 | import java.util.Arrays;
27 | import java.util.List;
28 | import javax.annotation.Nullable;
29 |
30 | public class MainApplication extends Application implements ReactApplication {
31 | private final ReactModuleRegistryProvider mModuleRegistryProvider = new ReactModuleRegistryProvider(
32 | new BasePackageList().getPackageList()
33 | );
34 |
35 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
36 | @Override
37 | public boolean getUseDeveloperSupport() {
38 | return BuildConfig.DEBUG;
39 | }
40 |
41 | @Override
42 | protected List getPackages() {
43 | List packages = new PackageList(this).getPackages();
44 | packages.add(new ModuleRegistryAdapter(mModuleRegistryProvider));
45 | return packages;
46 | }
47 |
48 | @Override
49 | protected String getJSMainModuleName() {
50 | return "index";
51 | }
52 |
53 | @Override
54 | protected @Nullable String getJSBundleFile() {
55 | if (BuildConfig.DEBUG) {
56 | return super.getJSBundleFile();
57 | } else {
58 | return UpdatesController.getInstance().getLaunchAssetFile();
59 | }
60 | }
61 |
62 | @Override
63 | protected @Nullable String getBundleAssetName() {
64 | if (BuildConfig.DEBUG) {
65 | return super.getBundleAssetName();
66 | } else {
67 | return UpdatesController.getInstance().getBundleAssetName();
68 | }
69 | }
70 | };
71 |
72 | @Override
73 | public ReactNativeHost getReactNativeHost() {
74 | return mReactNativeHost;
75 | }
76 |
77 | @Override
78 | public void onCreate() {
79 | super.onCreate();
80 | SoLoader.init(this, /* native exopackage */ false);
81 | initializeFlipper(this); // Remove this line if you don't want Flipper enabled
82 |
83 | if (!BuildConfig.DEBUG) {
84 | UpdatesController.initialize(this);
85 | }
86 | }
87 |
88 | /**
89 | * Loads Flipper in React Native templates.
90 | *
91 | * @param context
92 | */
93 | private static void initializeFlipper(Context context) {
94 | if (BuildConfig.DEBUG) {
95 | try {
96 | /*
97 | We use reflection here to pick up the class that initializes Flipper,
98 | since Flipper library is not available in release mode
99 | */
100 | Class> aClass = Class.forName("com.facebook.flipper.ReactNativeFlipper");
101 | aClass.getMethod("initializeFlipper", Context.class).invoke(null, context);
102 | } catch (ClassNotFoundException e) {
103 | e.printStackTrace();
104 | } catch (NoSuchMethodException e) {
105 | e.printStackTrace();
106 | } catch (IllegalAccessException e) {
107 | e.printStackTrace();
108 | } catch (InvocationTargetException e) {
109 | e.printStackTrace();
110 | }
111 | }
112 | }
113 | }
114 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/wazoreactnativedemo/generated/BasePackageList.java:
--------------------------------------------------------------------------------
1 | package com.wazoreactnativedemo.generated;
2 |
3 | import java.util.Arrays;
4 | import java.util.List;
5 | import org.unimodules.core.interfaces.Package;
6 |
7 | public class BasePackageList {
8 | public List getPackageList() {
9 | return Arrays.asList(
10 | new expo.modules.constants.ConstantsPackage(),
11 | new expo.modules.errorrecovery.ErrorRecoveryPackage(),
12 | new expo.modules.filesystem.FileSystemPackage(),
13 | new expo.modules.font.FontLoaderPackage(),
14 | new expo.modules.imageloader.ImageLoaderPackage(),
15 | new expo.modules.keepawake.KeepAwakePackage(),
16 | new expo.modules.lineargradient.LinearGradientPackage(),
17 | new expo.modules.location.LocationPackage(),
18 | new expo.modules.permissions.PermissionsPackage(),
19 | new expo.modules.splashscreen.SplashScreenPackage(),
20 | new expo.modules.sqlite.SQLitePackage(),
21 | new expo.modules.updates.UpdatesPackage(),
22 | new expo.modules.webbrowser.WebBrowserPackage()
23 | );
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/splashscreen.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/splashscreen_image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wazo-platform/wazo-react-native-demo/9e094cceea44646bbf0eca0636bfa02917c0fe4c/android/app/src/main/res/drawable/splashscreen_image.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wazo-platform/wazo-react-native-demo/9e094cceea44646bbf0eca0636bfa02917c0fe4c/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wazo-platform/wazo-react-native-demo/9e094cceea44646bbf0eca0636bfa02917c0fe4c/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wazo-platform/wazo-react-native-demo/9e094cceea44646bbf0eca0636bfa02917c0fe4c/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wazo-platform/wazo-react-native-demo/9e094cceea44646bbf0eca0636bfa02917c0fe4c/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wazo-platform/wazo-react-native-demo/9e094cceea44646bbf0eca0636bfa02917c0fe4c/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wazo-platform/wazo-react-native-demo/9e094cceea44646bbf0eca0636bfa02917c0fe4c/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wazo-platform/wazo-react-native-demo/9e094cceea44646bbf0eca0636bfa02917c0fe4c/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wazo-platform/wazo-react-native-demo/9e094cceea44646bbf0eca0636bfa02917c0fe4c/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wazo-platform/wazo-react-native-demo/9e094cceea44646bbf0eca0636bfa02917c0fe4c/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wazo-platform/wazo-react-native-demo/9e094cceea44646bbf0eca0636bfa02917c0fe4c/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | #FFFFFF
5 |
6 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | WazoReactNativeDemo
3 |
4 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | ext {
5 | buildToolsVersion = "28.0.3"
6 | minSdkVersion = 24
7 | compileSdkVersion = 28
8 | targetSdkVersion = 28
9 | }
10 | repositories {
11 | google()
12 | jcenter()
13 | }
14 | dependencies {
15 | classpath("com.android.tools.build:gradle:3.5.3")
16 |
17 | // NOTE: Do not place your application dependencies here; they belong
18 | // in the individual module build.gradle files
19 | }
20 | }
21 |
22 | allprojects {
23 | repositories {
24 | mavenLocal()
25 | maven {
26 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
27 | url("$rootDir/../node_modules/react-native/android")
28 | }
29 | maven {
30 | // Android JSC is installed from npm
31 | url("$rootDir/../node_modules/jsc-android/dist")
32 | }
33 |
34 | google()
35 | jcenter()
36 | maven { url 'https://jitpack.io' }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
20 | android.useAndroidX=true
21 | android.enableJetifier=true
22 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wazo-platform/wazo-react-native-demo/9e094cceea44646bbf0eca0636bfa02917c0fe4c/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.3-all.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | #
4 | # Copyright 2015 the original author or authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | ##
21 | ## Gradle start up script for UN*X
22 | ##
23 | ##############################################################################
24 |
25 | # Attempt to set APP_HOME
26 | # Resolve links: $0 may be a link
27 | PRG="$0"
28 | # Need this for relative symlinks.
29 | while [ -h "$PRG" ] ; do
30 | ls=`ls -ld "$PRG"`
31 | link=`expr "$ls" : '.*-> \(.*\)$'`
32 | if expr "$link" : '/.*' > /dev/null; then
33 | PRG="$link"
34 | else
35 | PRG=`dirname "$PRG"`"/$link"
36 | fi
37 | done
38 | SAVED="`pwd`"
39 | cd "`dirname \"$PRG\"`/" >/dev/null
40 | APP_HOME="`pwd -P`"
41 | cd "$SAVED" >/dev/null
42 |
43 | APP_NAME="Gradle"
44 | APP_BASE_NAME=`basename "$0"`
45 |
46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48 |
49 | # Use the maximum available, or set MAX_FD != -1 to use that value.
50 | MAX_FD="maximum"
51 |
52 | warn () {
53 | echo "$*"
54 | }
55 |
56 | die () {
57 | echo
58 | echo "$*"
59 | echo
60 | exit 1
61 | }
62 |
63 | # OS specific support (must be 'true' or 'false').
64 | cygwin=false
65 | msys=false
66 | darwin=false
67 | nonstop=false
68 | case "`uname`" in
69 | CYGWIN* )
70 | cygwin=true
71 | ;;
72 | Darwin* )
73 | darwin=true
74 | ;;
75 | MINGW* )
76 | msys=true
77 | ;;
78 | NONSTOP* )
79 | nonstop=true
80 | ;;
81 | esac
82 |
83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84 |
85 | # Determine the Java command to use to start the JVM.
86 | if [ -n "$JAVA_HOME" ] ; then
87 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
88 | # IBM's JDK on AIX uses strange locations for the executables
89 | JAVACMD="$JAVA_HOME/jre/sh/java"
90 | else
91 | JAVACMD="$JAVA_HOME/bin/java"
92 | fi
93 | if [ ! -x "$JAVACMD" ] ; then
94 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
95 |
96 | Please set the JAVA_HOME variable in your environment to match the
97 | location of your Java installation."
98 | fi
99 | else
100 | JAVACMD="java"
101 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
102 |
103 | Please set the JAVA_HOME variable in your environment to match the
104 | location of your Java installation."
105 | fi
106 |
107 | # Increase the maximum file descriptors if we can.
108 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
109 | MAX_FD_LIMIT=`ulimit -H -n`
110 | if [ $? -eq 0 ] ; then
111 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
112 | MAX_FD="$MAX_FD_LIMIT"
113 | fi
114 | ulimit -n $MAX_FD
115 | if [ $? -ne 0 ] ; then
116 | warn "Could not set maximum file descriptor limit: $MAX_FD"
117 | fi
118 | else
119 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
120 | fi
121 | fi
122 |
123 | # For Darwin, add options to specify how the application appears in the dock
124 | if $darwin; then
125 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
126 | fi
127 |
128 | # For Cygwin, switch paths to Windows format before running java
129 | if $cygwin ; then
130 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
131 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
132 | JAVACMD=`cygpath --unix "$JAVACMD"`
133 |
134 | # We build the pattern for arguments to be converted via cygpath
135 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
136 | SEP=""
137 | for dir in $ROOTDIRSRAW ; do
138 | ROOTDIRS="$ROOTDIRS$SEP$dir"
139 | SEP="|"
140 | done
141 | OURCYGPATTERN="(^($ROOTDIRS))"
142 | # Add a user-defined pattern to the cygpath arguments
143 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
144 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
145 | fi
146 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
147 | i=0
148 | for arg in "$@" ; do
149 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
150 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
151 |
152 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
153 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
154 | else
155 | eval `echo args$i`="\"$arg\""
156 | fi
157 | i=$((i+1))
158 | done
159 | case $i in
160 | (0) set -- ;;
161 | (1) set -- "$args0" ;;
162 | (2) set -- "$args0" "$args1" ;;
163 | (3) set -- "$args0" "$args1" "$args2" ;;
164 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
165 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
166 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
167 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
168 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
169 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
170 | esac
171 | fi
172 |
173 | # Escape application args
174 | save () {
175 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
176 | echo " "
177 | }
178 | APP_ARGS=$(save "$@")
179 |
180 | # Collect all arguments for the java command, following the shell quoting and substitution rules
181 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
182 |
183 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
184 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
185 | cd "$(dirname "$0")"
186 | fi
187 |
188 | exec "$JAVACMD" "$@"
189 |
--------------------------------------------------------------------------------
/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 http://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
33 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
34 |
35 | @rem Find java.exe
36 | if defined JAVA_HOME goto findJavaFromJavaHome
37 |
38 | set JAVA_EXE=java.exe
39 | %JAVA_EXE% -version >NUL 2>&1
40 | if "%ERRORLEVEL%" == "0" goto init
41 |
42 | echo.
43 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
44 | echo.
45 | echo Please set the JAVA_HOME variable in your environment to match the
46 | echo location of your Java installation.
47 |
48 | goto fail
49 |
50 | :findJavaFromJavaHome
51 | set JAVA_HOME=%JAVA_HOME:"=%
52 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
53 |
54 | if exist "%JAVA_EXE%" goto init
55 |
56 | echo.
57 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
58 | echo.
59 | echo Please set the JAVA_HOME variable in your environment to match the
60 | echo location of your Java installation.
61 |
62 | goto fail
63 |
64 | :init
65 | @rem Get command-line arguments, handling Windows variants
66 |
67 | if not "%OS%" == "Windows_NT" goto win9xME_args
68 |
69 | :win9xME_args
70 | @rem Slurp the command line arguments.
71 | set CMD_LINE_ARGS=
72 | set _SKIP=2
73 |
74 | :win9xME_args_slurp
75 | if "x%~1" == "x" goto execute
76 |
77 | set CMD_LINE_ARGS=%*
78 |
79 | :execute
80 | @rem Setup the command line
81 |
82 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
83 |
84 | @rem Execute Gradle
85 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
86 |
87 | :end
88 | @rem End local scope for the variables with windows NT shell
89 | if "%ERRORLEVEL%"=="0" goto mainEnd
90 |
91 | :fail
92 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
93 | rem the _cmd.exe /c_ return code!
94 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
95 | exit /b 1
96 |
97 | :mainEnd
98 | if "%OS%"=="Windows_NT" endlocal
99 |
100 | :omega
101 |
--------------------------------------------------------------------------------
/android/keystores/BUCK:
--------------------------------------------------------------------------------
1 | keystore(
2 | name = "debug",
3 | properties = "debug.keystore.properties",
4 | store = "debug.keystore",
5 | visibility = [
6 | "PUBLIC",
7 | ],
8 | )
9 |
--------------------------------------------------------------------------------
/android/keystores/debug.keystore.properties:
--------------------------------------------------------------------------------
1 | key.store=debug.keystore
2 | key.alias=androiddebugkey
3 | key.store.password=android
4 | key.alias.password=android
5 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'WazoReactNativeDemo'
2 |
3 | apply from: '../node_modules/react-native-unimodules/gradle.groovy'
4 | includeUnimodulesProjects()
5 |
6 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle");
7 | applyNativeModulesSettingsGradle(settings)
8 |
9 | include ':react-native-callkeep'
10 | project(':react-native-callkeep').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-callkeep/android')
11 |
12 | include ':WebRTCModule'
13 | project(':WebRTCModule').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webrtc/android')
14 |
15 | include ':app'
16 |
--------------------------------------------------------------------------------
/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "WazoReactNativeDemo",
3 | "displayName": "WazoReactNativeDemo"
4 | }
5 |
--------------------------------------------------------------------------------
/assets/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wazo-platform/wazo-react-native-demo/9e094cceea44646bbf0eca0636bfa02917c0fe4c/assets/icon.png
--------------------------------------------------------------------------------
/assets/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wazo-platform/wazo-react-native-demo/9e094cceea44646bbf0eca0636bfa02917c0fe4c/assets/splash.png
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = function(api) {
2 | api.cache(true);
3 | return {
4 | presets: ['babel-preset-expo'],
5 | };
6 | };
7 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | import { AppRegistry } from 'react-native';
2 | import App from './src/App';
3 |
4 | AppRegistry.registerComponent('WazoReactNativeDemo', () => App);
5 |
--------------------------------------------------------------------------------
/ios/Podfile:
--------------------------------------------------------------------------------
1 | platform :ios, '10.0'
2 |
3 | require_relative '../node_modules/react-native-unimodules/cocoapods'
4 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
5 |
6 | target 'WazoReactNativeDemo' do
7 | rn_prefix = "../node_modules/react-native"
8 | permissions_path = '../node_modules/react-native-permissions/ios'
9 |
10 | # React Native and its dependencies
11 | pod 'FBLazyVector', :path => "#{rn_prefix}/Libraries/FBLazyVector"
12 | pod 'FBReactNativeSpec', :path => "#{rn_prefix}/Libraries/FBReactNativeSpec"
13 | pod 'RCTRequired', :path => "#{rn_prefix}/Libraries/RCTRequired"
14 | pod 'RCTTypeSafety', :path => "#{rn_prefix}/Libraries/TypeSafety"
15 | pod 'React', :path => "#{rn_prefix}/"
16 | pod 'React-Core', :path => "#{rn_prefix}/"
17 | pod 'React-CoreModules', :path => "#{rn_prefix}/React/CoreModules"
18 | pod 'React-RCTActionSheet', :path => "#{rn_prefix}/Libraries/ActionSheetIOS"
19 | pod 'React-RCTAnimation', :path => "#{rn_prefix}/Libraries/NativeAnimation"
20 | pod 'React-RCTBlob', :path => "#{rn_prefix}/Libraries/Blob"
21 | pod 'React-RCTImage', :path => "#{rn_prefix}/Libraries/Image"
22 | pod 'React-RCTLinking', :path => "#{rn_prefix}/Libraries/LinkingIOS"
23 | pod 'React-RCTNetwork', :path => "#{rn_prefix}/Libraries/Network"
24 | pod 'React-RCTSettings', :path => "#{rn_prefix}/Libraries/Settings"
25 | pod 'React-RCTText', :path => "#{rn_prefix}/Libraries/Text"
26 | pod 'React-RCTVibration', :path => "#{rn_prefix}/Libraries/Vibration"
27 | pod 'React-Core/RCTWebSocket', :path => "#{rn_prefix}/"
28 | pod 'React-Core/DevSupport', :path => "#{rn_prefix}/"
29 | pod 'React-cxxreact', :path => "#{rn_prefix}/ReactCommon/cxxreact"
30 | pod 'React-jsi', :path => "#{rn_prefix}/ReactCommon/jsi"
31 | pod 'React-jsiexecutor', :path => "#{rn_prefix}/ReactCommon/jsiexecutor"
32 | pod 'React-jsinspector', :path => "#{rn_prefix}/ReactCommon/jsinspector"
33 | pod 'ReactCommon/jscallinvoker', :path => "#{rn_prefix}/ReactCommon"
34 | pod 'ReactCommon/turbomodule/core', :path => "#{rn_prefix}/ReactCommon"
35 | pod 'Yoga', :path => "#{rn_prefix}/ReactCommon/yoga"
36 | pod 'DoubleConversion', :podspec => "#{rn_prefix}/third-party-podspecs/DoubleConversion.podspec"
37 | pod 'glog', :podspec => "#{rn_prefix}/third-party-podspecs/glog.podspec"
38 | pod 'Folly', :podspec => "#{rn_prefix}/third-party-podspecs/Folly.podspec"
39 |
40 | # Other native modules
41 | pod 'Permission-Contacts', :path => "#{permissions_path}/Contacts.podspec"
42 | pod 'Permission-Microphone', :path => "#{permissions_path}/Microphone.podspec"
43 | pod 'Permission-Camera', :path => "#{permissions_path}/Camera.podspec"
44 | pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications.podspec"
45 | pod 'react-native-webrtc', :path => "../node_modules/react-native-webrtc"
46 | pod 'RNVoipPushNotification', :path => "../node_modules/react-native-voip-push-notification"
47 |
48 | # Automatically detect installed unimodules
49 | use_unimodules!
50 |
51 | # react-native-cli autolinking
52 | use_native_modules!
53 | end
54 |
--------------------------------------------------------------------------------
/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - boost-for-react-native (1.63.0)
3 | - DoubleConversion (1.1.6)
4 | - EXConstants (9.0.0):
5 | - UMConstantsInterface
6 | - UMCore
7 | - EXErrorRecovery (1.1.0):
8 | - UMCore
9 | - EXFileSystem (8.1.0):
10 | - UMCore
11 | - UMFileSystemInterface
12 | - EXFont (8.1.1):
13 | - UMCore
14 | - UMFontInterface
15 | - EXImageLoader (1.0.1):
16 | - React-Core
17 | - UMCore
18 | - UMImageLoaderInterface
19 | - EXKeepAwake (8.1.0):
20 | - UMCore
21 | - EXLinearGradient (8.1.0):
22 | - UMCore
23 | - EXLocation (8.1.0):
24 | - UMCore
25 | - UMPermissionsInterface
26 | - UMTaskManagerInterface
27 | - EXPermissions (8.1.0):
28 | - UMCore
29 | - UMPermissionsInterface
30 | - EXSplashScreen (0.2.3):
31 | - UMCore
32 | - EXSQLite (8.1.0):
33 | - UMCore
34 | - UMFileSystemInterface
35 | - EXUpdates (0.2.7):
36 | - React
37 | - UMCore
38 | - EXWebBrowser (8.2.1):
39 | - UMCore
40 | - FBLazyVector (0.61.5)
41 | - FBReactNativeSpec (0.61.5):
42 | - Folly (= 2018.10.22.00)
43 | - RCTRequired (= 0.61.5)
44 | - RCTTypeSafety (= 0.61.5)
45 | - React-Core (= 0.61.5)
46 | - React-jsi (= 0.61.5)
47 | - ReactCommon/turbomodule/core (= 0.61.5)
48 | - Folly (2018.10.22.00):
49 | - boost-for-react-native
50 | - DoubleConversion
51 | - Folly/Default (= 2018.10.22.00)
52 | - glog
53 | - Folly/Default (2018.10.22.00):
54 | - boost-for-react-native
55 | - DoubleConversion
56 | - glog
57 | - glog (0.3.5)
58 | - Permission-Camera (2.1.5):
59 | - RNPermissions
60 | - Permission-Contacts (2.1.5):
61 | - RNPermissions
62 | - Permission-Microphone (2.1.5):
63 | - RNPermissions
64 | - Permission-Notifications (2.1.5):
65 | - RNPermissions
66 | - RCTRequired (0.61.5)
67 | - RCTTypeSafety (0.61.5):
68 | - FBLazyVector (= 0.61.5)
69 | - Folly (= 2018.10.22.00)
70 | - RCTRequired (= 0.61.5)
71 | - React-Core (= 0.61.5)
72 | - React (0.61.5):
73 | - React-Core (= 0.61.5)
74 | - React-Core/DevSupport (= 0.61.5)
75 | - React-Core/RCTWebSocket (= 0.61.5)
76 | - React-RCTActionSheet (= 0.61.5)
77 | - React-RCTAnimation (= 0.61.5)
78 | - React-RCTBlob (= 0.61.5)
79 | - React-RCTImage (= 0.61.5)
80 | - React-RCTLinking (= 0.61.5)
81 | - React-RCTNetwork (= 0.61.5)
82 | - React-RCTSettings (= 0.61.5)
83 | - React-RCTText (= 0.61.5)
84 | - React-RCTVibration (= 0.61.5)
85 | - React-Core (0.61.5):
86 | - Folly (= 2018.10.22.00)
87 | - glog
88 | - React-Core/Default (= 0.61.5)
89 | - React-cxxreact (= 0.61.5)
90 | - React-jsi (= 0.61.5)
91 | - React-jsiexecutor (= 0.61.5)
92 | - Yoga
93 | - React-Core/CoreModulesHeaders (0.61.5):
94 | - Folly (= 2018.10.22.00)
95 | - glog
96 | - React-Core/Default
97 | - React-cxxreact (= 0.61.5)
98 | - React-jsi (= 0.61.5)
99 | - React-jsiexecutor (= 0.61.5)
100 | - Yoga
101 | - React-Core/Default (0.61.5):
102 | - Folly (= 2018.10.22.00)
103 | - glog
104 | - React-cxxreact (= 0.61.5)
105 | - React-jsi (= 0.61.5)
106 | - React-jsiexecutor (= 0.61.5)
107 | - Yoga
108 | - React-Core/DevSupport (0.61.5):
109 | - Folly (= 2018.10.22.00)
110 | - glog
111 | - React-Core/Default (= 0.61.5)
112 | - React-Core/RCTWebSocket (= 0.61.5)
113 | - React-cxxreact (= 0.61.5)
114 | - React-jsi (= 0.61.5)
115 | - React-jsiexecutor (= 0.61.5)
116 | - React-jsinspector (= 0.61.5)
117 | - Yoga
118 | - React-Core/RCTActionSheetHeaders (0.61.5):
119 | - Folly (= 2018.10.22.00)
120 | - glog
121 | - React-Core/Default
122 | - React-cxxreact (= 0.61.5)
123 | - React-jsi (= 0.61.5)
124 | - React-jsiexecutor (= 0.61.5)
125 | - Yoga
126 | - React-Core/RCTAnimationHeaders (0.61.5):
127 | - Folly (= 2018.10.22.00)
128 | - glog
129 | - React-Core/Default
130 | - React-cxxreact (= 0.61.5)
131 | - React-jsi (= 0.61.5)
132 | - React-jsiexecutor (= 0.61.5)
133 | - Yoga
134 | - React-Core/RCTBlobHeaders (0.61.5):
135 | - Folly (= 2018.10.22.00)
136 | - glog
137 | - React-Core/Default
138 | - React-cxxreact (= 0.61.5)
139 | - React-jsi (= 0.61.5)
140 | - React-jsiexecutor (= 0.61.5)
141 | - Yoga
142 | - React-Core/RCTImageHeaders (0.61.5):
143 | - Folly (= 2018.10.22.00)
144 | - glog
145 | - React-Core/Default
146 | - React-cxxreact (= 0.61.5)
147 | - React-jsi (= 0.61.5)
148 | - React-jsiexecutor (= 0.61.5)
149 | - Yoga
150 | - React-Core/RCTLinkingHeaders (0.61.5):
151 | - Folly (= 2018.10.22.00)
152 | - glog
153 | - React-Core/Default
154 | - React-cxxreact (= 0.61.5)
155 | - React-jsi (= 0.61.5)
156 | - React-jsiexecutor (= 0.61.5)
157 | - Yoga
158 | - React-Core/RCTNetworkHeaders (0.61.5):
159 | - Folly (= 2018.10.22.00)
160 | - glog
161 | - React-Core/Default
162 | - React-cxxreact (= 0.61.5)
163 | - React-jsi (= 0.61.5)
164 | - React-jsiexecutor (= 0.61.5)
165 | - Yoga
166 | - React-Core/RCTSettingsHeaders (0.61.5):
167 | - Folly (= 2018.10.22.00)
168 | - glog
169 | - React-Core/Default
170 | - React-cxxreact (= 0.61.5)
171 | - React-jsi (= 0.61.5)
172 | - React-jsiexecutor (= 0.61.5)
173 | - Yoga
174 | - React-Core/RCTTextHeaders (0.61.5):
175 | - Folly (= 2018.10.22.00)
176 | - glog
177 | - React-Core/Default
178 | - React-cxxreact (= 0.61.5)
179 | - React-jsi (= 0.61.5)
180 | - React-jsiexecutor (= 0.61.5)
181 | - Yoga
182 | - React-Core/RCTVibrationHeaders (0.61.5):
183 | - Folly (= 2018.10.22.00)
184 | - glog
185 | - React-Core/Default
186 | - React-cxxreact (= 0.61.5)
187 | - React-jsi (= 0.61.5)
188 | - React-jsiexecutor (= 0.61.5)
189 | - Yoga
190 | - React-Core/RCTWebSocket (0.61.5):
191 | - Folly (= 2018.10.22.00)
192 | - glog
193 | - React-Core/Default (= 0.61.5)
194 | - React-cxxreact (= 0.61.5)
195 | - React-jsi (= 0.61.5)
196 | - React-jsiexecutor (= 0.61.5)
197 | - Yoga
198 | - React-CoreModules (0.61.5):
199 | - FBReactNativeSpec (= 0.61.5)
200 | - Folly (= 2018.10.22.00)
201 | - RCTTypeSafety (= 0.61.5)
202 | - React-Core/CoreModulesHeaders (= 0.61.5)
203 | - React-RCTImage (= 0.61.5)
204 | - ReactCommon/turbomodule/core (= 0.61.5)
205 | - React-cxxreact (0.61.5):
206 | - boost-for-react-native (= 1.63.0)
207 | - DoubleConversion
208 | - Folly (= 2018.10.22.00)
209 | - glog
210 | - React-jsinspector (= 0.61.5)
211 | - React-jsi (0.61.5):
212 | - boost-for-react-native (= 1.63.0)
213 | - DoubleConversion
214 | - Folly (= 2018.10.22.00)
215 | - glog
216 | - React-jsi/Default (= 0.61.5)
217 | - React-jsi/Default (0.61.5):
218 | - boost-for-react-native (= 1.63.0)
219 | - DoubleConversion
220 | - Folly (= 2018.10.22.00)
221 | - glog
222 | - React-jsiexecutor (0.61.5):
223 | - DoubleConversion
224 | - Folly (= 2018.10.22.00)
225 | - glog
226 | - React-cxxreact (= 0.61.5)
227 | - React-jsi (= 0.61.5)
228 | - React-jsinspector (0.61.5)
229 | - react-native-webrtc (1.75.3):
230 | - React
231 | - React-RCTActionSheet (0.61.5):
232 | - React-Core/RCTActionSheetHeaders (= 0.61.5)
233 | - React-RCTAnimation (0.61.5):
234 | - React-Core/RCTAnimationHeaders (= 0.61.5)
235 | - React-RCTBlob (0.61.5):
236 | - React-Core/RCTBlobHeaders (= 0.61.5)
237 | - React-Core/RCTWebSocket (= 0.61.5)
238 | - React-jsi (= 0.61.5)
239 | - React-RCTNetwork (= 0.61.5)
240 | - React-RCTImage (0.61.5):
241 | - React-Core/RCTImageHeaders (= 0.61.5)
242 | - React-RCTNetwork (= 0.61.5)
243 | - React-RCTLinking (0.61.5):
244 | - React-Core/RCTLinkingHeaders (= 0.61.5)
245 | - React-RCTNetwork (0.61.5):
246 | - React-Core/RCTNetworkHeaders (= 0.61.5)
247 | - React-RCTSettings (0.61.5):
248 | - React-Core/RCTSettingsHeaders (= 0.61.5)
249 | - React-RCTText (0.61.5):
250 | - React-Core/RCTTextHeaders (= 0.61.5)
251 | - React-RCTVibration (0.61.5):
252 | - React-Core/RCTVibrationHeaders (= 0.61.5)
253 | - ReactCommon/jscallinvoker (0.61.5):
254 | - DoubleConversion
255 | - Folly (= 2018.10.22.00)
256 | - glog
257 | - React-cxxreact (= 0.61.5)
258 | - ReactCommon/turbomodule/core (0.61.5):
259 | - DoubleConversion
260 | - Folly (= 2018.10.22.00)
261 | - glog
262 | - React-Core (= 0.61.5)
263 | - React-cxxreact (= 0.61.5)
264 | - React-jsi (= 0.61.5)
265 | - ReactCommon/jscallinvoker (= 0.61.5)
266 | - RNCallKeep (3.0.13):
267 | - React
268 | - RNCAsyncStorage (1.11.0):
269 | - React
270 | - RNGestureHandler (1.6.1):
271 | - React
272 | - RNPermissions (2.1.5):
273 | - React
274 | - RNReanimated (1.7.1):
275 | - React
276 | - RNScreens (2.2.0):
277 | - React
278 | - RNVoipPushNotification (2.1.0):
279 | - React-Core
280 | - UMAppLoader (1.0.2)
281 | - UMBarCodeScannerInterface (5.1.0)
282 | - UMCameraInterface (5.1.0)
283 | - UMConstantsInterface (5.1.0)
284 | - UMCore (5.1.2)
285 | - UMFaceDetectorInterface (5.1.0)
286 | - UMFileSystemInterface (5.1.0)
287 | - UMFontInterface (5.1.0)
288 | - UMImageLoaderInterface (5.1.0)
289 | - UMPermissionsInterface (5.1.0):
290 | - UMCore
291 | - UMReactNativeAdapter (5.2.0):
292 | - React-Core
293 | - UMCore
294 | - UMFontInterface
295 | - UMSensorsInterface (5.1.0)
296 | - UMTaskManagerInterface (5.1.0)
297 | - Yoga (1.14.0)
298 |
299 | DEPENDENCIES:
300 | - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
301 | - EXConstants (from `../node_modules/expo-constants/ios`)
302 | - EXErrorRecovery (from `../node_modules/expo-error-recovery/ios`)
303 | - EXFileSystem (from `../node_modules/expo-file-system/ios`)
304 | - EXFont (from `../node_modules/expo-font/ios`)
305 | - EXImageLoader (from `../node_modules/expo-image-loader/ios`)
306 | - EXKeepAwake (from `../node_modules/expo-keep-awake/ios`)
307 | - EXLinearGradient (from `../node_modules/expo-linear-gradient/ios`)
308 | - EXLocation (from `../node_modules/expo-location/ios`)
309 | - EXPermissions (from `../node_modules/expo-permissions/ios`)
310 | - EXSplashScreen (from `../node_modules/expo-splash-screen/ios`)
311 | - EXSQLite (from `../node_modules/expo-sqlite/ios`)
312 | - EXUpdates (from `../node_modules/expo-updates/ios`)
313 | - EXWebBrowser (from `../node_modules/expo-web-browser/ios`)
314 | - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
315 | - FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`)
316 | - Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`)
317 | - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
318 | - Permission-Camera (from `../node_modules/react-native-permissions/ios/Camera.podspec`)
319 | - Permission-Contacts (from `../node_modules/react-native-permissions/ios/Contacts.podspec`)
320 | - Permission-Microphone (from `../node_modules/react-native-permissions/ios/Microphone.podspec`)
321 | - Permission-Notifications (from `../node_modules/react-native-permissions/ios/Notifications.podspec`)
322 | - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
323 | - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`)
324 | - React (from `../node_modules/react-native/`)
325 | - React-Core (from `../node_modules/react-native/`)
326 | - React-Core/DevSupport (from `../node_modules/react-native/`)
327 | - React-Core/RCTWebSocket (from `../node_modules/react-native/`)
328 | - React-CoreModules (from `../node_modules/react-native/React/CoreModules`)
329 | - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`)
330 | - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`)
331 | - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
332 | - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
333 | - react-native-webrtc (from `../node_modules/react-native-webrtc`)
334 | - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
335 | - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`)
336 | - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`)
337 | - React-RCTImage (from `../node_modules/react-native/Libraries/Image`)
338 | - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`)
339 | - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`)
340 | - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`)
341 | - React-RCTText (from `../node_modules/react-native/Libraries/Text`)
342 | - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`)
343 | - ReactCommon/jscallinvoker (from `../node_modules/react-native/ReactCommon`)
344 | - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
345 | - RNCallKeep (from `../node_modules/react-native-callkeep`)
346 | - "RNCAsyncStorage (from `../node_modules/@react-native-community/async-storage`)"
347 | - RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
348 | - RNPermissions (from `../node_modules/react-native-permissions`)
349 | - RNReanimated (from `../node_modules/react-native-reanimated`)
350 | - RNScreens (from `../node_modules/react-native-screens`)
351 | - RNVoipPushNotification (from `../node_modules/react-native-voip-push-notification`)
352 | - UMAppLoader (from `../node_modules/unimodules-app-loader/ios`)
353 | - UMBarCodeScannerInterface (from `../node_modules/unimodules-barcode-scanner-interface/ios`)
354 | - UMCameraInterface (from `../node_modules/unimodules-camera-interface/ios`)
355 | - UMConstantsInterface (from `../node_modules/unimodules-constants-interface/ios`)
356 | - "UMCore (from `../node_modules/@unimodules/core/ios`)"
357 | - UMFaceDetectorInterface (from `../node_modules/unimodules-face-detector-interface/ios`)
358 | - UMFileSystemInterface (from `../node_modules/unimodules-file-system-interface/ios`)
359 | - UMFontInterface (from `../node_modules/unimodules-font-interface/ios`)
360 | - UMImageLoaderInterface (from `../node_modules/unimodules-image-loader-interface/ios`)
361 | - UMPermissionsInterface (from `../node_modules/unimodules-permissions-interface/ios`)
362 | - "UMReactNativeAdapter (from `../node_modules/@unimodules/react-native-adapter/ios`)"
363 | - UMSensorsInterface (from `../node_modules/unimodules-sensors-interface/ios`)
364 | - UMTaskManagerInterface (from `../node_modules/unimodules-task-manager-interface/ios`)
365 | - Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
366 |
367 | SPEC REPOS:
368 | trunk:
369 | - boost-for-react-native
370 |
371 | EXTERNAL SOURCES:
372 | DoubleConversion:
373 | :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
374 | EXConstants:
375 | :path: "../node_modules/expo-constants/ios"
376 | EXErrorRecovery:
377 | :path: "../node_modules/expo-error-recovery/ios"
378 | EXFileSystem:
379 | :path: "../node_modules/expo-file-system/ios"
380 | EXFont:
381 | :path: "../node_modules/expo-font/ios"
382 | EXImageLoader:
383 | :path: "../node_modules/expo-image-loader/ios"
384 | EXKeepAwake:
385 | :path: "../node_modules/expo-keep-awake/ios"
386 | EXLinearGradient:
387 | :path: "../node_modules/expo-linear-gradient/ios"
388 | EXLocation:
389 | :path: "../node_modules/expo-location/ios"
390 | EXPermissions:
391 | :path: "../node_modules/expo-permissions/ios"
392 | EXSplashScreen:
393 | :path: "../node_modules/expo-splash-screen/ios"
394 | EXSQLite:
395 | :path: "../node_modules/expo-sqlite/ios"
396 | EXUpdates:
397 | :path: "../node_modules/expo-updates/ios"
398 | EXWebBrowser:
399 | :path: "../node_modules/expo-web-browser/ios"
400 | FBLazyVector:
401 | :path: "../node_modules/react-native/Libraries/FBLazyVector"
402 | FBReactNativeSpec:
403 | :path: "../node_modules/react-native/Libraries/FBReactNativeSpec"
404 | Folly:
405 | :podspec: "../node_modules/react-native/third-party-podspecs/Folly.podspec"
406 | glog:
407 | :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
408 | Permission-Camera:
409 | :path: "../node_modules/react-native-permissions/ios/Camera.podspec"
410 | Permission-Contacts:
411 | :path: "../node_modules/react-native-permissions/ios/Contacts.podspec"
412 | Permission-Microphone:
413 | :path: "../node_modules/react-native-permissions/ios/Microphone.podspec"
414 | Permission-Notifications:
415 | :path: "../node_modules/react-native-permissions/ios/Notifications.podspec"
416 | RCTRequired:
417 | :path: "../node_modules/react-native/Libraries/RCTRequired"
418 | RCTTypeSafety:
419 | :path: "../node_modules/react-native/Libraries/TypeSafety"
420 | React:
421 | :path: "../node_modules/react-native/"
422 | React-Core:
423 | :path: "../node_modules/react-native/"
424 | React-CoreModules:
425 | :path: "../node_modules/react-native/React/CoreModules"
426 | React-cxxreact:
427 | :path: "../node_modules/react-native/ReactCommon/cxxreact"
428 | React-jsi:
429 | :path: "../node_modules/react-native/ReactCommon/jsi"
430 | React-jsiexecutor:
431 | :path: "../node_modules/react-native/ReactCommon/jsiexecutor"
432 | React-jsinspector:
433 | :path: "../node_modules/react-native/ReactCommon/jsinspector"
434 | react-native-webrtc:
435 | :path: "../node_modules/react-native-webrtc"
436 | React-RCTActionSheet:
437 | :path: "../node_modules/react-native/Libraries/ActionSheetIOS"
438 | React-RCTAnimation:
439 | :path: "../node_modules/react-native/Libraries/NativeAnimation"
440 | React-RCTBlob:
441 | :path: "../node_modules/react-native/Libraries/Blob"
442 | React-RCTImage:
443 | :path: "../node_modules/react-native/Libraries/Image"
444 | React-RCTLinking:
445 | :path: "../node_modules/react-native/Libraries/LinkingIOS"
446 | React-RCTNetwork:
447 | :path: "../node_modules/react-native/Libraries/Network"
448 | React-RCTSettings:
449 | :path: "../node_modules/react-native/Libraries/Settings"
450 | React-RCTText:
451 | :path: "../node_modules/react-native/Libraries/Text"
452 | React-RCTVibration:
453 | :path: "../node_modules/react-native/Libraries/Vibration"
454 | ReactCommon:
455 | :path: "../node_modules/react-native/ReactCommon"
456 | RNCallKeep:
457 | :path: "../node_modules/react-native-callkeep"
458 | RNCAsyncStorage:
459 | :path: "../node_modules/@react-native-community/async-storage"
460 | RNGestureHandler:
461 | :path: "../node_modules/react-native-gesture-handler"
462 | RNPermissions:
463 | :path: "../node_modules/react-native-permissions"
464 | RNReanimated:
465 | :path: "../node_modules/react-native-reanimated"
466 | RNScreens:
467 | :path: "../node_modules/react-native-screens"
468 | RNVoipPushNotification:
469 | :path: "../node_modules/react-native-voip-push-notification"
470 | UMAppLoader:
471 | :path: "../node_modules/unimodules-app-loader/ios"
472 | UMBarCodeScannerInterface:
473 | :path: "../node_modules/unimodules-barcode-scanner-interface/ios"
474 | UMCameraInterface:
475 | :path: "../node_modules/unimodules-camera-interface/ios"
476 | UMConstantsInterface:
477 | :path: "../node_modules/unimodules-constants-interface/ios"
478 | UMCore:
479 | :path: "../node_modules/@unimodules/core/ios"
480 | UMFaceDetectorInterface:
481 | :path: "../node_modules/unimodules-face-detector-interface/ios"
482 | UMFileSystemInterface:
483 | :path: "../node_modules/unimodules-file-system-interface/ios"
484 | UMFontInterface:
485 | :path: "../node_modules/unimodules-font-interface/ios"
486 | UMImageLoaderInterface:
487 | :path: "../node_modules/unimodules-image-loader-interface/ios"
488 | UMPermissionsInterface:
489 | :path: "../node_modules/unimodules-permissions-interface/ios"
490 | UMReactNativeAdapter:
491 | :path: "../node_modules/@unimodules/react-native-adapter/ios"
492 | UMSensorsInterface:
493 | :path: "../node_modules/unimodules-sensors-interface/ios"
494 | UMTaskManagerInterface:
495 | :path: "../node_modules/unimodules-task-manager-interface/ios"
496 | Yoga:
497 | :path: "../node_modules/react-native/ReactCommon/yoga"
498 |
499 | SPEC CHECKSUMS:
500 | boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
501 | DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2
502 | EXConstants: 5304709b1bea70a4828f48ba4c7fc3ec3b2d9b17
503 | EXErrorRecovery: 8f4c21ab2f51bf75defe4536f841a37de59b0661
504 | EXFileSystem: cf4232ba7c62dc49b78c2d36005f97b6fddf0b01
505 | EXFont: b60f7a8900e3a12e7be3b2a40e19b22c7b5f89ba
506 | EXImageLoader: 5ad6896fa1ef2ee814b551873cbf7a7baccc694a
507 | EXKeepAwake: d045bc2cf1ad5a04f0323cc7c894b95b414042e0
508 | EXLinearGradient: 97d8095d1e4ad96f7893e010e564796ed8aeea42
509 | EXLocation: bbd487fd96a18a3ad9725389bbb94c4a5f78edf3
510 | EXPermissions: 24b97f734ce9172d245a5be38ad9ccfcb6135964
511 | EXSplashScreen: 6568daa178c8e17f2197d29cea858f0e0b61b695
512 | EXSQLite: 877ad6c8eb169353a2f94d5ad26510ffadd46a1f
513 | EXUpdates: db34a484d109fc11fc6f48bb42c2cabf5a2eafc8
514 | EXWebBrowser: 5902f99ac5ac551e5c82ff46f13a337b323aa9ea
515 | FBLazyVector: aaeaf388755e4f29cd74acbc9e3b8da6d807c37f
516 | FBReactNativeSpec: 118d0d177724c2d67f08a59136eb29ef5943ec75
517 | Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51
518 | glog: 1f3da668190260b06b429bb211bfbee5cd790c28
519 | Permission-Camera: afad27bf90337684d4a86f3825112d648c8c4d3b
520 | Permission-Contacts: edde2d433382b3118f0d4c9ebc7708d5d87c4f17
521 | Permission-Microphone: 0ffabc3fe1c75cfb260525ee3f529383c9f4368c
522 | Permission-Notifications: 231d0e1db2300b686548587d384ba414e6a93332
523 | RCTRequired: b153add4da6e7dbc44aebf93f3cf4fcae392ddf1
524 | RCTTypeSafety: 9aa1b91d7f9310fc6eadc3cf95126ffe818af320
525 | React: b6a59ef847b2b40bb6e0180a97d0ca716969ac78
526 | React-Core: 688b451f7d616cc1134ac95295b593d1b5158a04
527 | React-CoreModules: d04f8494c1a328b69ec11db9d1137d667f916dcb
528 | React-cxxreact: d0f7bcafa196ae410e5300736b424455e7fb7ba7
529 | React-jsi: cb2cd74d7ccf4cffb071a46833613edc79cdf8f7
530 | React-jsiexecutor: d5525f9ed5f782fdbacb64b9b01a43a9323d2386
531 | React-jsinspector: fa0ecc501688c3c4c34f28834a76302233e29dc0
532 | react-native-webrtc: 86d841823e66d68cc1f86712db1c2956056bf0c2
533 | React-RCTActionSheet: 600b4d10e3aea0913b5a92256d2719c0cdd26d76
534 | React-RCTAnimation: 791a87558389c80908ed06cc5dfc5e7920dfa360
535 | React-RCTBlob: d89293cc0236d9cb0933d85e430b0bbe81ad1d72
536 | React-RCTImage: 6b8e8df449eb7c814c99a92d6b52de6fe39dea4e
537 | React-RCTLinking: 121bb231c7503cf9094f4d8461b96a130fabf4a5
538 | React-RCTNetwork: fb353640aafcee84ca8b78957297bd395f065c9a
539 | React-RCTSettings: 8db258ea2a5efee381fcf7a6d5044e2f8b68b640
540 | React-RCTText: 9ccc88273e9a3aacff5094d2175a605efa854dbe
541 | React-RCTVibration: a49a1f42bf8f5acf1c3e297097517c6b3af377ad
542 | ReactCommon: 198c7c8d3591f975e5431bec1b0b3b581aa1c5dd
543 | RNCallKeep: d2dc7821436e3eddfd51f9ec7e83b08e3bd80e2a
544 | RNCAsyncStorage: d059c3ee71738c39834a627476322a5a8cd5bf36
545 | RNGestureHandler: 8f09cd560f8d533eb36da5a6c5a843af9f056b38
546 | RNPermissions: ad71dd4f767ec254f2cd57592fbee02afee75467
547 | RNReanimated: 4e102df74a9674fa943e05f97f3362b6e44d0b48
548 | RNScreens: 812b79d384e2bea7eebc4ec981469160d4948fd5
549 | RNVoipPushNotification: 6b38227bbbb2359dc11cbf826044f8ed4bd8de36
550 | UMAppLoader: ee77a072f9e15128f777ccd6d2d00f52ab4387e6
551 | UMBarCodeScannerInterface: 9dc692b87e5f20fe277fa57aa47f45d418c3cc6c
552 | UMCameraInterface: 625878bbf2ba188a8548675e1d1d2e438a653e6d
553 | UMConstantsInterface: 64060cf86587bcd90b1dbd804cceb6d377a308c1
554 | UMCore: eb200e882eadafcd31ead290770835fd648c0945
555 | UMFaceDetectorInterface: d6677d6ddc9ab95a0ca857aa7f8ba76656cc770f
556 | UMFileSystemInterface: c70ea7147198b9807080f3597f26236be49b0165
557 | UMFontInterface: d9d3b27af698c5389ae9e20b99ef56a083f491fb
558 | UMImageLoaderInterface: 14dd2c46c67167491effc9e91250e9510f12709e
559 | UMPermissionsInterface: 5e83a9167c177e4a0f0a3539345983cc749efb3e
560 | UMReactNativeAdapter: 126da3486c1a1f11945b649d557d6c2ebb9407b2
561 | UMSensorsInterface: 48941f70175e2975af1a9386c6d6cb16d8126805
562 | UMTaskManagerInterface: cb890c79c63885504ddc0efd7a7d01481760aca2
563 | Yoga: f2a7cd4280bfe2cca5a7aed98ba0eb3d1310f18b
564 |
565 | PODFILE CHECKSUM: 40b452a670164b12f23e450d8d23f17432b9b44a
566 |
567 | COCOAPODS: 1.9.1
568 |
--------------------------------------------------------------------------------
/ios/WazoReactNativeDemo-tvOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UIViewControllerBasedStatusBarAppearance
38 |
39 | NSLocationWhenInUseUsageDescription
40 |
41 | NSAppTransportSecurity
42 |
43 |
44 | NSExceptionDomains
45 |
46 | localhost
47 |
48 | NSExceptionAllowsInsecureHTTPLoads
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/ios/WazoReactNativeDemo-tvOSTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/ios/WazoReactNativeDemo.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 0731D3B824204D62009CAE85 /* Expo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 0731D3B524204D62009CAE85 /* Expo.plist */; };
11 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
12 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; };
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 | 3DE4DAD41476765101945408 /* libPods-WazoReactNativeDemo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D43FF9D506E70904424FA7E9 /* libPods-WazoReactNativeDemo.a */; };
16 | 99EC63CFB4B549BBAF093D10 /* SplashScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E3ABB89D1E68496EB7D95742 /* SplashScreen.storyboard */; };
17 | /* End PBXBuildFile section */
18 |
19 | /* Begin PBXFileReference section */
20 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; };
21 | 0731D3B524204D62009CAE85 /* Expo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Expo.plist; path = WazoReactNativeDemo/Supporting/Expo.plist; sourceTree = ""; };
22 | 13B07F961A680F5B00A75B9A /* WazoReactNativeDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WazoReactNativeDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
23 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = WazoReactNativeDemo/AppDelegate.h; sourceTree = ""; };
24 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = WazoReactNativeDemo/AppDelegate.m; sourceTree = ""; };
25 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; };
26 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = WazoReactNativeDemo/Images.xcassets; sourceTree = ""; };
27 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = WazoReactNativeDemo/Info.plist; sourceTree = ""; };
28 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = WazoReactNativeDemo/main.m; sourceTree = ""; };
29 | 2D16E6891FA4F8E400B85C8A /* libReact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libReact.a; sourceTree = BUILT_PRODUCTS_DIR; };
30 | 3B47C5AFCB8BDE514B7D1AC6 /* Pods-WazoReactNativeDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WazoReactNativeDemo.debug.xcconfig"; path = "Target Support Files/Pods-WazoReactNativeDemo/Pods-WazoReactNativeDemo.debug.xcconfig"; sourceTree = ""; };
31 | 8AC623DBF3A3E2CB072F81F2 /* Pods-WazoReactNativeDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WazoReactNativeDemo.release.xcconfig"; path = "Target Support Files/Pods-WazoReactNativeDemo/Pods-WazoReactNativeDemo.release.xcconfig"; sourceTree = ""; };
32 | D43FF9D506E70904424FA7E9 /* libPods-WazoReactNativeDemo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-WazoReactNativeDemo.a"; sourceTree = BUILT_PRODUCTS_DIR; };
33 | E3ABB89D1E68496EB7D95742 /* SplashScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = SplashScreen.storyboard; path = WazoReactNativeDemo/SplashScreen.storyboard; sourceTree = ""; };
34 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
35 | ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; };
36 | /* End PBXFileReference section */
37 |
38 | /* Begin PBXFrameworksBuildPhase section */
39 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
40 | isa = PBXFrameworksBuildPhase;
41 | buildActionMask = 2147483647;
42 | files = (
43 | 3DE4DAD41476765101945408 /* libPods-WazoReactNativeDemo.a in Frameworks */,
44 | );
45 | runOnlyForDeploymentPostprocessing = 0;
46 | };
47 | /* End PBXFrameworksBuildPhase section */
48 |
49 | /* Begin PBXGroup section */
50 | 13B07FAE1A68108700A75B9A /* WazoReactNativeDemo */ = {
51 | isa = PBXGroup;
52 | children = (
53 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */,
54 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */,
55 | 13B07FB01A68108700A75B9A /* AppDelegate.m */,
56 | 13B07FB51A68108700A75B9A /* Images.xcassets */,
57 | 13B07FB61A68108700A75B9A /* Info.plist */,
58 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */,
59 | 13B07FB71A68108700A75B9A /* main.m */,
60 | 0731D3B524204D62009CAE85 /* Expo.plist */,
61 | E3ABB89D1E68496EB7D95742 /* SplashScreen.storyboard */,
62 | );
63 | name = WazoReactNativeDemo;
64 | sourceTree = "";
65 | };
66 | 2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
67 | isa = PBXGroup;
68 | children = (
69 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
70 | ED2971642150620600B7C4FE /* JavaScriptCore.framework */,
71 | 2D16E6891FA4F8E400B85C8A /* libReact.a */,
72 | D43FF9D506E70904424FA7E9 /* libPods-WazoReactNativeDemo.a */,
73 | );
74 | name = Frameworks;
75 | sourceTree = "";
76 | };
77 | 72E5486571395D51695C2A02 /* Pods */ = {
78 | isa = PBXGroup;
79 | children = (
80 | 3B47C5AFCB8BDE514B7D1AC6 /* Pods-WazoReactNativeDemo.debug.xcconfig */,
81 | 8AC623DBF3A3E2CB072F81F2 /* Pods-WazoReactNativeDemo.release.xcconfig */,
82 | );
83 | path = Pods;
84 | sourceTree = "";
85 | };
86 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = {
87 | isa = PBXGroup;
88 | children = (
89 | );
90 | name = Libraries;
91 | sourceTree = "";
92 | };
93 | 83CBB9F61A601CBA00E9B192 = {
94 | isa = PBXGroup;
95 | children = (
96 | 13B07FAE1A68108700A75B9A /* WazoReactNativeDemo */,
97 | 832341AE1AAA6A7D00B99B32 /* Libraries */,
98 | 83CBBA001A601CBA00E9B192 /* Products */,
99 | 2D16E6871FA4F8E400B85C8A /* Frameworks */,
100 | 72E5486571395D51695C2A02 /* Pods */,
101 | );
102 | indentWidth = 2;
103 | sourceTree = "";
104 | tabWidth = 2;
105 | usesTabs = 0;
106 | };
107 | 83CBBA001A601CBA00E9B192 /* Products */ = {
108 | isa = PBXGroup;
109 | children = (
110 | 13B07F961A680F5B00A75B9A /* WazoReactNativeDemo.app */,
111 | );
112 | name = Products;
113 | sourceTree = "";
114 | };
115 | /* End PBXGroup section */
116 |
117 | /* Begin PBXNativeTarget section */
118 | 13B07F861A680F5B00A75B9A /* WazoReactNativeDemo */ = {
119 | isa = PBXNativeTarget;
120 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "WazoReactNativeDemo" */;
121 | buildPhases = (
122 | F8BC737F2AD7A05944D9E2A1 /* [CP] Check Pods Manifest.lock */,
123 | FD4C38642228810C00325AF5 /* Start Packager */,
124 | 13B07F871A680F5B00A75B9A /* Sources */,
125 | 13B07F8C1A680F5B00A75B9A /* Frameworks */,
126 | 13B07F8E1A680F5B00A75B9A /* Resources */,
127 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
128 | FBF78C5087EEDA04672E9DC5 /* [CP] Embed Pods Frameworks */,
129 | );
130 | buildRules = (
131 | );
132 | dependencies = (
133 | );
134 | name = WazoReactNativeDemo;
135 | productName = "Hello World";
136 | productReference = 13B07F961A680F5B00A75B9A /* WazoReactNativeDemo.app */;
137 | productType = "com.apple.product-type.application";
138 | };
139 | /* End PBXNativeTarget section */
140 |
141 | /* Begin PBXProject section */
142 | 83CBB9F71A601CBA00E9B192 /* Project object */ = {
143 | isa = PBXProject;
144 | attributes = {
145 | LastUpgradeCheck = 940;
146 | ORGANIZATIONNAME = Facebook;
147 | TargetAttributes = {
148 | 13B07F861A680F5B00A75B9A = {
149 | DevelopmentTeam = 8P728VPRF9;
150 | };
151 | };
152 | };
153 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "WazoReactNativeDemo" */;
154 | compatibilityVersion = "Xcode 3.2";
155 | developmentRegion = English;
156 | hasScannedForEncodings = 0;
157 | knownRegions = (
158 | English,
159 | en,
160 | Base,
161 | );
162 | mainGroup = 83CBB9F61A601CBA00E9B192;
163 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
164 | projectDirPath = "";
165 | projectRoot = "";
166 | targets = (
167 | 13B07F861A680F5B00A75B9A /* WazoReactNativeDemo */,
168 | );
169 | };
170 | /* End PBXProject section */
171 |
172 | /* Begin PBXResourcesBuildPhase section */
173 | 13B07F8E1A680F5B00A75B9A /* Resources */ = {
174 | isa = PBXResourcesBuildPhase;
175 | buildActionMask = 2147483647;
176 | files = (
177 | 0731D3B824204D62009CAE85 /* Expo.plist in Resources */,
178 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
179 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
180 | 99EC63CFB4B549BBAF093D10 /* SplashScreen.storyboard in Resources */,
181 | );
182 | runOnlyForDeploymentPostprocessing = 0;
183 | };
184 | /* End PBXResourcesBuildPhase section */
185 |
186 | /* Begin PBXShellScriptBuildPhase section */
187 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {
188 | isa = PBXShellScriptBuildPhase;
189 | buildActionMask = 2147483647;
190 | files = (
191 | );
192 | inputPaths = (
193 | );
194 | name = "Bundle React Native code and images";
195 | outputPaths = (
196 | );
197 | runOnlyForDeploymentPostprocessing = 0;
198 | shellPath = /bin/sh;
199 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh\n../node_modules/expo-updates/scripts/create-manifest-ios.sh";
200 | };
201 | F8BC737F2AD7A05944D9E2A1 /* [CP] Check Pods Manifest.lock */ = {
202 | isa = PBXShellScriptBuildPhase;
203 | buildActionMask = 2147483647;
204 | files = (
205 | );
206 | inputFileListPaths = (
207 | );
208 | inputPaths = (
209 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
210 | "${PODS_ROOT}/Manifest.lock",
211 | );
212 | name = "[CP] Check Pods Manifest.lock";
213 | outputFileListPaths = (
214 | );
215 | outputPaths = (
216 | "$(DERIVED_FILE_DIR)/Pods-WazoReactNativeDemo-checkManifestLockResult.txt",
217 | );
218 | runOnlyForDeploymentPostprocessing = 0;
219 | shellPath = /bin/sh;
220 | 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";
221 | showEnvVarsInLog = 0;
222 | };
223 | FBF78C5087EEDA04672E9DC5 /* [CP] Embed Pods Frameworks */ = {
224 | isa = PBXShellScriptBuildPhase;
225 | buildActionMask = 2147483647;
226 | files = (
227 | );
228 | inputPaths = (
229 | "${PODS_ROOT}/Target Support Files/Pods-WazoReactNativeDemo/Pods-WazoReactNativeDemo-frameworks.sh",
230 | "${PODS_ROOT}/../../node_modules/react-native-webrtc/ios/WebRTC.framework",
231 | );
232 | name = "[CP] Embed Pods Frameworks";
233 | outputPaths = (
234 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/WebRTC.framework",
235 | );
236 | runOnlyForDeploymentPostprocessing = 0;
237 | shellPath = /bin/sh;
238 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-WazoReactNativeDemo/Pods-WazoReactNativeDemo-frameworks.sh\"\n";
239 | showEnvVarsInLog = 0;
240 | };
241 | FD4C38642228810C00325AF5 /* Start Packager */ = {
242 | isa = PBXShellScriptBuildPhase;
243 | buildActionMask = 2147483647;
244 | files = (
245 | );
246 | inputFileListPaths = (
247 | );
248 | inputPaths = (
249 | );
250 | name = "Start Packager";
251 | outputFileListPaths = (
252 | );
253 | outputPaths = (
254 | );
255 | runOnlyForDeploymentPostprocessing = 0;
256 | shellPath = /bin/sh;
257 | shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n";
258 | showEnvVarsInLog = 0;
259 | };
260 | /* End PBXShellScriptBuildPhase section */
261 |
262 | /* Begin PBXSourcesBuildPhase section */
263 | 13B07F871A680F5B00A75B9A /* Sources */ = {
264 | isa = PBXSourcesBuildPhase;
265 | buildActionMask = 2147483647;
266 | files = (
267 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */,
268 | 13B07FC11A68108700A75B9A /* main.m in Sources */,
269 | );
270 | runOnlyForDeploymentPostprocessing = 0;
271 | };
272 | /* End PBXSourcesBuildPhase section */
273 |
274 | /* Begin PBXVariantGroup section */
275 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = {
276 | isa = PBXVariantGroup;
277 | children = (
278 | 13B07FB21A68108700A75B9A /* Base */,
279 | );
280 | name = LaunchScreen.xib;
281 | path = WazoReactNativeDemo;
282 | sourceTree = "";
283 | };
284 | /* End PBXVariantGroup section */
285 |
286 | /* Begin XCBuildConfiguration section */
287 | 13B07F941A680F5B00A75B9A /* Debug */ = {
288 | isa = XCBuildConfiguration;
289 | baseConfigurationReference = 3B47C5AFCB8BDE514B7D1AC6 /* Pods-WazoReactNativeDemo.debug.xcconfig */;
290 | buildSettings = {
291 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
292 | CURRENT_PROJECT_VERSION = 1;
293 | DEAD_CODE_STRIPPING = NO;
294 | DEVELOPMENT_TEAM = 8P728VPRF9;
295 | INFOPLIST_FILE = WazoReactNativeDemo/Info.plist;
296 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
297 | OTHER_LDFLAGS = (
298 | "$(inherited)",
299 | "-ObjC",
300 | "-lc++",
301 | );
302 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
303 | PRODUCT_NAME = WazoReactNativeDemo;
304 | VERSIONING_SYSTEM = "apple-generic";
305 | };
306 | name = Debug;
307 | };
308 | 13B07F951A680F5B00A75B9A /* Release */ = {
309 | isa = XCBuildConfiguration;
310 | baseConfigurationReference = 8AC623DBF3A3E2CB072F81F2 /* Pods-WazoReactNativeDemo.release.xcconfig */;
311 | buildSettings = {
312 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
313 | CURRENT_PROJECT_VERSION = 1;
314 | DEVELOPMENT_TEAM = 8P728VPRF9;
315 | INFOPLIST_FILE = WazoReactNativeDemo/Info.plist;
316 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
317 | OTHER_LDFLAGS = (
318 | "$(inherited)",
319 | "-ObjC",
320 | "-lc++",
321 | );
322 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
323 | PRODUCT_NAME = WazoReactNativeDemo;
324 | VERSIONING_SYSTEM = "apple-generic";
325 | };
326 | name = Release;
327 | };
328 | 83CBBA201A601CBA00E9B192 /* Debug */ = {
329 | isa = XCBuildConfiguration;
330 | buildSettings = {
331 | ALWAYS_SEARCH_USER_PATHS = NO;
332 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
333 | CLANG_CXX_LIBRARY = "libc++";
334 | CLANG_ENABLE_MODULES = YES;
335 | CLANG_ENABLE_OBJC_ARC = YES;
336 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
337 | CLANG_WARN_BOOL_CONVERSION = YES;
338 | CLANG_WARN_COMMA = YES;
339 | CLANG_WARN_CONSTANT_CONVERSION = YES;
340 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
341 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
342 | CLANG_WARN_EMPTY_BODY = YES;
343 | CLANG_WARN_ENUM_CONVERSION = YES;
344 | CLANG_WARN_INFINITE_RECURSION = YES;
345 | CLANG_WARN_INT_CONVERSION = YES;
346 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
347 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
348 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
349 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
350 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
351 | CLANG_WARN_STRICT_PROTOTYPES = YES;
352 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
353 | CLANG_WARN_UNREACHABLE_CODE = YES;
354 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
355 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
356 | COPY_PHASE_STRIP = NO;
357 | ENABLE_STRICT_OBJC_MSGSEND = YES;
358 | ENABLE_TESTABILITY = YES;
359 | GCC_C_LANGUAGE_STANDARD = gnu99;
360 | GCC_DYNAMIC_NO_PIC = NO;
361 | GCC_NO_COMMON_BLOCKS = YES;
362 | GCC_OPTIMIZATION_LEVEL = 0;
363 | GCC_PREPROCESSOR_DEFINITIONS = (
364 | "DEBUG=1",
365 | "$(inherited)",
366 | );
367 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
368 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
369 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
370 | GCC_WARN_UNDECLARED_SELECTOR = YES;
371 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
372 | GCC_WARN_UNUSED_FUNCTION = YES;
373 | GCC_WARN_UNUSED_VARIABLE = YES;
374 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
375 | MTL_ENABLE_DEBUG_INFO = YES;
376 | ONLY_ACTIVE_ARCH = YES;
377 | SDKROOT = iphoneos;
378 | };
379 | name = Debug;
380 | };
381 | 83CBBA211A601CBA00E9B192 /* Release */ = {
382 | isa = XCBuildConfiguration;
383 | buildSettings = {
384 | ALWAYS_SEARCH_USER_PATHS = NO;
385 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
386 | CLANG_CXX_LIBRARY = "libc++";
387 | CLANG_ENABLE_MODULES = YES;
388 | CLANG_ENABLE_OBJC_ARC = YES;
389 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
390 | CLANG_WARN_BOOL_CONVERSION = YES;
391 | CLANG_WARN_COMMA = YES;
392 | CLANG_WARN_CONSTANT_CONVERSION = YES;
393 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
394 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
395 | CLANG_WARN_EMPTY_BODY = YES;
396 | CLANG_WARN_ENUM_CONVERSION = YES;
397 | CLANG_WARN_INFINITE_RECURSION = YES;
398 | CLANG_WARN_INT_CONVERSION = YES;
399 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
400 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
401 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
402 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
403 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
404 | CLANG_WARN_STRICT_PROTOTYPES = YES;
405 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
406 | CLANG_WARN_UNREACHABLE_CODE = YES;
407 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
408 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
409 | COPY_PHASE_STRIP = YES;
410 | ENABLE_NS_ASSERTIONS = NO;
411 | ENABLE_STRICT_OBJC_MSGSEND = YES;
412 | GCC_C_LANGUAGE_STANDARD = gnu99;
413 | GCC_NO_COMMON_BLOCKS = YES;
414 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
415 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
416 | GCC_WARN_UNDECLARED_SELECTOR = YES;
417 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
418 | GCC_WARN_UNUSED_FUNCTION = YES;
419 | GCC_WARN_UNUSED_VARIABLE = YES;
420 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
421 | MTL_ENABLE_DEBUG_INFO = NO;
422 | SDKROOT = iphoneos;
423 | VALIDATE_PRODUCT = YES;
424 | };
425 | name = Release;
426 | };
427 | /* End XCBuildConfiguration section */
428 |
429 | /* Begin XCConfigurationList section */
430 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "WazoReactNativeDemo" */ = {
431 | isa = XCConfigurationList;
432 | buildConfigurations = (
433 | 13B07F941A680F5B00A75B9A /* Debug */,
434 | 13B07F951A680F5B00A75B9A /* Release */,
435 | );
436 | defaultConfigurationIsVisible = 0;
437 | defaultConfigurationName = Release;
438 | };
439 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "WazoReactNativeDemo" */ = {
440 | isa = XCConfigurationList;
441 | buildConfigurations = (
442 | 83CBBA201A601CBA00E9B192 /* Debug */,
443 | 83CBBA211A601CBA00E9B192 /* Release */,
444 | );
445 | defaultConfigurationIsVisible = 0;
446 | defaultConfigurationName = Release;
447 | };
448 | /* End XCConfigurationList section */
449 | };
450 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
451 | }
452 |
--------------------------------------------------------------------------------
/ios/WazoReactNativeDemo.xcodeproj/xcshareddata/xcschemes/WazoReactNativeDemo.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
43 |
49 |
50 |
51 |
52 |
53 |
58 |
59 |
61 |
67 |
68 |
69 |
70 |
71 |
77 |
78 |
79 |
80 |
81 |
82 |
92 |
94 |
100 |
101 |
102 |
103 |
104 |
105 |
111 |
113 |
119 |
120 |
121 |
122 |
124 |
125 |
128 |
129 |
130 |
--------------------------------------------------------------------------------
/ios/WazoReactNativeDemo.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ios/WazoReactNativeDemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/WazoReactNativeDemo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Facebook, Inc. and its affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the
5 | * LICENSE file in the root directory of this source tree.
6 | */
7 |
8 | #import
9 | #import
10 | #import
11 | #import
12 | #import
13 | #import
14 |
15 | #import
16 |
17 | @interface AppDelegate : UMAppDelegateWrapper
18 |
19 | @property (nonatomic, strong) UMModuleRegistryAdapter *moduleRegistryAdapter;
20 | @property (nonatomic, strong) UIWindow *window;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/ios/WazoReactNativeDemo/AppDelegate.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Facebook, Inc. and its affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the
5 | * LICENSE file in the root directory of this source tree.
6 | */
7 |
8 | #import "AppDelegate.h"
9 |
10 | #import
11 | #import
12 | #import
13 |
14 | #import
15 | #import
16 | #import
17 | #import "RNCallKeep.h"
18 | #import "RNVoipPushNotificationManager.h"
19 |
20 | @interface AppDelegate ()
21 |
22 | @property (nonatomic, strong) NSDictionary *launchOptions;
23 |
24 | @end
25 |
26 | @implementation AppDelegate
27 |
28 | @synthesize window = _window;
29 |
30 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
31 | {
32 | self.moduleRegistryAdapter = [[UMModuleRegistryAdapter alloc] initWithModuleRegistryProvider:[[UMModuleRegistryProvider alloc] init]];
33 | self.launchOptions = launchOptions;
34 |
35 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
36 | #ifdef DEBUG
37 | [self initializeReactNativeApp];
38 | #else
39 | EXUpdatesAppController *controller = [EXUpdatesAppController sharedInstance];
40 | controller.delegate = self;
41 | [controller startAndShowLaunchScreen:self.window];
42 | #endif
43 |
44 | [super application:application didFinishLaunchingWithOptions:launchOptions];
45 |
46 | return YES;
47 | }
48 |
49 | - (RCTBridge *)initializeReactNativeApp
50 | {
51 | RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:self.launchOptions];
52 | RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@"WazoReactNativeDemo" initialProperties:nil];
53 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
54 |
55 | UIViewController *rootViewController = [UIViewController new];
56 | rootViewController.view = rootView;
57 | self.window.rootViewController = rootViewController;
58 | [self.window makeKeyAndVisible];
59 |
60 | return bridge;
61 | }
62 |
63 | - (NSArray> *)extraModulesForBridge:(RCTBridge *)bridge
64 | {
65 | NSArray> *extraModules = [_moduleRegistryAdapter extraModulesForBridge:bridge];
66 | // You can inject any extra modules that you would like here, more information at:
67 | // https://facebook.github.io/react-native/docs/native-modules-ios.html#dependency-injection
68 | return extraModules;
69 | }
70 |
71 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge {
72 | #ifdef DEBUG
73 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
74 | #else
75 | return [[EXUpdatesAppController sharedInstance] launchAssetUrl];
76 | #endif
77 | }
78 |
79 | - (void)appController:(EXUpdatesAppController *)appController didStartWithSuccess:(BOOL)success
80 | {
81 | appController.bridge = [self initializeReactNativeApp];
82 | }
83 |
84 | // Handle updated push credentials
85 | - (void)pushRegistry:(PKPushRegistry *)registry didUpdatePushCredentials:(PKPushCredentials *)credentials forType:(NSString *)type {
86 |
87 | // Register VoIP push token (a property of PKPushCredentials) with server
88 | [RNVoipPushNotificationManager didUpdatePushCredentials:credentials forType:(NSString *)type];
89 | }
90 |
91 | // Handle incoming pushes
92 | - (void)pushRegistry:(PKPushRegistry *)registry didReceiveIncomingPushWithPayload:(PKPushPayload *)payload forType:(PKPushType)type withCompletionHandler:(void (^)(void))completion {
93 |
94 | // Process the received push
95 | [RNVoipPushNotificationManager didReceiveIncomingPushWithPayload:payload forType:(NSString *)type];
96 |
97 | NSDictionary *content = [payload.dictionaryPayload valueForKey:@"aps"];
98 | NSDictionary *alert = [content valueForKey:@"alert"];
99 | NSDictionary *items = [alert valueForKey:@"items"];
100 |
101 | NSString *uuid = [[[NSUUID UUID] UUIDString] lowercaseString];
102 | NSString *callerName = [items valueForKey:@"peer_caller_id_name"];
103 | NSString *handle = [items valueForKey:@"peer_caller_id_number"];
104 |
105 | [RNCallKeep reportNewIncomingCall:uuid handle:handle handleType:@"generic" hasVideo:false localizedCallerName:callerName fromPushKit:YES payload:content];
106 |
107 | completion();
108 | }
109 |
110 | - (BOOL)application:(UIApplication *)application
111 | continueUserActivity:(NSUserActivity *)userActivity
112 | restorationHandler:(void(^)(NSArray * __nullable restorableObjects))restorationHandler
113 | {
114 | return [RNCallKeep application:application
115 | continueUserActivity:userActivity
116 | restorationHandler:restorationHandler];
117 | }
118 |
119 | @end
120 |
--------------------------------------------------------------------------------
/ios/WazoReactNativeDemo/Base.lproj/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
21 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/ios/WazoReactNativeDemo/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/ios/WazoReactNativeDemo/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/ios/WazoReactNativeDemo/Images.xcassets/SplashScreen.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images": [
3 | {
4 | "idiom": "universal",
5 | "filename": "splashscreen.png",
6 | "scale": "1x"
7 | },
8 | {
9 | "idiom": "universal",
10 | "scale": "2x"
11 | },
12 | {
13 | "idiom": "universal",
14 | "scale": "3x"
15 | }
16 | ],
17 | "info": {
18 | "version": 1,
19 | "author": "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ios/WazoReactNativeDemo/Images.xcassets/SplashScreen.imageset/splashscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wazo-platform/wazo-react-native-demo/9e094cceea44646bbf0eca0636bfa02917c0fe4c/ios/WazoReactNativeDemo/Images.xcassets/SplashScreen.imageset/splashscreen.png
--------------------------------------------------------------------------------
/ios/WazoReactNativeDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | WazoReactNativeDemo
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSRequiresIPhoneOS
26 |
27 | NSLocationWhenInUseUsageDescription
28 |
29 | UILaunchStoryboardName
30 | SplashScreen
31 | UIRequiredDeviceCapabilities
32 |
33 | armv7
34 |
35 | UISupportedInterfaceOrientations
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationLandscapeLeft
39 | UIInterfaceOrientationLandscapeRight
40 |
41 | UIViewControllerBasedStatusBarAppearance
42 |
43 | NSLocationWhenInUseUsageDescription
44 |
45 | NSAppTransportSecurity
46 |
47 |
48 | NSAllowsArbitraryLoads
49 |
50 | NSExceptionDomains
51 |
52 | localhost
53 |
54 | NSExceptionAllowsInsecureHTTPLoads
55 |
56 |
57 |
58 |
59 | NSCalendarsUsageDescription
60 | Allow WazoReactNativeDemo to access your calendar
61 | NSCameraUsageDescription
62 | Allow WazoReactNativeDemo to use the camera
63 | NSContactsUsageDescription
64 | Allow WazoReactNativeDemo experiences to access your contacts
65 | NSLocationAlwaysAndWhenInUseUsageDescription
66 | Allow WazoReactNativeDemo to use your location
67 | NSLocationAlwaysUsageDescription
68 | Allow WazoReactNativeDemo to use your location
69 | NSLocationWhenInUseUsageDescription
70 | Allow WazoReactNativeDemo to use your location
71 | NSMicrophoneUsageDescription
72 | Allow WazoReactNativeDemo to access your microphone
73 | NSMotionUsageDescription
74 | Allow WazoReactNativeDemo to access your device's accelerometer
75 | NSPhotoLibraryAddUsageDescription
76 | Give WazoReactNativeDemo periences permission to save photos
77 | NSPhotoLibraryUsageDescription
78 | Give WazoReactNativeDemo periences permission to access your photos
79 | NSRemindersUsageDescription
80 | Allow WazoReactNativeDemo to access your reminders
81 |
82 |
83 |
--------------------------------------------------------------------------------
/ios/WazoReactNativeDemo/SplashScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
30 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/ios/WazoReactNativeDemo/Supporting/Expo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | EXUpdatesSDKVersion
6 | YOUR-APP-SDK-VERSION-HERE
7 | EXUpdatesURL
8 | YOUR-APP-URL-HERE
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ios/WazoReactNativeDemo/main.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Facebook, Inc. and its affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the
5 | * LICENSE file in the root directory of this source tree.
6 | */
7 |
8 | #import
9 |
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/ios/WazoReactNativeDemoTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/ios/WazoReactNativeDemoTests/WazoReactNativeDemoTests.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | *
4 | * This source code is licensed under the MIT license found in the
5 | * LICENSE file in the root directory of this source tree.
6 | */
7 |
8 | #import
9 | #import
10 |
11 | #import
12 | #import
13 |
14 | #define TIMEOUT_SECONDS 600
15 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!"
16 |
17 | @interface WazoReactNativeDemoTests : XCTestCase
18 |
19 | @end
20 |
21 | @implementation WazoReactNativeDemoTests
22 |
23 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
24 | {
25 | if (test(view)) {
26 | return YES;
27 | }
28 | for (UIView *subview in [view subviews]) {
29 | if ([self findSubviewInView:subview matching:test]) {
30 | return YES;
31 | }
32 | }
33 | return NO;
34 | }
35 |
36 | - (void)testRendersWelcomeScreen
37 | {
38 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
39 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
40 | BOOL foundElement = NO;
41 |
42 | __block NSString *redboxError = nil;
43 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
44 | if (level >= RCTLogLevelError) {
45 | redboxError = message;
46 | }
47 | });
48 |
49 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
50 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
51 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
52 |
53 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) {
54 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
55 | return YES;
56 | }
57 | return NO;
58 | }];
59 | }
60 |
61 | RCTSetLogFunction(RCTDefaultLogFunction);
62 |
63 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
64 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
65 | }
66 |
67 |
68 | @end
69 |
--------------------------------------------------------------------------------
/metro.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | transformer: {
3 | assetPlugins: ['expo-asset/tools/hashAssetFiles'],
4 | },
5 | };
6 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "index.js",
3 | "scripts": {
4 | "android": "react-native run-android",
5 | "ios": "react-native run-ios",
6 | "web": "expo start --web",
7 | "start": "react-native start",
8 | "test": "jest",
9 | "postinstall": "jetify && yarn download-webrtc-bitecode",
10 | "download-webrtc-bitecode": "./node_modules/react-native-webrtc/tools/downloadBitcode.sh",
11 | "apk": "cd android && ./gradlew assembleRelease && cd .."
12 | },
13 | "dependencies": {
14 | "@react-native-community/async-storage": "^1.11.0",
15 | "@wazo/sdk": "0.32.13",
16 | "expo": "~37.0.3",
17 | "expo-splash-screen": "^0.2.3",
18 | "expo-updates": "~0.2.0",
19 | "native-base": "^2.13.12",
20 | "react": "~16.9.0",
21 | "react-dom": "~16.9.0",
22 | "react-native": "~0.61.5",
23 | "react-native-callkeep": "3.0.13",
24 | "react-native-gesture-handler": "~1.6.0",
25 | "react-native-permissions": "^2.1.5",
26 | "react-native-reanimated": "~1.7.0",
27 | "react-native-screens": "~2.2.0",
28 | "react-native-unimodules": "~0.9.0",
29 | "react-native-voip-push-notification": "^2.1.0",
30 | "react-native-web": "~0.11.7",
31 | "react-native-webrtc": "^1.75.3",
32 | "uuid-random": "^1.3.0"
33 | },
34 | "devDependencies": {
35 | "@babel/core": "~7.9.0",
36 | "babel-jest": "~25.2.6",
37 | "jest": "~25.2.6",
38 | "react-test-renderer": "~16.9.0"
39 | },
40 | "jest": {
41 | "preset": "react-native"
42 | },
43 | "private": true
44 | }
45 |
--------------------------------------------------------------------------------
/src/App.js:
--------------------------------------------------------------------------------
1 | import React, { useState } from 'react';
2 |
3 | import Login from './Login';
4 | import Dialer from './Dialer';
5 |
6 | const defaultUsername = '';
7 | const defaultServer = 'demo.wazo.community';
8 |
9 | const App = () => {
10 | const [session, setSession] = useState(null);
11 |
12 | if (!session) {
13 | return ;
14 | }
15 |
16 | return setSession(null)} />;
17 | };
18 |
19 | export default App;
20 |
--------------------------------------------------------------------------------
/src/Dialer.js:
--------------------------------------------------------------------------------
1 | import React, { useReducer, useEffect } from 'react';
2 | import { StyleSheet, Text, View, Dimensions, Platform } from 'react-native';
3 | import RNCallKeep from 'react-native-callkeep';
4 | import ramdomUuid from 'uuid-random';
5 | import {Container, Content, Form, Input, Item, Label, Button, Footer } from 'native-base';
6 | import { RTCPeerConnection, RTCSessionDescription, MediaStream, mediaDevices, RTCView } from 'react-native-webrtc';
7 | import Wazo from '@wazo/sdk/lib/simple';
8 | import AsyncStorage from "@react-native-community/async-storage";
9 |
10 | // Polyfill WebRTC
11 | global.MediaStream = MediaStream;
12 | global.RTCSessionDescription = RTCSessionDescription;
13 | global.RTCPeerConnection = RTCPeerConnection;
14 | global.navigator.mediaDevices = {
15 | ...global.navigator.mediaDevices,
16 | getUserMedia: mediaDevices.getUserMedia,
17 | };
18 |
19 | const styles = StyleSheet.create({
20 | content: {
21 | flex: 1,
22 | position: 'relative',
23 | },
24 | form: {
25 | backgroundColor: 'white',
26 | },
27 | buttonsContainer: {
28 | flex: 1,
29 | paddingHorizontal: 10,
30 | flexDirection: 'row',
31 | },
32 | button: {
33 | margin: 10,
34 | flex: 1,
35 | alignItems: 'center',
36 | textAlign: 'center',
37 | },
38 | centeredText: {
39 | flex: 1,
40 | alignItems: 'center',
41 | textAlign: 'center',
42 | },
43 | localVideo: {
44 | width: 100,
45 | height: 100,
46 | position: 'absolute',
47 | right: 10,
48 | bottom: 60,
49 | },
50 | remoteVideo: {
51 | flex: 1,
52 | position: 'absolute',
53 | left: 0,
54 | top: 0,
55 | margin: 0,
56 | padding: 0,
57 | aspectRatio: 1,
58 | width: Dimensions.get('window').width,
59 | height: Dimensions.get('window').height,
60 | overflow: 'hidden',
61 | alignItems: 'center',
62 | },
63 | });
64 |
65 | const isIOS = Platform.OS === 'ios';
66 |
67 | const reducer = (state, action) => ({ ...state, ...action});
68 | const initialState = {
69 | ready: false,
70 | number: '',
71 | ringing: false,
72 | inCall: false,
73 | held: false,
74 | videoHeld: false,
75 | error: null,
76 | localStreamURL: null,
77 | remoteStreamURL: null,
78 | };
79 |
80 | // Can't be put in react state or it won't be updated in callkeep events.
81 | let currentSession;
82 |
83 | const Dialer = ({ onLogout }) => {
84 | const [ state, dispatch ] = useReducer(reducer, initialState);
85 | const { number, ringing, inCall, held, localStreamURL, remoteStreamURL, ready, videoHeld } = state;
86 | let currentCallId;
87 | let localStream;
88 | let remoteStream;
89 |
90 | const getCurrentCallId = () => {
91 | if (!currentCallId) {
92 | currentCallId = ramdomUuid().toLowerCase();
93 | }
94 |
95 | return currentCallId;
96 | };
97 |
98 | const init = async () => {
99 | await initializeWebRtc();
100 | await initializeCallKeep();
101 | displayLocalVideo();
102 |
103 | dispatch({ ready: true });
104 | };
105 |
106 | const initializeWebRtc = async () => {
107 | await Wazo.Phone.connect({ audio: true, video: true });
108 |
109 | Wazo.Phone.on(Wazo.Phone.ON_CALL_INCOMING, callSession => {
110 | setupCallSession(callSession);
111 | currentSession = callSession;
112 | dispatch({ ringing: true });
113 |
114 | // Tell callkeep that we a call is incoming for audio calls
115 | const { number } = callSession;
116 | RNCallKeep.displayIncomingCall(getCurrentCallId(), number, number, 'number', true);
117 | });
118 | };
119 |
120 | const initializeCallKeep = async () => {
121 | try {
122 | RNCallKeep.setup({
123 | ios: {
124 | appName: 'WazoReactNativeDemo',
125 | },
126 | android: {
127 | alertTitle: 'Permissions required',
128 | alertDescription: 'This application needs to access your phone accounts',
129 | cancelButton: 'Cancel',
130 | okButton: 'ok',
131 | }
132 | });
133 | RNCallKeep.setAvailable(true);
134 | } catch (err) {
135 | console.error('initializeCallKeep error:', err.message);
136 | }
137 |
138 | // Add RNCallKit Events
139 | RNCallKeep.addEventListener('didReceiveStartCallAction', onNativeCall);
140 | RNCallKeep.addEventListener('answerCall', onAnswerCallAction);
141 | RNCallKeep.addEventListener('endCall', onEndCallAction);
142 | RNCallKeep.addEventListener('didDisplayIncomingCall', onIncomingCallDisplayed);
143 | RNCallKeep.addEventListener('didPerformSetMutedCallAction', onToggleMute);
144 | RNCallKeep.addEventListener('didPerformDTMFAction', onDTMF);
145 | };
146 |
147 | const getLocalStream = () => mediaDevices.getUserMedia({
148 | audio: true,
149 | video: {
150 | mandatory: {
151 | minWidth: 500,
152 | minHeight: 300,
153 | minFrameRate: 30
154 | },
155 | facingMode: 'user',
156 | }
157 | });
158 |
159 | const displayLocalVideo = () => {
160 | getLocalStream().then((stream) => {
161 | dispatch({ localStreamURL: stream.toURL() });
162 | });
163 | };
164 |
165 | const setupCallSession = callSession => {
166 | currentSession = callSession;
167 |
168 | Wazo.Phone.on(Wazo.Phone.ON_CALL_FAILED, (response, cause) => {
169 | dispatch({ error: cause, ringing: false, inCall: false });
170 | });
171 |
172 | Wazo.Phone.on(Wazo.Phone.ON_CALL_ENDED, () => {
173 | onCallTerminated();
174 | });
175 |
176 | Wazo.Phone.on(Wazo.Phone.ON_CALL_ACCEPTED, () => {
177 | const session = Wazo.Phone.getCurrentSipSession();
178 | // Setup local stream
179 | if (callSession.cameraEnabled) {
180 | const { peerConnection } = session.sessionDescriptionHandler;
181 | localStream = peerConnection.getLocalStreams().find(stream => !!stream.getVideoTracks().length);
182 | remoteStream = peerConnection.getRemoteStreams().find(stream => !!stream.getVideoTracks().length);
183 |
184 | dispatch({
185 | localStreamURL: localStream ? localStream.toURL() : null,
186 | remoteStreamURL: remoteStream ? remoteStream.toURL() : null,
187 | });
188 |
189 | // On Android display the app when answering a video call
190 | if (!isIOS) {
191 | RNCallKeep.backToForeground();
192 | }
193 | }
194 | });
195 | };
196 |
197 | const call = async (number, video = false) => {
198 | const session = await Wazo.Phone.call(number, video);
199 | setupCallSession(session);
200 |
201 | dispatch({ inCall: true, ringing: false });
202 |
203 | RNCallKeep.startCall(getCurrentCallId(), number, number, 'number', video);
204 | };
205 |
206 | const answer = withVideo => {
207 | dispatch({ inCall: true, ringing: false });
208 | RNCallKeep.setCurrentCallActive();
209 |
210 | Wazo.Phone.accept(currentSession, withVideo);
211 | };
212 |
213 | const hangup = async () => {
214 | const currentCallId = getCurrentCallId();
215 | if (!currentSession || !currentCallId) {
216 | return;
217 | }
218 |
219 | try {
220 | await Wazo.Phone.hangup(currentSession);
221 | } catch (e) {
222 | // Nothing to do
223 | }
224 |
225 | onCallTerminated();
226 | };
227 |
228 | const onCallTerminated = () => {
229 | if (currentCallId) {
230 | RNCallKeep.endCall(currentCallId);
231 | }
232 | dispatch({
233 | inCall: false,
234 | ringing: false,
235 | currentCallId: null,
236 | remoteStreamURL: null,
237 | localStreamURL: null,
238 | });
239 |
240 | if (remoteStream) {
241 | remoteStream.release();
242 | remoteStream = null;
243 | }
244 | if (localStream) {
245 | localStream.release();
246 | localStream = null;
247 | }
248 |
249 | currentCallId = null;
250 | currentSession = null;
251 |
252 | displayLocalVideo();
253 | };
254 |
255 | const onAnswerCallAction = ({ callUUID }) => {
256 | // called when the user answer the incoming call
257 | answer(true);
258 |
259 | RNCallKeep.setCurrentCallActive(callUUID);
260 |
261 | // On Android display the app when answering a video call
262 | if (!isIOS && currentSession.cameraEnabled) {
263 | RNCallKeep.backToForeground();
264 | }
265 | };
266 |
267 | const onIncomingCallDisplayed = ({ callUUID, handle, fromPushKit }) => {
268 | // Incoming call displayed (used for pushkit on iOS)
269 | };
270 |
271 | const onNativeCall = ({ handle }) => {
272 | // _onOutGoingCall on android is also called when making a call from the app
273 | // so we have to check in order to not making 2 calls
274 | if (inCall) {
275 | return;
276 | }
277 | // Called when performing call from native Contact app
278 | call(handle);
279 | };
280 |
281 | const toggleHold = () => {
282 | Wazo.Phone[held ? 'unhold' : 'hold'](currentSession);
283 | dispatch({ held: !held });
284 | };
285 |
286 | const toggleVideoHold = () => {
287 | Wazo.Phone[videoHeld ? 'turnCameraOn' : 'turnCameraOff'](currentSession);
288 | dispatch({ videoHeld: !videoHeld });
289 | };
290 |
291 | const onEndCallAction = ({ callUUID }) => {
292 | hangup();
293 | };
294 |
295 | const onToggleMute = (muted) => {
296 | // Called when the system or the user mutes a call
297 | Wazo.Phone[muted ? 'mute' : 'unmute'](currentSession);
298 | };
299 |
300 | const onDTMF = (action) => {
301 | console.log('onDTMF', action);
302 | };
303 |
304 | const logout = async () => {
305 | if (currentSession) {
306 | await hangup();
307 | }
308 | Wazo.Auth.logout();
309 | await AsyncStorage.removeItem('token');
310 |
311 | onLogout();
312 | };
313 |
314 | useEffect(() => {
315 | init();
316 | }, []);
317 |
318 | const isVideo = currentSession && currentSession.cameraEnabled;
319 |
320 | return (
321 |
322 | {!isIOS && localStreamURL && ()}
323 |
324 | {remoteStreamURL && }
325 |
326 |
327 |
337 |
338 | {!ringing && !inCall && (
339 |
340 |
343 |
346 |
347 | )}
348 | {ringing && (
349 |
350 |
355 |
360 |
361 | )}
362 |
363 | {inCall && (
364 |
365 |
368 |
371 | {isVideo && (
372 |
375 | )}
376 |
377 | )}
378 |
379 | {isIOS && localStreamURL && ()}
380 |
385 |
386 | );
387 | };
388 |
389 | export default Dialer;
390 |
--------------------------------------------------------------------------------
/src/Login.js:
--------------------------------------------------------------------------------
1 | import React, { useState, useEffect } from 'react';
2 | import { StyleSheet, Image, View, Platform } from 'react-native';
3 | import { requestNotifications, request, PERMISSIONS } from 'react-native-permissions';
4 | import { Container, Text, Content, Form, Item, Input, Label, Button, Spinner, Footer } from 'native-base';
5 | import Wazo from '@wazo/sdk/lib/simple';
6 | import AsyncStorage from '@react-native-community/async-storage';
7 | import VoipPushNotification from "react-native-voip-push-notification";
8 | import getApiClient from "@wazo/sdk/lib/service/getApiClient";
9 |
10 | const isIOS = Platform.OS === 'ios';
11 |
12 | const styles = StyleSheet.create({
13 | container: {
14 | paddingTop: 50,
15 | },
16 | logoContainer: {
17 | textAlign: 'center',
18 | alignItems: 'center',
19 | },
20 | logo: {
21 | width: 200,
22 | height: 200,
23 | flex: 1,
24 | },
25 | button: {
26 | flex: 1,
27 | width: '100%',
28 | position: 'absolute',
29 | bottom: 0,
30 | },
31 | footer: {
32 | borderColor: 'transparent',
33 | backgroundColor: 'transparent',
34 | },
35 | error: {
36 | marginTop: 10,
37 | textAlign: 'center',
38 | color: '#fc3503',
39 | },
40 | });
41 |
42 | const Login = ({ defaultUsername = '', defaultPassword = '', defaultServer = '', onLogin = () => {} }) => {
43 | const [username, setUsername] = useState(defaultUsername);
44 | const [password, setPassword] = useState(defaultPassword);
45 | const [server, setServer] = useState(defaultServer);
46 | const [error, setError] = useState(null);
47 | const [authenticating, setAuthenticating] = useState(false);
48 | let apnsToken;
49 |
50 | useEffect(() => {
51 | init();
52 | }, []);
53 |
54 | const init = async () => {
55 | await requestNotifications(['alert', 'sound']);
56 |
57 | if (isIOS) {
58 | await request( PERMISSIONS.IOS.MICROPHONE);
59 | await request( PERMISSIONS.IOS.CAMERA);
60 | VoipPushNotification.requestPermissions();
61 | VoipPushNotification.addEventListener('register', async (token) => {
62 | apnsToken = token;
63 | console.log('setting apnsToken', apnsToken);
64 | });
65 | } else {
66 | await request(PERMISSIONS.ANDROID.READ_PHONE_STATE);
67 | await request(PERMISSIONS.ANDROID.CALL_PHONE);
68 | await request(PERMISSIONS.ANDROID.RECORD_AUDIO);
69 | await request(PERMISSIONS.ANDROID.CAMERA);
70 | }
71 |
72 | authenticateFromToken();
73 | };
74 |
75 | const authenticateFromToken = async () => {
76 | const host = await AsyncStorage.getItem('host');
77 | const token = await AsyncStorage.getItem('token');
78 | if (host) {
79 | setServer(host);
80 | }
81 | if (!host || !token) {
82 | return;
83 | }
84 |
85 | setAuthenticating(true);
86 | setError(null);
87 | Wazo.Auth.init();
88 | Wazo.Auth.setHost(host);
89 |
90 | const session = await Wazo.Auth.validateToken(token);
91 | if (session) {
92 | return authenticationSuccess(session, host);
93 | }
94 |
95 | setAuthenticating(false);
96 | };
97 |
98 | const login = async () => {
99 | setAuthenticating(true);
100 | setError(null);
101 | Wazo.Auth.init();
102 | Wazo.Auth.setHost(server);
103 |
104 | let session;
105 |
106 | try {
107 | session = await Wazo.Auth.logIn(username, password);
108 | authenticationSuccess(session, server);
109 | } catch (e) {
110 | setError('Authentication failed');
111 | setAuthenticating(false);
112 | }
113 | };
114 |
115 | const authenticationSuccess = async (session, host) => {
116 | await AsyncStorage.setItem('host', host);
117 | await AsyncStorage.setItem('token', session.token);
118 |
119 | if (apnsToken) {
120 | try {
121 | await getApiClient().auth.removeDeviceToken(session.uuid);
122 | } catch (_) {
123 | // Avoid to fail when trying to remove a non-existent token
124 | }
125 | await getApiClient().auth.sendDeviceToken(session.session, null, apnsToken);
126 | }
127 |
128 | // Store information when authenticating from token
129 | Wazo.Auth.setHost(host);
130 |
131 | setAuthenticating(false);
132 | onLogin(session);
133 | };
134 |
135 | return (
136 |
137 |
138 |
139 |
143 |
144 |
145 |
179 |
180 | {authenticating && }
181 | {!!error && {error}}
182 |
183 |
184 |
189 |
190 | );
191 | };
192 |
193 | export default Login;
194 |
--------------------------------------------------------------------------------
/src/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wazo-platform/wazo-react-native-demo/9e094cceea44646bbf0eca0636bfa02917c0fe4c/src/logo.png
--------------------------------------------------------------------------------