= (props) => {
25 | const {
26 | label,
27 | color = COLOR,
28 | disabled = false,
29 | bold,
30 | onPress,
31 | style,
32 | ...nodeProps
33 | } = props;
34 | const fontWeight = bold ? "600" : "normal";
35 | const { styles } = useTheme(buildStyles);
36 |
37 | return (
38 |
43 |
47 | {label}
48 |
49 |
50 | );
51 | };
52 |
53 | DialogButton.displayName = "DialogButton";
54 |
55 | const buildStyles: StyleBuilder = (isDark) =>
56 | StyleSheet.create({
57 | button: Platform.select({
58 | ios: {
59 | flexGrow: 1,
60 | flexShrink: 1,
61 | height: 46,
62 | justifyContent: "center",
63 | alignItems: "center",
64 | },
65 | android: {
66 | justifyContent: "center",
67 | alignItems: "center",
68 | },
69 | web: {
70 | justifyContent: "center",
71 | alignItems: "center",
72 | },
73 | default: {},
74 | }),
75 | text: Platform.select({
76 | ios: {
77 | color: PlatformColor("link"),
78 | textAlign: "center",
79 | fontSize: 17,
80 | backgroundColor: "transparent",
81 | },
82 | android: {
83 | color: PlatformColor(
84 | `@android:color/${isDark ? "link_text_dark" : "link_text_dark_light"}`
85 | ),
86 | textAlign: "center",
87 | backgroundColor: "transparent",
88 | padding: 8,
89 | fontSize: 14,
90 | textTransform: "uppercase",
91 | },
92 | web: {
93 | textAlign: "center",
94 | backgroundColor: "transparent",
95 | padding: 8,
96 | fontSize: 14,
97 | textTransform: "uppercase",
98 | },
99 | default: {},
100 | }),
101 | });
102 |
103 | export default DialogButton;
104 |
--------------------------------------------------------------------------------
/example/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 |
20 |
21 |
22 |
23 |
24 |
32 |
33 |
34 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/example/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34 |
35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37 |
38 | @rem Find java.exe
39 | if defined JAVA_HOME goto findJavaFromJavaHome
40 |
41 | set JAVA_EXE=java.exe
42 | %JAVA_EXE% -version >NUL 2>&1
43 | if "%ERRORLEVEL%" == "0" goto init
44 |
45 | echo.
46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47 | echo.
48 | echo Please set the JAVA_HOME variable in your environment to match the
49 | echo location of your Java installation.
50 |
51 | goto fail
52 |
53 | :findJavaFromJavaHome
54 | set JAVA_HOME=%JAVA_HOME:"=%
55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56 |
57 | if exist "%JAVA_EXE%" goto init
58 |
59 | echo.
60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61 | echo.
62 | echo Please set the JAVA_HOME variable in your environment to match the
63 | echo location of your Java installation.
64 |
65 | goto fail
66 |
67 | :init
68 | @rem Get command-line arguments, handling Windows variants
69 |
70 | if not "%OS%" == "Windows_NT" goto win9xME_args
71 |
72 | :win9xME_args
73 | @rem Slurp the command line arguments.
74 | set CMD_LINE_ARGS=
75 | set _SKIP=2
76 |
77 | :win9xME_args_slurp
78 | if "x%~1" == "x" goto execute
79 |
80 | set CMD_LINE_ARGS=%*
81 |
82 | :execute
83 | @rem Setup the command line
84 |
85 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
86 |
87 | @rem Execute Gradle
88 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
89 |
90 | :end
91 | @rem End local scope for the variables with windows NT shell
92 | if "%ERRORLEVEL%"=="0" goto mainEnd
93 |
94 | :fail
95 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
96 | rem the _cmd.exe /c_ return code!
97 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
98 | exit /b 1
99 |
100 | :mainEnd
101 | if "%OS%"=="Windows_NT" endlocal
102 |
103 | :omega
104 |
--------------------------------------------------------------------------------
/example/android/app/src/debug/java/com/example/ReactNativeFlipper.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Facebook, Inc. and its affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the LICENSE file in the root
5 | * directory of this source tree.
6 | */
7 | package com.example;
8 |
9 | import android.content.Context;
10 | import com.facebook.flipper.android.AndroidFlipperClient;
11 | import com.facebook.flipper.android.utils.FlipperUtils;
12 | import com.facebook.flipper.core.FlipperClient;
13 | import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
14 | import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
15 | import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
16 | import com.facebook.flipper.plugins.inspector.DescriptorMapping;
17 | import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
18 | import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
19 | import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
20 | import com.facebook.flipper.plugins.react.ReactFlipperPlugin;
21 | import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
22 | import com.facebook.react.ReactInstanceManager;
23 | import com.facebook.react.bridge.ReactContext;
24 | import com.facebook.react.modules.network.NetworkingModule;
25 | import okhttp3.OkHttpClient;
26 |
27 | public class ReactNativeFlipper {
28 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
29 | if (FlipperUtils.shouldEnableFlipper(context)) {
30 | final FlipperClient client = AndroidFlipperClient.getInstance(context);
31 | client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
32 | client.addPlugin(new ReactFlipperPlugin());
33 | client.addPlugin(new DatabasesFlipperPlugin(context));
34 | client.addPlugin(new SharedPreferencesFlipperPlugin(context));
35 | client.addPlugin(CrashReporterPlugin.getInstance());
36 | NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
37 | NetworkingModule.setCustomClientBuilder(
38 | new NetworkingModule.CustomClientBuilder() {
39 | @Override
40 | public void apply(OkHttpClient.Builder builder) {
41 | builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
42 | }
43 | });
44 | client.addPlugin(networkFlipperPlugin);
45 | client.start();
46 | // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
47 | // Hence we run if after all native modules have been initialized
48 | ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
49 | if (reactContext == null) {
50 | reactInstanceManager.addReactInstanceEventListener(
51 | new ReactInstanceManager.ReactInstanceEventListener() {
52 | @Override
53 | public void onReactContextInitialized(ReactContext reactContext) {
54 | reactInstanceManager.removeReactInstanceEventListener(this);
55 | reactContext.runOnNativeModulesQueueThread(
56 | new Runnable() {
57 | @Override
58 | public void run() {
59 | client.addPlugin(new FrescoFlipperPlugin());
60 | }
61 | });
62 | }
63 | });
64 | } else {
65 | client.addPlugin(new FrescoFlipperPlugin());
66 | }
67 | }
68 | }
69 | }
--------------------------------------------------------------------------------
/src/Input.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 | import { LegacyRef, ReactNode } from "react";
3 | import {
4 | Platform,
5 | StyleSheet,
6 | Text,
7 | TextInput,
8 | View,
9 | PlatformColor,
10 | TextInputProps,
11 | TextStyle,
12 | ViewStyle,
13 | StyleProp,
14 | } from "react-native";
15 | import useTheme, { StyleBuilder } from "./useTheme";
16 |
17 | export interface DialogInputProps extends TextInputProps {
18 | label?: ReactNode;
19 | wrapperStyle?: StyleProp;
20 | textInputRef?: LegacyRef;
21 | unstableLabelStyle?: StyleProp;
22 | }
23 |
24 | const DialogInput: React.FC = (props) => {
25 | const {
26 | label,
27 | style,
28 | wrapperStyle,
29 | textInputRef,
30 | multiline,
31 | numberOfLines,
32 | unstableLabelStyle,
33 | ...nodeProps
34 | } = props;
35 | const lines = (multiline && numberOfLines) || 1;
36 | const height =
37 | 18 + Platform.select({ ios: 14, android: 22, default: 0 }) * lines;
38 | const { styles, isDark } = useTheme(buildStyles);
39 | return (
40 |
41 | {label && {label}}
42 |
63 |
64 | );
65 | };
66 |
67 | DialogInput.displayName = "DialogInput";
68 |
69 | const buildStyles: StyleBuilder = (isDark) =>
70 | StyleSheet.create({
71 | textInputWrapper: Platform.select({
72 | ios: {
73 | backgroundColor: PlatformColor("systemGray5"),
74 | borderWidth: StyleSheet.hairlineWidth,
75 | borderRadius: 6,
76 | borderColor: PlatformColor("separator"),
77 | marginHorizontal: 20,
78 | marginBottom: 20,
79 | paddingHorizontal: 8,
80 | },
81 | android: {
82 | marginHorizontal: 10,
83 | marginBottom: 20,
84 | },
85 | default: {},
86 | }),
87 | label: Platform.select({
88 | ios: {
89 | color: PlatformColor("label"),
90 | },
91 | android: {
92 | color: PlatformColor(
93 | `@android:color/${
94 | isDark ? "primary_text_dark" : "primary_text_light"
95 | }`
96 | ),
97 | fontSize: 14,
98 | },
99 | default: {},
100 | }),
101 | textInput: Platform.select({
102 | ios: {
103 | color: PlatformColor("label"),
104 | },
105 | android: {
106 | color: PlatformColor(
107 | `@android:color/${
108 | isDark ? "primary_text_dark" : "primary_text_light"
109 | }`
110 | ),
111 | marginLeft: -4,
112 | paddingLeft: 4,
113 | },
114 | default: {},
115 | }),
116 | });
117 |
118 | export default DialogInput;
119 |
--------------------------------------------------------------------------------
/example/ios/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
53 |
55 |
61 |
62 |
63 |
64 |
70 |
72 |
78 |
79 |
80 |
81 |
83 |
84 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/example/ios/example/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 |
--------------------------------------------------------------------------------
/example/ios/example/AppDelegate.m:
--------------------------------------------------------------------------------
1 | #import "AppDelegate.h"
2 |
3 | #import
4 | #import
5 | #import
6 |
7 | #import
8 | #import
9 | #import
10 | #import
11 | #import
12 |
13 | #ifdef FB_SONARKIT_ENABLED
14 | #import
15 | #import
16 | #import
17 | #import
18 | #import
19 | #import
20 |
21 | static void InitializeFlipper(UIApplication *application) {
22 | FlipperClient *client = [FlipperClient sharedClient];
23 | SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults];
24 | [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]];
25 | [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]];
26 | [client addPlugin:[FlipperKitReactPlugin new]];
27 | [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
28 | [client start];
29 | }
30 | #endif
31 |
32 | @interface AppDelegate ()
33 |
34 | @property (nonatomic, strong) UMModuleRegistryAdapter *moduleRegistryAdapter;
35 | @property (nonatomic, strong) NSDictionary *launchOptions;
36 |
37 | @end
38 |
39 | @implementation AppDelegate
40 |
41 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
42 | {
43 | #ifdef FB_SONARKIT_ENABLED
44 | InitializeFlipper(application);
45 | #endif
46 |
47 | self.moduleRegistryAdapter = [[UMModuleRegistryAdapter alloc] initWithModuleRegistryProvider:[[UMModuleRegistryProvider alloc] init]];
48 | self.launchOptions = launchOptions;
49 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
50 | #ifdef DEBUG
51 | [self initializeReactNativeApp];
52 | #else
53 | EXUpdatesAppController *controller = [EXUpdatesAppController sharedInstance];
54 | controller.delegate = self;
55 | [controller startAndShowLaunchScreen:self.window];
56 | #endif
57 |
58 | [super application:application didFinishLaunchingWithOptions:launchOptions];
59 |
60 | return YES;
61 | }
62 |
63 | - (RCTBridge *)initializeReactNativeApp
64 | {
65 | RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:self.launchOptions];
66 | RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@"main" initialProperties:nil];
67 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
68 |
69 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
70 | UIViewController *rootViewController = [UIViewController new];
71 | rootViewController.view = rootView;
72 | self.window.rootViewController = rootViewController;
73 | [self.window makeKeyAndVisible];
74 |
75 | return bridge;
76 | }
77 |
78 | - (NSArray> *)extraModulesForBridge:(RCTBridge *)bridge
79 | {
80 | NSArray> *extraModules = [_moduleRegistryAdapter extraModulesForBridge:bridge];
81 | // If you'd like to export some custom RCTBridgeModules that are not Expo modules, add them here!
82 | return extraModules;
83 | }
84 |
85 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge {
86 | #ifdef DEBUG
87 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
88 | #else
89 | return [[EXUpdatesAppController sharedInstance] launchAssetUrl];
90 | #endif
91 | }
92 |
93 | - (void)appController:(EXUpdatesAppController *)appController didStartWithSuccess:(BOOL)success {
94 | appController.bridge = [self initializeReactNativeApp];
95 | EXSplashScreenService *splashScreenService = (EXSplashScreenService *)[UMModuleRegistryProvider getSingletonModuleForClass:[EXSplashScreenService class]];
96 | [splashScreenService showSplashScreenFor:self.window.rootViewController];
97 | }
98 |
99 | @end
100 |
--------------------------------------------------------------------------------
/example/android/app/src/main/java/com/example/MainApplication.java:
--------------------------------------------------------------------------------
1 | package com.example;
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.ReactInstanceManager;
10 | import com.facebook.react.ReactNativeHost;
11 | import com.facebook.react.ReactPackage;
12 | import com.facebook.react.shell.MainReactPackage;
13 | import com.facebook.soloader.SoLoader;
14 | import com.example.generated.BasePackageList;
15 |
16 | import org.unimodules.adapters.react.ReactAdapterPackage;
17 | import org.unimodules.adapters.react.ModuleRegistryAdapter;
18 | import org.unimodules.adapters.react.ReactModuleRegistryProvider;
19 | import org.unimodules.core.interfaces.Package;
20 | import org.unimodules.core.interfaces.SingletonModule;
21 | import expo.modules.constants.ConstantsPackage;
22 | import expo.modules.permissions.PermissionsPackage;
23 | import expo.modules.filesystem.FileSystemPackage;
24 | import expo.modules.updates.UpdatesController;
25 |
26 | import java.lang.reflect.InvocationTargetException;
27 | import java.util.Arrays;
28 | import java.util.List;
29 | import javax.annotation.Nullable;
30 |
31 | public class MainApplication extends Application implements ReactApplication {
32 | private final ReactModuleRegistryProvider mModuleRegistryProvider = new ReactModuleRegistryProvider(
33 | new BasePackageList().getPackageList()
34 | );
35 |
36 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
37 | @Override
38 | public boolean getUseDeveloperSupport() {
39 | return BuildConfig.DEBUG;
40 | }
41 |
42 | @Override
43 | protected List getPackages() {
44 | List packages = new PackageList(this).getPackages();
45 | packages.add(new ModuleRegistryAdapter(mModuleRegistryProvider));
46 | return packages;
47 | }
48 |
49 | @Override
50 | protected String getJSMainModuleName() {
51 | return "index";
52 | }
53 |
54 | @Override
55 | protected @Nullable String getJSBundleFile() {
56 | if (BuildConfig.DEBUG) {
57 | return super.getJSBundleFile();
58 | } else {
59 | return UpdatesController.getInstance().getLaunchAssetFile();
60 | }
61 | }
62 |
63 | @Override
64 | protected @Nullable String getBundleAssetName() {
65 | if (BuildConfig.DEBUG) {
66 | return super.getBundleAssetName();
67 | } else {
68 | return UpdatesController.getInstance().getBundleAssetName();
69 | }
70 | }
71 | };
72 |
73 | @Override
74 | public ReactNativeHost getReactNativeHost() {
75 | return mReactNativeHost;
76 | }
77 |
78 | @Override
79 | public void onCreate() {
80 | super.onCreate();
81 | SoLoader.init(this, /* native exopackage */ false);
82 |
83 | if (!BuildConfig.DEBUG) {
84 | UpdatesController.initialize(this);
85 | }
86 |
87 | initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
88 | }
89 |
90 | /**
91 | * Loads Flipper in React Native templates. Call this in the onCreate method with something like
92 | * initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
93 | *
94 | * @param context
95 | * @param reactInstanceManager
96 | */
97 | private static void initializeFlipper(
98 | Context context, ReactInstanceManager reactInstanceManager) {
99 | if (BuildConfig.DEBUG) {
100 | try {
101 | /*
102 | We use reflection here to pick up the class that initializes Flipper,
103 | since Flipper library is not available in release mode
104 | */
105 | Class> aClass = Class.forName("com.rndiffapp.ReactNativeFlipper");
106 | aClass
107 | .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
108 | .invoke(null, context, reactInstanceManager);
109 | } catch (ClassNotFoundException e) {
110 | e.printStackTrace();
111 | } catch (NoSuchMethodException e) {
112 | e.printStackTrace();
113 | } catch (IllegalAccessException e) {
114 | e.printStackTrace();
115 | } catch (InvocationTargetException e) {
116 | e.printStackTrace();
117 | }
118 | }
119 | }
120 | }
121 |
--------------------------------------------------------------------------------
/example/ios/example/SplashScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
31 |
39 |
40 |
41 |
42 |
53 |
54 |
55 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/src/CodeInput.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 | import {
3 | Platform,
4 | StyleSheet,
5 | Text,
6 | TextInput,
7 | View,
8 | Pressable,
9 | PlatformColor,
10 | TextInputProps,
11 | ViewStyle,
12 | StyleProp,
13 | TextStyle,
14 | } from "react-native";
15 | import useTheme from "./useTheme";
16 |
17 | export interface DialogCodeInputProps extends TextInputProps {
18 | autoFocus?: boolean; // TODO: Why do we need to add this to fix TS2339? It should already be included in TextInputProps.
19 | style?: StyleProp;
20 | wrapperStyle?: StyleProp;
21 | digitContainerStyle?: StyleProp;
22 | digitContainerFocusedStyle?: StyleProp;
23 | digitStyle?: StyleProp;
24 | codeLength?: number;
25 | onCodeChange?: (code: string) => void;
26 | }
27 |
28 | const DialogCodeInput: React.FC = (props) => {
29 | const {
30 | autoFocus = false,
31 | style,
32 | wrapperStyle,
33 | digitContainerStyle,
34 | digitContainerFocusedStyle,
35 | digitStyle,
36 | codeLength = 4,
37 | onCodeChange,
38 | ...nodeProps
39 | } = props;
40 | const { styles } = useTheme(buildStyles);
41 | const codeRef = React.useRef(null);
42 | const [containerIsFocused, setContainerIsFocused] = React.useState(autoFocus);
43 | const [code, setCode] = React.useState("");
44 | const codeDigitsArray = new Array(codeLength).fill(0);
45 | const emptyInputChar = " ";
46 | const handleContainerPress = () => {
47 | setContainerIsFocused(true);
48 | codeRef?.current?.focus();
49 | };
50 | const onCodeChangePress = (t: string) => {
51 | setCode(t);
52 | typeof onCodeChange === "function" && onCodeChange(t);
53 | if (t.length === codeLength) {
54 | setContainerIsFocused(false);
55 | codeRef?.current?.blur();
56 | }
57 | };
58 | const handleOnBlur = () => setContainerIsFocused(false);
59 | const toDigitInput = (_value: number, idx: number) => {
60 | const digit = code[idx] || emptyInputChar;
61 |
62 | const isCurrentDigit = idx === code.length;
63 | const isLastDigit = idx === codeLength - 1;
64 | const isCodeFull = code.length === codeLength;
65 |
66 | const isFocused = isCurrentDigit || (isLastDigit && isCodeFull);
67 |
68 | const containerStyle =
69 | containerIsFocused && isFocused
70 | ? [
71 | styles.inputContainer,
72 | digitContainerStyle,
73 | styles.inputContainerFocused,
74 | digitContainerFocusedStyle,
75 | ]
76 | : [styles.inputContainer, digitContainerStyle];
77 |
78 | return (
79 |
80 | {digit}
81 |
82 | );
83 | };
84 | return (
85 |
86 |
90 | {codeDigitsArray.map(toDigitInput)}
91 |
92 |
103 |
104 | );
105 | };
106 | DialogCodeInput.displayName = "DialogCodeInput";
107 |
108 | const buildStyles = (isDark: boolean) =>
109 | StyleSheet.create({
110 | codeContainer: {
111 | width: "90%",
112 | flexDirection: "row",
113 | alignSelf: "center",
114 | justifyContent: "space-between",
115 | marginBottom: 20,
116 | },
117 | inputContainer: {
118 | flex: 1,
119 | borderColor: PlatformColor("separator"),
120 | borderBottomWidth: 3,
121 | paddingBottom: 5,
122 | marginHorizontal: 5,
123 | alignItems: "center",
124 | ...Platform.select({
125 | ios: {
126 | borderColor: PlatformColor("separator"),
127 | },
128 | android: {
129 | //borderColor: PlatformColor(`@android:color/${isDark ? "secondary_text_dark" : "secondary_text_light"}`),
130 | borderColor: isDark ? "#efefef" : "#8d8d8d",
131 | },
132 | default: {},
133 | }),
134 | },
135 | inputContainerFocused: Platform.select({
136 | ios: {
137 | borderColor: PlatformColor("label"),
138 | },
139 | android: {
140 | /* borderColor: PlatformColor(
141 | `@android:color/${
142 | isDark ? "primary_text_dark" : "primary_text_light"
143 | }`
144 | ),*/
145 | borderColor: isDark ? "#58c7b9" : "#169689",
146 | },
147 | default: {},
148 | }),
149 | inputText: Platform.select({
150 | ios: {
151 | fontSize: 20,
152 | color: PlatformColor("label"),
153 | },
154 | android: {
155 | color: PlatformColor(
156 | `@android:color/${
157 | isDark ? "primary_text_dark" : "primary_text_light"
158 | }`
159 | ),
160 | fontSize: 20,
161 | },
162 | default: {},
163 | }),
164 | label: Platform.select({
165 | ios: {
166 | color: PlatformColor("label"),
167 | },
168 | android: {
169 | color: PlatformColor(
170 | `@android:color/${
171 | isDark ? "primary_text_dark" : "primary_text_light"
172 | }`
173 | ),
174 | fontSize: 14,
175 | },
176 | default: {},
177 | }),
178 | hiddenInput: {
179 | position: "absolute",
180 | height: 0,
181 | width: 0,
182 | opacity: 0,
183 | },
184 | });
185 |
186 | export default DialogCodeInput;
187 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | /* Basic Options */
4 | // "incremental": true, /* Enable incremental compilation */
5 | "target": "es2017", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
6 | "module": "esnext", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
7 | "lib": ["es2017"], /* Specify library files to be included in the compilation. */
8 | // "allowJs": true, /* Allow javascript files to be compiled. */
9 | // "checkJs": true, /* Report errors in .js files. */
10 | // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
11 | "declaration": true, /* Generates corresponding '.d.ts' file. */
12 | // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
13 | // "sourceMap": true, /* Generates corresponding '.map' file. */
14 | // "outFile": "./", /* Concatenate and emit output to single file. */
15 | "outDir": "./lib", /* Redirect output structure to the directory. */
16 | // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
17 | // "composite": true, /* Enable project compilation */
18 | // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
19 | // "removeComments": true, /* Do not emit comments to output. */
20 | // "noEmit": true, /* Do not emit outputs. */
21 | // "importHelpers": true, /* Import emit helpers from 'tslib'. */
22 | // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
23 | // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
24 |
25 | /* Strict Type-Checking Options */
26 | "strict": true, /* Enable all strict type-checking options. */
27 | // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
28 | // "strictNullChecks": true, /* Enable strict null checks. */
29 | // "strictFunctionTypes": true, /* Enable strict checking of function types. */
30 | // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
31 | // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
32 | // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
33 | // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
34 |
35 | /* Additional Checks */
36 | // "noUnusedLocals": true, /* Report errors on unused locals. */
37 | // "noUnusedParameters": true, /* Report errors on unused parameters. */
38 | // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
39 | // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
40 |
41 | /* Module Resolution Options */
42 | "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
43 | // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
44 | // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
45 | // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
46 | // "typeRoots": [], /* List of folders to include type definitions from. */
47 | // "types": [], /* Type declaration files to be included in compilation. */
48 | // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
49 | "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
50 | // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
51 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
52 |
53 | /* Source Map Options */
54 | // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
55 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
56 | // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
57 | // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
58 |
59 | /* Experimental Options */
60 | // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
61 | // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
62 |
63 | /* Advanced Options */
64 | "forceConsistentCasingInFileNames": true,
65 | /* Disallow inconsistently-cased references to the same file. */
66 | "jsx": "react"
67 | },
68 | "include": ["src"],
69 | "exclude": ["node_modules"]
70 | }
71 |
--------------------------------------------------------------------------------
/example/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | #
4 | # Copyright 2015 the original author or authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # https://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | ##
21 | ## Gradle start up script for UN*X
22 | ##
23 | ##############################################################################
24 |
25 | # Attempt to set APP_HOME
26 | # Resolve links: $0 may be a link
27 | PRG="$0"
28 | # Need this for relative symlinks.
29 | while [ -h "$PRG" ] ; do
30 | ls=`ls -ld "$PRG"`
31 | link=`expr "$ls" : '.*-> \(.*\)$'`
32 | if expr "$link" : '/.*' > /dev/null; then
33 | PRG="$link"
34 | else
35 | PRG=`dirname "$PRG"`"/$link"
36 | fi
37 | done
38 | SAVED="`pwd`"
39 | cd "`dirname \"$PRG\"`/" >/dev/null
40 | APP_HOME="`pwd -P`"
41 | cd "$SAVED" >/dev/null
42 |
43 | APP_NAME="Gradle"
44 | APP_BASE_NAME=`basename "$0"`
45 |
46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48 |
49 | # Use the maximum available, or set MAX_FD != -1 to use that value.
50 | MAX_FD="maximum"
51 |
52 | warn () {
53 | echo "$*"
54 | }
55 |
56 | die () {
57 | echo
58 | echo "$*"
59 | echo
60 | exit 1
61 | }
62 |
63 | # OS specific support (must be 'true' or 'false').
64 | cygwin=false
65 | msys=false
66 | darwin=false
67 | nonstop=false
68 | case "`uname`" in
69 | CYGWIN* )
70 | cygwin=true
71 | ;;
72 | Darwin* )
73 | darwin=true
74 | ;;
75 | MINGW* )
76 | msys=true
77 | ;;
78 | NONSTOP* )
79 | nonstop=true
80 | ;;
81 | esac
82 |
83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84 |
85 | # Determine the Java command to use to start the JVM.
86 | if [ -n "$JAVA_HOME" ] ; then
87 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
88 | # IBM's JDK on AIX uses strange locations for the executables
89 | JAVACMD="$JAVA_HOME/jre/sh/java"
90 | else
91 | JAVACMD="$JAVA_HOME/bin/java"
92 | fi
93 | if [ ! -x "$JAVACMD" ] ; then
94 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
95 |
96 | Please set the JAVA_HOME variable in your environment to match the
97 | location of your Java installation."
98 | fi
99 | else
100 | JAVACMD="java"
101 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
102 |
103 | Please set the JAVA_HOME variable in your environment to match the
104 | location of your Java installation."
105 | fi
106 |
107 | # Increase the maximum file descriptors if we can.
108 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
109 | MAX_FD_LIMIT=`ulimit -H -n`
110 | if [ $? -eq 0 ] ; then
111 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
112 | MAX_FD="$MAX_FD_LIMIT"
113 | fi
114 | ulimit -n $MAX_FD
115 | if [ $? -ne 0 ] ; then
116 | warn "Could not set maximum file descriptor limit: $MAX_FD"
117 | fi
118 | else
119 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
120 | fi
121 | fi
122 |
123 | # For Darwin, add options to specify how the application appears in the dock
124 | if $darwin; then
125 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
126 | fi
127 |
128 | # For Cygwin or MSYS, switch paths to Windows format before running java
129 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
130 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
131 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
132 | JAVACMD=`cygpath --unix "$JAVACMD"`
133 |
134 | # We build the pattern for arguments to be converted via cygpath
135 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
136 | SEP=""
137 | for dir in $ROOTDIRSRAW ; do
138 | ROOTDIRS="$ROOTDIRS$SEP$dir"
139 | SEP="|"
140 | done
141 | OURCYGPATTERN="(^($ROOTDIRS))"
142 | # Add a user-defined pattern to the cygpath arguments
143 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
144 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
145 | fi
146 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
147 | i=0
148 | for arg in "$@" ; do
149 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
150 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
151 |
152 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
153 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
154 | else
155 | eval `echo args$i`="\"$arg\""
156 | fi
157 | i=`expr $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 | exec "$JAVACMD" "$@"
184 |
--------------------------------------------------------------------------------
/src/Modal.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 | import { Component } from "react";
3 | import {
4 | Animated,
5 | Easing,
6 | Modal as ReactNativeModal,
7 | ModalProps as ReactNativeModalProps,
8 | Platform,
9 | StyleProp,
10 | StyleSheet,
11 | TouchableWithoutFeedback,
12 | ViewStyle,
13 | } from "react-native";
14 |
15 | const MODAL_ANIM_DURATION = 300;
16 | const MODAL_BACKDROP_OPACITY = 0.3;
17 |
18 | const CONTENT_ANIMATION_IN = Platform.select({
19 | ios: {
20 | opacity: {
21 | inputRange: [0, 1],
22 | outputRange: [0, 1],
23 | },
24 | scale: {
25 | inputRange: [0, 0.5, 1],
26 | outputRange: [1.2, 1.1, 1],
27 | },
28 | },
29 | android: {
30 | opacity: {
31 | inputRange: [0, 0.5, 1],
32 | outputRange: [0, 1, 1],
33 | },
34 | scale: {
35 | inputRange: [0, 1],
36 | outputRange: [0.3, 1],
37 | },
38 | },
39 | default: {
40 | opacity: {
41 | inputRange: [0, 0.5, 1],
42 | outputRange: [0, 1, 1],
43 | },
44 | scale: {
45 | inputRange: [0, 1],
46 | outputRange: [0.3, 1],
47 | },
48 | },
49 | });
50 |
51 | const CONTENT_ANIMATION_OUT = Platform.select({
52 | default: {
53 | opacity: {
54 | inputRange: [0, 1],
55 | outputRange: [0, 1],
56 | },
57 | },
58 | });
59 |
60 | export interface ModalProps extends ReactNativeModalProps {
61 | onBackdropPress?: () => void;
62 | onHide?: () => void;
63 | visible?: boolean;
64 | contentStyle?: StyleProp;
65 | useNativeDriver?: boolean;
66 | }
67 |
68 | interface ModalState {
69 | visible: boolean;
70 | currentAnimation: "none" | "in" | "out";
71 | }
72 |
73 | export class Modal extends Component {
74 | static defaultProps: Partial = {
75 | onBackdropPress: () => null,
76 | onHide: () => null,
77 | visible: false,
78 | useNativeDriver: false,
79 | };
80 |
81 | state: ModalState = {
82 | visible: Boolean(this.props.visible),
83 | currentAnimation: "none",
84 | };
85 |
86 | animVal = new Animated.Value(0);
87 | _isMounted = false;
88 |
89 | componentDidMount() {
90 | this._isMounted = true;
91 | if (this.state.visible) {
92 | this.show();
93 | }
94 | }
95 |
96 | componentWillUnmount() {
97 | this._isMounted = false;
98 | }
99 |
100 | componentDidUpdate(prevProps: ModalProps) {
101 | if (this.props.visible && !prevProps.visible) {
102 | this.show();
103 | } else if (!this.props.visible && prevProps.visible) {
104 | this.hide();
105 | }
106 | }
107 |
108 | show = () => {
109 | this.setState({ visible: true, currentAnimation: "in" }, () => {
110 | Animated.timing(this.animVal, {
111 | easing: Easing.inOut(Easing.quad),
112 | useNativeDriver: Boolean(this.props.useNativeDriver),
113 | duration: MODAL_ANIM_DURATION,
114 | toValue: 1,
115 | }).start(() => {
116 | this.setState({ currentAnimation: "none" });
117 | });
118 | });
119 | };
120 |
121 | hide = () => {
122 | this.setState({ currentAnimation: "out" }, () => {
123 | Animated.timing(this.animVal, {
124 | easing: Easing.inOut(Easing.quad),
125 | useNativeDriver: Boolean(this.props.useNativeDriver),
126 | duration: MODAL_ANIM_DURATION,
127 | toValue: 0,
128 | }).start(() => {
129 | if (this._isMounted) {
130 | this.setState({ currentAnimation: "none" });
131 | this.setState({ visible: false }, this.props.onHide);
132 | }
133 | });
134 | });
135 | };
136 |
137 | render() {
138 | const {
139 | children,
140 | onBackdropPress,
141 | contentStyle,
142 | ...otherProps
143 | } = this.props;
144 | const { currentAnimation, visible } = this.state;
145 |
146 | const backdropAnimatedStyle = {
147 | opacity: this.animVal.interpolate({
148 | inputRange: [0, 1],
149 | outputRange: [0, MODAL_BACKDROP_OPACITY],
150 | }),
151 | };
152 |
153 | const contentAnimatedStyle =
154 | currentAnimation === "in"
155 | ? {
156 | opacity: this.animVal.interpolate({
157 | inputRange: CONTENT_ANIMATION_IN.opacity.inputRange,
158 | outputRange: CONTENT_ANIMATION_IN.opacity.outputRange,
159 | extrapolate: "clamp",
160 | }),
161 | transform: [
162 | {
163 | scale: this.animVal.interpolate({
164 | inputRange: CONTENT_ANIMATION_IN.scale.inputRange,
165 | outputRange: CONTENT_ANIMATION_IN.scale.outputRange,
166 | extrapolate: "clamp",
167 | }),
168 | },
169 | ],
170 | }
171 | : {
172 | opacity: this.animVal.interpolate({
173 | inputRange: CONTENT_ANIMATION_OUT.opacity.inputRange,
174 | outputRange: CONTENT_ANIMATION_OUT.opacity.outputRange,
175 | extrapolate: "clamp",
176 | }),
177 | };
178 |
179 | return (
180 |
186 |
187 |
188 |
189 | {visible && (
190 |
201 | {children}
202 |
203 | )}
204 |
205 | );
206 | }
207 | }
208 |
209 | const styles = StyleSheet.create({
210 | backdrop: {
211 | position: "absolute",
212 | top: 0,
213 | bottom: 0,
214 | left: 0,
215 | right: 0,
216 | backgroundColor: "black",
217 | opacity: 0,
218 | },
219 | content: {
220 | flex: 1,
221 | alignItems: "center",
222 | justifyContent: "center",
223 | },
224 | });
225 |
226 | export default Modal;
227 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # [9.3.0](https://github.com/mmazzarolo/react-native-dialog/compare/v9.2.2...v9.3.0) (2022-10-31)
2 |
3 |
4 | ### Features
5 |
6 | * Add unstableLabelStyle & fix switch statement comparison method ([#150](https://github.com/mmazzarolo/react-native-dialog/issues/150)) ([839915b](https://github.com/mmazzarolo/react-native-dialog/commit/839915bc546707526f3853d454fbe87b24d2cac3))
7 |
8 | ## [9.2.2](https://github.com/mmazzarolo/react-native-dialog/compare/v9.2.1...v9.2.2) (2022-06-09)
9 |
10 |
11 | ### Bug Fixes
12 |
13 | * remove usage of PropTypes ([#139](https://github.com/mmazzarolo/react-native-dialog/issues/139)) ([538ff00](https://github.com/mmazzarolo/react-native-dialog/commit/538ff007942145d1d9aa85a34d65afa25015db16))
14 |
15 | ## [9.2.1](https://github.com/mmazzarolo/react-native-dialog/compare/v9.2.0...v9.2.1) (2022-02-11)
16 |
17 |
18 | ### Bug Fixes
19 |
20 | * ios description platform color ([#133](https://github.com/mmazzarolo/react-native-dialog/issues/133)) ([2952f47](https://github.com/mmazzarolo/react-native-dialog/commit/2952f470130ce119e5d5dcd4844d3bcae3513e3d))
21 |
22 | # [9.2.0](https://github.com/mmazzarolo/react-native-dialog/compare/v9.1.2...v9.2.0) (2021-10-23)
23 |
24 |
25 | ### Features
26 |
27 | * Add `CodeInput` component ([#128](https://github.com/mmazzarolo/react-native-dialog/issues/128)) ([961f9a0](https://github.com/mmazzarolo/react-native-dialog/commit/961f9a0e9c1803fcc1bfcd8ded1e697054899bb9))
28 |
29 | ## [9.1.2](https://github.com/mmazzarolo/react-native-dialog/compare/v9.1.1...v9.1.2) (2021-10-01)
30 |
31 |
32 | ### Bug Fixes
33 |
34 | * Change style propType of Input from View to Text ([#124](https://github.com/mmazzarolo/react-native-dialog/issues/124)) ([d71d204](https://github.com/mmazzarolo/react-native-dialog/commit/d71d20489c5d4e7038ebbb8dc183fc352d87b409))
35 |
36 | ## [9.1.1](https://github.com/mmazzarolo/react-native-dialog/compare/v9.1.0...v9.1.1) (2021-09-30)
37 |
38 |
39 | ### Bug Fixes
40 |
41 | * Make Button label prop type required ([#123](https://github.com/mmazzarolo/react-native-dialog/issues/123)) ([e096d6b](https://github.com/mmazzarolo/react-native-dialog/commit/e096d6bf6814a114bb635585caa0babe72c3bd1c))
42 |
43 | # [9.1.0](https://github.com/mmazzarolo/react-native-dialog/compare/v9.0.0...v9.1.0) (2021-09-08)
44 |
45 |
46 | ### Features
47 |
48 | * Expose `useNativeDriver` as `Container` prop ([#122](https://github.com/mmazzarolo/react-native-dialog/issues/122)) ([dd6d979](https://github.com/mmazzarolo/react-native-dialog/commit/dd6d979279b22ad869d95ba530a1e9cd1fc1601b))
49 |
50 | # [9.0.0](https://github.com/mmazzarolo/react-native-dialog/compare/v8.2.0...v9.0.0) (2021-09-08)
51 |
52 |
53 | ### Bug Fixes
54 |
55 | * Typescript updates ([#121](https://github.com/mmazzarolo/react-native-dialog/issues/121)) ([1ba6f16](https://github.com/mmazzarolo/react-native-dialog/commit/1ba6f16fb2127f8da7e41c79444709b56cb0d4f6))
56 |
57 |
58 | ### BREAKING CHANGES
59 |
60 | * Updated TypeScript type definitions. Types _should_ just be more relaxed now — but since we updated the entire codebase we'll release this a major bump to be safe.
61 |
62 | # [8.2.0](https://github.com/mmazzarolo/react-native-dialog/compare/v8.1.1...v8.2.0) (2021-07-19)
63 |
64 |
65 | ### Features
66 |
67 | * Handle hardware back button on Android ([#114](https://github.com/mmazzarolo/react-native-dialog/issues/114)) ([e9b6cf5](https://github.com/mmazzarolo/react-native-dialog/commit/e9b6cf583cb5070cbb4c542ec9569e29fae3877a))
68 |
69 | ## [8.1.1](https://github.com/mmazzarolo/react-native-dialog/compare/v8.1.0...v8.1.1) (2021-07-15)
70 |
71 |
72 | ### Bug Fixes
73 |
74 | * **title:** children prop allows node instead of string ([#112](https://github.com/mmazzarolo/react-native-dialog/issues/112)) ([8290768](https://github.com/mmazzarolo/react-native-dialog/commit/8290768e73cf22e85404c6ebec9a328a3f0bf022))
75 |
76 | # [8.1.0](https://github.com/mmazzarolo/react-native-dialog/compare/v8.0.1...v8.1.0) (2021-07-12)
77 |
78 |
79 | ### Features
80 |
81 | * Added support for vertical buttons ([bebc3d0](https://github.com/mmazzarolo/react-native-dialog/commit/bebc3d040bdc0749e5bfbdc3c05ceebfaec7c8d5))
82 |
83 | ## [8.0.1](https://github.com/mmazzarolo/react-native-dialog/compare/v8.0.0...v8.0.1) (2021-04-18)
84 |
85 |
86 | ### Bug Fixes
87 |
88 | * Mark "textInputRef" and "blurComponentIOS" as optional ([#103](https://github.com/mmazzarolo/react-native-dialog/issues/103)) ([c92fe5d](https://github.com/mmazzarolo/react-native-dialog/commit/c92fe5d1492bbe55d06c7af4dec2be653360640f))
89 |
90 | # [8.0.0](https://github.com/mmazzarolo/react-native-dialog/compare/v7.0.0...v8.0.0) (2021-04-17)
91 |
92 |
93 | ### Features
94 |
95 | * Use TypeScript in the codebase and expose TypeScript type-definitions ([#101](https://github.com/mmazzarolo/react-native-dialog/issues/101)) ([77d41f6](https://github.com/mmazzarolo/react-native-dialog/commit/77d41f6f5fae17650245684c10ab3de3df93e76b))
96 |
97 |
98 | ### BREAKING CHANGES
99 |
100 | * Previous type definitions used in your app may not be compatible with this release anymore.
101 |
102 | # [7.0.0](https://github.com/mmazzarolo/react-native-dialog/compare/v6.2.0...v7.0.0) (2021-04-16)
103 |
104 |
105 | ### Features
106 |
107 | * Add support for dark mode ([#100](https://github.com/mmazzarolo/react-native-dialog/issues/100)) ([57b065e](https://github.com/mmazzarolo/react-native-dialog/commit/57b065e1524e64f28b7a07ebd8062d7b1982cc76))
108 |
109 |
110 | ### BREAKING CHANGES
111 |
112 | * We are now using the native colors instead of the hardcoded ones — which means that if your react-native app is using a specific accent/primary color it will be now shown correctly in the dialog.
113 |
114 | # [6.2.0](https://github.com/mmazzarolo/react-native-dialog/compare/v6.1.2...v6.2.0) (2021-02-19)
115 |
116 |
117 | ### Features
118 |
119 | * add keyboardVerticalOffset support for iOS ([#93](https://github.com/mmazzarolo/react-native-dialog/issues/93)) ([f44d21b](https://github.com/mmazzarolo/react-native-dialog/commit/f44d21bbe72183c129fba72b79440af26c348b1e))
120 |
121 | ## [6.1.2](https://github.com/mmazzarolo/react-native-dialog/compare/v6.1.1...v6.1.2) (2020-10-24)
122 |
123 |
124 | ### Bug Fixes
125 |
126 | * Always cover the whole screen (even with translucent status bar) ([#85](https://github.com/mmazzarolo/react-native-dialog/issues/85)) ([09b2f35](https://github.com/mmazzarolo/react-native-dialog/commit/09b2f3584890be76fd56d3e2719ea928e8130ebf))
127 |
128 | ## [6.1.1](https://github.com/mmazzarolo/react-native-dialog/compare/v6.1.0...v6.1.1) (2020-10-18)
129 |
130 |
131 | ### Bug Fixes
132 |
133 | * Added onBackdropPress on proptypes & docs update ([8b273d4](https://github.com/mmazzarolo/react-native-dialog/commit/8b273d45e76502d9366db2f6888bfc911ab6b1a1))
134 |
135 | # [6.1.0](https://github.com/mmazzarolo/react-native-dialog/compare/v6.0.1...v6.1.0) (2020-10-17)
136 |
137 |
138 | ### Features
139 |
140 | * Improved animation fidelity ([63ffbce](https://github.com/mmazzarolo/react-native-dialog/commit/63ffbce5f0e0fa63604529589815b94fc1625c85))
141 | * Improved animation fidelity ([4480c0e](https://github.com/mmazzarolo/react-native-dialog/commit/4480c0e4c1622d8a29287112c07ba6e0c7ae2d8a))
142 |
143 | ## [6.0.1](https://github.com/mmazzarolo/react-native-dialog/compare/v6.0.0...v6.0.1) (2020-10-17)
144 |
145 |
146 | ### Bug Fixes
147 |
148 | * Fix onBackdropPress trigger ([9a8865e](https://github.com/mmazzarolo/react-native-dialog/commit/9a8865ecbfb1fcc567dbea07235f3c3831b76c4c))
149 |
--------------------------------------------------------------------------------
/src/Container.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 | import { PropsWithChildren, ReactElement, ReactNode } from "react";
3 | import {
4 | KeyboardAvoidingView,
5 | Platform,
6 | StyleSheet,
7 | View,
8 | PlatformColor,
9 | ViewStyle,
10 | StyleProp,
11 | } from "react-native";
12 | import Modal from "./Modal";
13 | import useTheme, { StyleBuilder } from "./useTheme";
14 | import DialogTitle, { DialogTitleProps } from "./Title";
15 | import DialogDescription, { DialogDescriptionProps } from "./Description";
16 | import DialogButton, { DialogButtonProps } from "./Button";
17 |
18 | type TitleElement = ReactElement;
19 | type DescriptionElement = ReactElement<
20 | DialogDescriptionProps,
21 | typeof DialogDescription
22 | >;
23 | type ButtonElement = ReactElement;
24 |
25 | const iOS = Platform.OS === "ios";
26 |
27 | export type DialogContainerProps = PropsWithChildren<{
28 | blurComponentIOS?: ReactNode;
29 | buttonSeparatorStyle?: StyleProp;
30 | contentStyle?: StyleProp;
31 | footerStyle?: StyleProp;
32 | headerStyle?: StyleProp;
33 | blurStyle?: StyleProp;
34 | visible?: boolean;
35 | verticalButtons?: boolean;
36 | onBackdropPress?: () => void;
37 | onRequestClose?: () => void;
38 | keyboardVerticalOffset?: number;
39 | useNativeDriver?: boolean;
40 | }>;
41 |
42 | const DialogContainer: React.FC = (props) => {
43 | const {
44 | blurComponentIOS,
45 | buttonSeparatorStyle,
46 | children,
47 | contentStyle,
48 | footerStyle,
49 | headerStyle,
50 | blurStyle,
51 | visible = false,
52 | verticalButtons = false,
53 | keyboardVerticalOffset = 40,
54 | ...nodeProps
55 | } = props;
56 | const titleChildrens: TitleElement[] = [];
57 | const descriptionChildrens: DescriptionElement[] = [];
58 | const buttonChildrens: (ButtonElement | JSX.Element)[] = [];
59 | const otherChildrens: ReactNode[] = [];
60 | const { styles } = useTheme(buildStyles);
61 | React.Children.forEach(children, (child) => {
62 | if (typeof child === "object" && child !== null && "type" in child) {
63 | // @ts-expect-error: "Property 'displayName' does not exist on type 'string"
64 | const displayName = child.type?.displayName || child.type?.name;
65 | switch (displayName) {
66 | case DialogTitle.displayName:
67 | titleChildrens.push(child as TitleElement);
68 | return;
69 | case DialogDescription.displayName:
70 | descriptionChildrens.push(child as DescriptionElement);
71 | return;
72 | case DialogButton.displayName:
73 | if (Platform.OS === "ios" && buttonChildrens.length > 0) {
74 | buttonChildrens.push(
75 |
83 | );
84 | }
85 | buttonChildrens.push(child as ButtonElement);
86 | return;
87 | }
88 | }
89 | otherChildrens.push(child);
90 | });
91 | return (
92 |
98 |
103 |
104 | {Platform.OS === "ios" && blurComponentIOS}
105 | {Platform.OS === "ios" && !blurComponentIOS && (
106 |
107 | )}
108 |
109 | {titleChildrens}
110 | {descriptionChildrens}
111 |
112 | {otherChildrens}
113 | {Boolean(buttonChildrens.length) && (
114 | <>
115 | {Platform.OS === "ios" && (
116 |
117 | )}
118 |
125 | {buttonChildrens.map((x, i) =>
126 | React.cloneElement(x, {
127 | key: `dialog-button-${i}`,
128 | })
129 | )}
130 |
131 | >
132 | )}
133 |
134 |
135 |
136 | );
137 | };
138 |
139 | const buildStyles: StyleBuilder = () =>
140 | StyleSheet.create({
141 | centeredView: {
142 | marginTop: 22,
143 | },
144 | blur: {
145 | position: "absolute",
146 | backgroundColor: PlatformColor("systemGray6"), // "rgb(255,255,255)",
147 | top: 0,
148 | left: 0,
149 | bottom: 0,
150 | right: 0,
151 | },
152 | content: Platform.select({
153 | ios: {
154 | width: 270,
155 | //backgroundColor: PlatformColor("systemGray6"),
156 | flexDirection: "column",
157 | borderRadius: 13,
158 | overflow: "hidden",
159 | },
160 | android: {
161 | backgroundColor: PlatformColor("?attr/colorBackgroundFloating"),
162 | flexDirection: "column",
163 | borderRadius: 3,
164 | padding: 16,
165 | margin: 16,
166 | overflow: "hidden",
167 | elevation: 4,
168 | minWidth: 300,
169 | },
170 | web: {
171 | flexDirection: "column",
172 | borderRadius: 3,
173 | padding: 16,
174 | margin: 16,
175 | backgroundColor: "white",
176 | overflow: "hidden",
177 | elevation: 4,
178 | minWidth: 300,
179 | },
180 | default: {},
181 | }),
182 | header: Platform.select({
183 | ios: {
184 | margin: 18,
185 | },
186 | android: {
187 | margin: 12,
188 | },
189 | web: {
190 | margin: 12,
191 | },
192 | default: {},
193 | }),
194 | footer: {
195 | flexDirection: "row",
196 | ...Platform.select({
197 | ios: {
198 | justifyContent: "space-between",
199 | },
200 | android: {
201 | alignItems: "center",
202 | justifyContent: "flex-end",
203 | marginTop: 4,
204 | },
205 | web: {
206 | alignItems: "center",
207 | justifyContent: "flex-end",
208 | marginTop: 4,
209 | },
210 | default: {},
211 | }),
212 | },
213 | footerVertical: {
214 | flexDirection: "column",
215 | },
216 | buttonSeparatorHorizontal: {
217 | height: "100%",
218 | backgroundColor: PlatformColor("separator"), //"#A9ADAE",
219 | width: StyleSheet.hairlineWidth,
220 | },
221 | buttonSeparatorVertical: {
222 | width: "100%",
223 | backgroundColor: PlatformColor("separator"), //"#A9ADAE",
224 | height: StyleSheet.hairlineWidth,
225 | },
226 | });
227 |
228 | export default DialogContainer;
229 |
--------------------------------------------------------------------------------
/example/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: "com.android.application"
2 |
3 | import com.android.build.OutputFile
4 |
5 | /**
6 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
7 | * and bundleReleaseJsAndAssets).
8 | * These basically call `react-native bundle` with the correct arguments during the Android build
9 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
10 | * bundle directly from the development server. Below you can see all the possible configurations
11 | * and their defaults. If you decide to add a configuration block, make sure to add it before the
12 | * `apply from: "../../node_modules/react-native/react.gradle"` line.
13 | *
14 | * project.ext.react = [
15 | * // the name of the generated asset file containing your JS bundle
16 | * bundleAssetName: "index.android.bundle",
17 | *
18 | * // the entry file for bundle generation. If none specified and
19 | * // "index.android.js" exists, it will be used. Otherwise "index.js" is
20 | * // default. Can be overridden with ENTRY_FILE environment variable.
21 | * entryFile: "index.android.js",
22 | *
23 | * // https://reactnative.dev/docs/performance#enable-the-ram-format
24 | * bundleCommand: "ram-bundle",
25 | *
26 | * // whether to bundle JS and assets in debug mode
27 | * bundleInDebug: false,
28 | *
29 | * // whether to bundle JS and assets in release mode
30 | * bundleInRelease: true,
31 | *
32 | * // whether to bundle JS and assets in another build variant (if configured).
33 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
34 | * // The configuration property can be in the following formats
35 | * // 'bundleIn${productFlavor}${buildType}'
36 | * // 'bundleIn${buildType}'
37 | * // bundleInFreeDebug: true,
38 | * // bundleInPaidRelease: true,
39 | * // bundleInBeta: true,
40 | *
41 | * // whether to disable dev mode in custom build variants (by default only disabled in release)
42 | * // for example: to disable dev mode in the staging build type (if configured)
43 | * devDisabledInStaging: true,
44 | * // The configuration property can be in the following formats
45 | * // 'devDisabledIn${productFlavor}${buildType}'
46 | * // 'devDisabledIn${buildType}'
47 | *
48 | * // the root of your project, i.e. where "package.json" lives
49 | * root: "../../",
50 | *
51 | * // where to put the JS bundle asset in debug mode
52 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
53 | *
54 | * // where to put the JS bundle asset in release mode
55 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release",
56 | *
57 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
58 | * // require('./image.png')), in debug mode
59 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
60 | *
61 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
62 | * // require('./image.png')), in release mode
63 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
64 | *
65 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means
66 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
67 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle
68 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
69 | * // for example, you might want to remove it from here.
70 | * inputExcludes: ["android/**", "ios/**"],
71 | *
72 | * // override which node gets called and with what additional arguments
73 | * nodeExecutableAndArgs: ["node"],
74 | *
75 | * // supply additional arguments to the packager
76 | * extraPackagerArgs: []
77 | * ]
78 | */
79 |
80 | project.ext.react = [
81 | enableHermes: false
82 | ]
83 |
84 | apply from: '../../node_modules/react-native-unimodules/gradle.groovy'
85 | apply from: "../../node_modules/react-native/react.gradle"
86 | apply from: "../../node_modules/expo-updates/scripts/create-manifest-android.gradle"
87 |
88 | /**
89 | * Set this to true to create two separate APKs instead of one:
90 | * - An APK that only works on ARM devices
91 | * - An APK that only works on x86 devices
92 | * The advantage is the size of the APK is reduced by about 4MB.
93 | * Upload all the APKs to the Play Store and people will download
94 | * the correct one based on the CPU architecture of their device.
95 | */
96 | def enableSeparateBuildPerCPUArchitecture = false
97 |
98 | /**
99 | * Run Proguard to shrink the Java bytecode in release builds.
100 | */
101 | def enableProguardInReleaseBuilds = false
102 |
103 | /**
104 | * The preferred build flavor of JavaScriptCore.
105 | *
106 | * For example, to use the international variant, you can use:
107 | * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
108 | *
109 | * The international variant includes ICU i18n library and necessary data
110 | * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
111 | * give correct results when using with locales other than en-US. Note that
112 | * this variant is about 6MiB larger per architecture than default.
113 | */
114 | def jscFlavor = 'org.webkit:android-jsc:+'
115 |
116 | /**
117 | * Whether to enable the Hermes VM.
118 | *
119 | * This should be set on project.ext.react and mirrored here. If it is not set
120 | * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
121 | * and the benefits of using Hermes will therefore be sharply reduced.
122 | */
123 | def enableHermes = project.ext.react.get("enableHermes", false);
124 |
125 | android {
126 | compileSdkVersion rootProject.ext.compileSdkVersion
127 |
128 | compileOptions {
129 | sourceCompatibility JavaVersion.VERSION_1_8
130 | targetCompatibility JavaVersion.VERSION_1_8
131 | }
132 |
133 | defaultConfig {
134 | applicationId "com.example"
135 | minSdkVersion rootProject.ext.minSdkVersion
136 | targetSdkVersion rootProject.ext.targetSdkVersion
137 | versionCode 1
138 | versionName "1.0"
139 | }
140 | splits {
141 | abi {
142 | reset()
143 | enable enableSeparateBuildPerCPUArchitecture
144 | universalApk false // If true, also generate a universal APK
145 | include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
146 | }
147 | }
148 | signingConfigs {
149 | debug {
150 | storeFile file('debug.keystore')
151 | storePassword 'android'
152 | keyAlias 'androiddebugkey'
153 | keyPassword 'android'
154 | }
155 | }
156 | buildTypes {
157 | debug {
158 | signingConfig signingConfigs.debug
159 | }
160 | release {
161 | // Caution! In production, you need to generate your own keystore file.
162 | // see https://reactnative.dev/docs/signed-apk-android.
163 | signingConfig signingConfigs.debug
164 | minifyEnabled enableProguardInReleaseBuilds
165 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
166 | }
167 | }
168 |
169 | // applicationVariants are e.g. debug, release
170 | applicationVariants.all { variant ->
171 | variant.outputs.each { output ->
172 | // For each separate APK per architecture, set a unique version code as described here:
173 | // https://developer.android.com/studio/build/configure-apk-splits.html
174 | def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
175 | def abi = output.getFilter(OutputFile.ABI)
176 | if (abi != null) { // null for the universal-debug, universal-release variants
177 | output.versionCodeOverride =
178 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
179 | }
180 |
181 | }
182 | }
183 | }
184 |
185 | dependencies {
186 | implementation fileTree(dir: "libs", include: ["*.jar"])
187 | //noinspection GradleDynamicVersion
188 | implementation "com.facebook.react:react-native:+" // From node_modules
189 | implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
190 | debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
191 | exclude group:'com.facebook.fbjni'
192 | }
193 | debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
194 | exclude group:'com.facebook.flipper'
195 | exclude group:'com.squareup.okhttp3', module:'okhttp'
196 | }
197 | debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
198 | exclude group:'com.facebook.flipper'
199 | }
200 | addUnimodulesDependencies()
201 |
202 | if (enableHermes) {
203 | def hermesPath = "../../node_modules/hermes-engine/android/";
204 | debugImplementation files(hermesPath + "hermes-debug.aar")
205 | releaseImplementation files(hermesPath + "hermes-release.aar")
206 | } else {
207 | implementation jscFlavor
208 | }
209 | }
210 |
211 | // Run this once to be able to run the application with BUCK
212 | // puts all compile dependencies into folder libs for BUCK to use
213 | task copyDownloadableDepsToLibs(type: Copy) {
214 | from configurations.compile
215 | into 'libs'
216 | }
217 |
218 | apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
219 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # react-native-dialog
2 |
3 | [](https://badge.fury.io/js/react-native-dialog)
4 |
5 | A flexible pure JavaScript React-Native dialog that follows closely the native UI guidelines.
6 |
7 | ## Features
8 |
9 | - Support for iOS and Android (JavaScript API)
10 | - A flexible declarative API
11 | - Follows closely the UI of native dialogs/alerts
12 | - Can be used both as an alert and as an input prompt
13 | - Can be injected with any component
14 | - Supports light/dark mode
15 |
16 | ## Demo
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | ## Setup
29 |
30 | Install the library using npm or yarn:
31 |
32 | ```bash
33 | # Using npm:
34 | $ npm install react-native-dialog
35 | # Using yarn:
36 | $ yarn add react-native-dialog
37 | ```
38 |
39 | ## Usage
40 |
41 | React-native-dialog exposes a set of components that can be used to build the UI of the dialog:
42 |
43 | - **Dialog.Container**: This component is the root component of the dialog and all the other components should be nested inside it.
44 | - **Dialog.Title**: A `Text` component styled as a native dialog title.
45 | - **Dialog.Description**: A `Text` component styled as a native dialog description.
46 | - **Dialog.Button**: A component styled as a native dialog button.
47 | - **Dialog.Input**: A `TextInput` component styled as a native dialog input.
48 | - **Dialog.CodeInput**: A `TextInput` component styled as one time code input.
49 | - **Dialog.Switch**: A native `Switch` component with an optional label.
50 |
51 | 1. Import react-native-dialog:
52 |
53 | ```javascript
54 | import Dialog from "react-native-dialog";
55 | ```
56 |
57 | 2. Create a dialog and nest its content inside of it:
58 |
59 | ```javascript
60 | return (
61 |
62 |
63 | Account delete
64 |
65 | Do you want to delete this account? You cannot undo this action.
66 |
67 |
68 |
69 |
70 |
71 | );
72 | ```
73 |
74 | 3. Then simply show it by setting the `visible` prop to true:
75 |
76 | ```javascript
77 | return (
78 |
79 |
80 | Account delete
81 |
82 | Do you want to delete this account? You cannot undo this action.
83 |
84 |
85 |
86 |
87 |
88 | );
89 | ```
90 |
91 | The `visible` prop is the only prop you'll really need to make the dialog work: you should control this prop value by saving it in your state and setting it to `true` or `false` when needed.
92 |
93 | ## A complete example
94 |
95 | The following example consists in a component (`DialogTester`) with a button and a dialog.
96 | The dialog is controlled by the `dialogVisible` state variable and it is initially hidden since its value is `false`.
97 | Pressing the button sets `dialogVisible` to true, making the dialog visible.
98 | Inside the dialog there are two buttons that, when pressed, set `dialogVisible` to false, hiding the dialog.
99 |
100 | ```javascript
101 | import React, { useState } from "react";
102 | import { Button, StyleSheet, View } from "react-native";
103 | import Dialog from "react-native-dialog";
104 |
105 | export default function App() {
106 | const [visible, setVisible] = useState(false);
107 |
108 | const showDialog = () => {
109 | setVisible(true);
110 | };
111 |
112 | const handleCancel = () => {
113 | setVisible(false);
114 | };
115 |
116 | const handleDelete = () => {
117 | // The user has pressed the "Delete" button, so here you can do your own logic.
118 | // ...Your logic
119 | setVisible(false);
120 | };
121 |
122 | return (
123 |
124 |
125 |
126 | Account delete
127 |
128 | Do you want to delete this account? You cannot undo this action.
129 |
130 |
131 |
132 |
133 |
134 | );
135 | }
136 |
137 | const styles = StyleSheet.create({
138 | container: {
139 | flex: 1,
140 | backgroundColor: "#fff",
141 | alignItems: "center",
142 | justifyContent: "center",
143 | },
144 | });
145 | ```
146 |
147 | ## Available props
148 |
149 | ### Dialog.Button props
150 |
151 | | Name | Type | Default | Description |
152 | | -------- | ------ | -------------------------------------- | --------------------------------------- |
153 | | label | string | **REQUIRED** | The label text |
154 | | color | string | `#007ff9` on iOS, `#169689` on Android | The label color |
155 | | bold | bool | false | Show the label with a bold font weight? |
156 | | disabled | bool | false | Disable the button? |
157 | | onPress | func | **REQUIRED** | Called when the button is pressed |
158 |
159 | ### Dialog.Description props
160 |
161 | | Name | Type | Default | Description |
162 | | -------- | ------ | ------------ | -------------------- |
163 | | children | string | **REQUIRED** | The description text |
164 |
165 | ### Dialog.Container props
166 |
167 | | Name | Type | Default | Description |
168 | | ---------------------- | ------ | ------------- | --------------------------------------------------------------------------------------------------- |
169 | | blurComponentIOS | node | A low-opacity | The blur component used in iOS |
170 | | visible | bool | **REQUIRED** | Show the dialog? |
171 | | children | node | **REQUIRED** | The dialog content |
172 | | contentStyle | any | undefined | Extra style applied to the dialog content |
173 | | headerStyle | any | undefined | Extra style applied to the dialog header |
174 | | footerStyle | any | undefined | Extra style applied to the dialog footer |
175 | | buttonSeparatorStyle | any | undefined | Extra style applied to the dialog button separator |
176 | | onBackdropPress | func | undefined | Callback invoked when the backdrop is pressed |
177 | | onRequestClose | func | undefined | Callback invoked when the hardware back button on Android or the menu button on Apple TV is pressed |
178 | | keyboardVerticalOffset | number | undefined | keyboardVerticalOffset for iOS |
179 | | verticalButtons | bool | false | Renders button vertically |
180 | | useNativeDriver | bool | false | Defines if animations should use native driver |
181 |
182 | ### Dialog.Input props
183 |
184 | | Name | Type | Default | Description |
185 | | ------------------ | ------ | --------- | ----------------------------------------------------------------------- |
186 | | label | string | undefined | The input floating label |
187 | | wrapperStyle | any | undefined | The style applied to the input wrapper View |
188 | | textInputRef | ref | undefined | Ref to the input |
189 | | unstableLabelStyle | any | undefined | Likely to be removed in a future version. See issue #141 for discussion |
190 |
191 | `Dialog.Input` also accepts all the React-Native's `TextInput` component props.
192 |
193 | ### Dialog.CodeInput props
194 |
195 | | Name | Type | Default | Description |
196 | | -------------------------- | ------ | --------- | ----------------------------------------------------------- |
197 | | wrapperStyle | any | undefined | The style applied to the input wrapper View |
198 | | digitContainerStyle | any | undefined | The style applied to the digit container View |
199 | | digitContainerFocusedStyle | any | undefined | The style applied to the digit container View when in focus |
200 | | digitStyle | any | undefined | The style applied to the digit text |
201 | | codeLength | number | 4 | The total number of digits |
202 | | onCodeChange | func | undefined | Called when the input changed |
203 |
204 | `Dialog.CodeInput` also accepts all the React-Native's `TextInput` component props.
205 |
206 | ### Dialog.Title props
207 |
208 | | Name | Type | Default | Description |
209 | | -------- | ------ | ------------ | -------------- |
210 | | children | string | **REQUIRED** | The title text |
211 |
212 | `Dialog.Title` also accepts all the React-Native's `Text` component props.
213 |
214 | ### Dialog.Switch props
215 |
216 | | Name | Type | Default | Description |
217 | | ------------------ | ------ | --------- | ----------------------------------------------------------------------- |
218 | | label | string | undefined | The switch description text |
219 | | unstableLabelStyle | any | undefined | Likely to be removed in a future version. See issue #141 for discussion |
220 |
221 | `Dialog.Switch` also accepts all the React-Native's `Switch` component props.
222 |
223 | ## Frequently Asked Questions
224 |
225 | ### How can I use a custom blur component as the dialog background on iOS?
226 |
227 | To achieve a look even closer to the native iOS dialog you can provide your own component in the `blurComponentIOS` prop of a `Dialog.Container` and it will be injected in the dialog to be used as a background.
228 | The `blurComponentIOS` can be useful for example if you want to apply a native blur effect to the dialog.
229 | Here is an example using `react-native-blur`:
230 |
231 | ```javascript
232 | const blurComponentIOS = (
233 |
234 | );
235 | return (
236 |
237 |
238 | Account delete
239 |
240 | Do you want to delete this account? You cannot undo this action.
241 |
242 |
243 |
244 |
245 |
246 | );
247 | ```
248 |
249 | ### How can I add a 'tap outside dialog' callback?
250 |
251 | `react-native-dialog` uses [a thin abstraction on top of the React-Native's modal component](./src/Modal.tsx). Any properties you add to `Dialog.Container` are mapped through to the modal.
252 | The modal has an `onBackdropPress` property that can be used to register clicks on the backdrop.
253 |
254 | Below is an example of how you can close the dialog by tapping outside.
255 |
256 | ```javascript
257 | const [visible, setVisible] = useState(true);
258 |
259 | const handleCancel = () => {
260 | setVisible(false);
261 | };
262 |
263 | return (
264 |
265 | Title
266 |
267 |
268 | );
269 | ```
270 |
271 | ## Acknowledgments
272 |
273 | Thanks to the user [@honaf](https://github.com/honaf) who has kindly offered the `react-native-dialog` namespace.
274 | Also thanks to the user [@leecade](https://github.com/leecade) who offered the namespace `react-native-alert` (which has not been used since "Dialog" seems to suit better this component) and to [@tyxou](https://github.com/tyxou) for the entire codebase refactoring to hooks.
275 |
--------------------------------------------------------------------------------
/example/ios/example.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
11 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; };
12 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
14 | 3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */; };
15 | 96905EF65AED1B983A6B3ABC /* libPods-example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 58EEBF8E8E6FB1BC6CAF49B5 /* libPods-example.a */; };
16 | BB2F792D24A3F905000567C9 /* Expo.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB2F792C24A3F905000567C9 /* Expo.plist */; };
17 | /* End PBXBuildFile section */
18 |
19 | /* Begin PBXFileReference section */
20 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; };
21 | 13B07F961A680F5B00A75B9A /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = example.app; sourceTree = BUILT_PRODUCTS_DIR; };
22 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = example/AppDelegate.h; sourceTree = ""; };
23 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = example/AppDelegate.m; sourceTree = ""; };
24 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; };
25 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = example/Images.xcassets; sourceTree = ""; };
26 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = example/Info.plist; sourceTree = ""; };
27 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = example/main.m; sourceTree = ""; };
28 | 58EEBF8E8E6FB1BC6CAF49B5 /* libPods-example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-example.a"; sourceTree = BUILT_PRODUCTS_DIR; };
29 | 6C2E3173556A471DD304B334 /* Pods-example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-example.debug.xcconfig"; path = "Target Support Files/Pods-example/Pods-example.debug.xcconfig"; sourceTree = ""; };
30 | 7A4D352CD337FB3A3BF06240 /* Pods-example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-example.release.xcconfig"; path = "Target Support Files/Pods-example/Pods-example.release.xcconfig"; sourceTree = ""; };
31 | AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = SplashScreen.storyboard; path = example/SplashScreen.storyboard; sourceTree = ""; };
32 | BB2F792C24A3F905000567C9 /* Expo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Expo.plist; sourceTree = ""; };
33 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
34 | 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; };
35 | /* End PBXFileReference section */
36 |
37 | /* Begin PBXFrameworksBuildPhase section */
38 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
39 | isa = PBXFrameworksBuildPhase;
40 | buildActionMask = 2147483647;
41 | files = (
42 | 96905EF65AED1B983A6B3ABC /* libPods-example.a in Frameworks */,
43 | );
44 | runOnlyForDeploymentPostprocessing = 0;
45 | };
46 | /* End PBXFrameworksBuildPhase section */
47 |
48 | /* Begin PBXGroup section */
49 | 13B07FAE1A68108700A75B9A /* example */ = {
50 | isa = PBXGroup;
51 | children = (
52 | BB2F792B24A3F905000567C9 /* Supporting */,
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 | AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */,
61 | );
62 | name = example;
63 | sourceTree = "";
64 | };
65 | 2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
66 | isa = PBXGroup;
67 | children = (
68 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
69 | ED2971642150620600B7C4FE /* JavaScriptCore.framework */,
70 | 58EEBF8E8E6FB1BC6CAF49B5 /* libPods-example.a */,
71 | );
72 | name = Frameworks;
73 | sourceTree = "";
74 | };
75 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = {
76 | isa = PBXGroup;
77 | children = (
78 | );
79 | name = Libraries;
80 | sourceTree = "";
81 | };
82 | 83CBB9F61A601CBA00E9B192 = {
83 | isa = PBXGroup;
84 | children = (
85 | 13B07FAE1A68108700A75B9A /* example */,
86 | 832341AE1AAA6A7D00B99B32 /* Libraries */,
87 | 83CBBA001A601CBA00E9B192 /* Products */,
88 | 2D16E6871FA4F8E400B85C8A /* Frameworks */,
89 | D65327D7A22EEC0BE12398D9 /* Pods */,
90 | );
91 | indentWidth = 2;
92 | sourceTree = "";
93 | tabWidth = 2;
94 | usesTabs = 0;
95 | };
96 | 83CBBA001A601CBA00E9B192 /* Products */ = {
97 | isa = PBXGroup;
98 | children = (
99 | 13B07F961A680F5B00A75B9A /* example.app */,
100 | );
101 | name = Products;
102 | sourceTree = "";
103 | };
104 | BB2F792B24A3F905000567C9 /* Supporting */ = {
105 | isa = PBXGroup;
106 | children = (
107 | BB2F792C24A3F905000567C9 /* Expo.plist */,
108 | );
109 | name = Supporting;
110 | path = example/Supporting;
111 | sourceTree = "";
112 | };
113 | D65327D7A22EEC0BE12398D9 /* Pods */ = {
114 | isa = PBXGroup;
115 | children = (
116 | 6C2E3173556A471DD304B334 /* Pods-example.debug.xcconfig */,
117 | 7A4D352CD337FB3A3BF06240 /* Pods-example.release.xcconfig */,
118 | );
119 | path = Pods;
120 | sourceTree = "";
121 | };
122 | /* End PBXGroup section */
123 |
124 | /* Begin PBXNativeTarget section */
125 | 13B07F861A680F5B00A75B9A /* example */ = {
126 | isa = PBXNativeTarget;
127 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "example" */;
128 | buildPhases = (
129 | 08A4A3CD28434E44B6B9DE2E /* [CP] Check Pods Manifest.lock */,
130 | FD10A7F022414F080027D42C /* Start Packager */,
131 | 13B07F871A680F5B00A75B9A /* Sources */,
132 | 13B07F8C1A680F5B00A75B9A /* Frameworks */,
133 | 13B07F8E1A680F5B00A75B9A /* Resources */,
134 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
135 | 800E24972A6A228C8D4807E9 /* [CP] Copy Pods Resources */,
136 | );
137 | buildRules = (
138 | );
139 | dependencies = (
140 | );
141 | name = example;
142 | productName = example;
143 | productReference = 13B07F961A680F5B00A75B9A /* example.app */;
144 | productType = "com.apple.product-type.application";
145 | };
146 | /* End PBXNativeTarget section */
147 |
148 | /* Begin PBXProject section */
149 | 83CBB9F71A601CBA00E9B192 /* Project object */ = {
150 | isa = PBXProject;
151 | attributes = {
152 | LastUpgradeCheck = 1130;
153 | TargetAttributes = {
154 | 13B07F861A680F5B00A75B9A = {
155 | LastSwiftMigration = 1120;
156 | };
157 | };
158 | };
159 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "example" */;
160 | compatibilityVersion = "Xcode 3.2";
161 | developmentRegion = en;
162 | hasScannedForEncodings = 0;
163 | knownRegions = (
164 | en,
165 | Base,
166 | );
167 | mainGroup = 83CBB9F61A601CBA00E9B192;
168 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
169 | projectDirPath = "";
170 | projectRoot = "";
171 | targets = (
172 | 13B07F861A680F5B00A75B9A /* example */,
173 | );
174 | };
175 | /* End PBXProject section */
176 |
177 | /* Begin PBXResourcesBuildPhase section */
178 | 13B07F8E1A680F5B00A75B9A /* Resources */ = {
179 | isa = PBXResourcesBuildPhase;
180 | buildActionMask = 2147483647;
181 | files = (
182 | BB2F792D24A3F905000567C9 /* Expo.plist in Resources */,
183 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
184 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
185 | 3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */,
186 | );
187 | runOnlyForDeploymentPostprocessing = 0;
188 | };
189 | /* End PBXResourcesBuildPhase section */
190 |
191 | /* Begin PBXShellScriptBuildPhase section */
192 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {
193 | isa = PBXShellScriptBuildPhase;
194 | buildActionMask = 2147483647;
195 | files = (
196 | );
197 | inputPaths = (
198 | );
199 | name = "Bundle React Native code and images";
200 | outputPaths = (
201 | );
202 | runOnlyForDeploymentPostprocessing = 0;
203 | shellPath = /bin/sh;
204 | 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\n";
205 | };
206 | 08A4A3CD28434E44B6B9DE2E /* [CP] Check Pods Manifest.lock */ = {
207 | isa = PBXShellScriptBuildPhase;
208 | buildActionMask = 2147483647;
209 | files = (
210 | );
211 | inputFileListPaths = (
212 | );
213 | inputPaths = (
214 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
215 | "${PODS_ROOT}/Manifest.lock",
216 | );
217 | name = "[CP] Check Pods Manifest.lock";
218 | outputFileListPaths = (
219 | );
220 | outputPaths = (
221 | "$(DERIVED_FILE_DIR)/Pods-example-checkManifestLockResult.txt",
222 | );
223 | runOnlyForDeploymentPostprocessing = 0;
224 | shellPath = /bin/sh;
225 | 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";
226 | showEnvVarsInLog = 0;
227 | };
228 | 800E24972A6A228C8D4807E9 /* [CP] Copy Pods Resources */ = {
229 | isa = PBXShellScriptBuildPhase;
230 | buildActionMask = 2147483647;
231 | files = (
232 | );
233 | inputPaths = (
234 | "${PODS_ROOT}/Target Support Files/Pods-example/Pods-example-resources.sh",
235 | "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle",
236 | );
237 | name = "[CP] Copy Pods Resources";
238 | outputPaths = (
239 | "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle",
240 | );
241 | runOnlyForDeploymentPostprocessing = 0;
242 | shellPath = /bin/sh;
243 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-example/Pods-example-resources.sh\"\n";
244 | showEnvVarsInLog = 0;
245 | };
246 | FD10A7F022414F080027D42C /* Start Packager */ = {
247 | isa = PBXShellScriptBuildPhase;
248 | buildActionMask = 2147483647;
249 | files = (
250 | );
251 | inputFileListPaths = (
252 | );
253 | inputPaths = (
254 | );
255 | name = "Start Packager";
256 | outputFileListPaths = (
257 | );
258 | outputPaths = (
259 | );
260 | runOnlyForDeploymentPostprocessing = 0;
261 | shellPath = /bin/sh;
262 | 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";
263 | showEnvVarsInLog = 0;
264 | };
265 | /* End PBXShellScriptBuildPhase section */
266 |
267 | /* Begin PBXSourcesBuildPhase section */
268 | 13B07F871A680F5B00A75B9A /* Sources */ = {
269 | isa = PBXSourcesBuildPhase;
270 | buildActionMask = 2147483647;
271 | files = (
272 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */,
273 | 13B07FC11A68108700A75B9A /* main.m in Sources */,
274 | );
275 | runOnlyForDeploymentPostprocessing = 0;
276 | };
277 | /* End PBXSourcesBuildPhase section */
278 |
279 | /* Begin PBXVariantGroup section */
280 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = {
281 | isa = PBXVariantGroup;
282 | children = (
283 | 13B07FB21A68108700A75B9A /* Base */,
284 | );
285 | name = LaunchScreen.xib;
286 | path = example;
287 | sourceTree = "";
288 | };
289 | /* End PBXVariantGroup section */
290 |
291 | /* Begin XCBuildConfiguration section */
292 | 13B07F941A680F5B00A75B9A /* Debug */ = {
293 | isa = XCBuildConfiguration;
294 | baseConfigurationReference = 6C2E3173556A471DD304B334 /* Pods-example.debug.xcconfig */;
295 | buildSettings = {
296 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
297 | CLANG_ENABLE_MODULES = YES;
298 | CURRENT_PROJECT_VERSION = 1;
299 | ENABLE_BITCODE = NO;
300 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
301 | GCC_PREPROCESSOR_DEFINITIONS = (
302 | "$(inherited)",
303 | "FB_SONARKIT_ENABLED=1",
304 | );
305 | INFOPLIST_FILE = example/Info.plist;
306 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
307 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
308 | OTHER_LDFLAGS = (
309 | "$(inherited)",
310 | "-ObjC",
311 | "-lc++",
312 | );
313 | PRODUCT_BUNDLE_IDENTIFIER = org.name.example;
314 | PRODUCT_NAME = example;
315 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
316 | SWIFT_VERSION = 5.0;
317 | VERSIONING_SYSTEM = "apple-generic";
318 | };
319 | name = Debug;
320 | };
321 | 13B07F951A680F5B00A75B9A /* Release */ = {
322 | isa = XCBuildConfiguration;
323 | baseConfigurationReference = 7A4D352CD337FB3A3BF06240 /* Pods-example.release.xcconfig */;
324 | buildSettings = {
325 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
326 | CLANG_ENABLE_MODULES = YES;
327 | CURRENT_PROJECT_VERSION = 1;
328 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
329 | INFOPLIST_FILE = example/Info.plist;
330 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
331 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
332 | OTHER_LDFLAGS = (
333 | "$(inherited)",
334 | "-ObjC",
335 | "-lc++",
336 | );
337 | PRODUCT_BUNDLE_IDENTIFIER = org.name.example;
338 | PRODUCT_NAME = example;
339 | SWIFT_VERSION = 5.0;
340 | VERSIONING_SYSTEM = "apple-generic";
341 | };
342 | name = Release;
343 | };
344 | 83CBBA201A601CBA00E9B192 /* Debug */ = {
345 | isa = XCBuildConfiguration;
346 | buildSettings = {
347 | ALWAYS_SEARCH_USER_PATHS = NO;
348 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
349 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
350 | CLANG_CXX_LIBRARY = "libc++";
351 | CLANG_ENABLE_MODULES = YES;
352 | CLANG_ENABLE_OBJC_ARC = YES;
353 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
354 | CLANG_WARN_BOOL_CONVERSION = YES;
355 | CLANG_WARN_COMMA = YES;
356 | CLANG_WARN_CONSTANT_CONVERSION = YES;
357 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
358 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
359 | CLANG_WARN_EMPTY_BODY = YES;
360 | CLANG_WARN_ENUM_CONVERSION = YES;
361 | CLANG_WARN_INFINITE_RECURSION = YES;
362 | CLANG_WARN_INT_CONVERSION = YES;
363 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
364 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
365 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
366 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
367 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
368 | CLANG_WARN_STRICT_PROTOTYPES = YES;
369 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
370 | CLANG_WARN_UNREACHABLE_CODE = YES;
371 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
372 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
373 | COPY_PHASE_STRIP = NO;
374 | ENABLE_STRICT_OBJC_MSGSEND = YES;
375 | ENABLE_TESTABILITY = YES;
376 | GCC_C_LANGUAGE_STANDARD = gnu99;
377 | GCC_DYNAMIC_NO_PIC = NO;
378 | GCC_NO_COMMON_BLOCKS = YES;
379 | GCC_OPTIMIZATION_LEVEL = 0;
380 | GCC_PREPROCESSOR_DEFINITIONS = (
381 | "DEBUG=1",
382 | "$(inherited)",
383 | );
384 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
385 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
386 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
387 | GCC_WARN_UNDECLARED_SELECTOR = YES;
388 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
389 | GCC_WARN_UNUSED_FUNCTION = YES;
390 | GCC_WARN_UNUSED_VARIABLE = YES;
391 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
392 | LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)";
393 | LIBRARY_SEARCH_PATHS = (
394 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
395 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"",
396 | "\"$(inherited)\"",
397 | );
398 | MTL_ENABLE_DEBUG_INFO = YES;
399 | ONLY_ACTIVE_ARCH = YES;
400 | SDKROOT = iphoneos;
401 | };
402 | name = Debug;
403 | };
404 | 83CBBA211A601CBA00E9B192 /* Release */ = {
405 | isa = XCBuildConfiguration;
406 | buildSettings = {
407 | ALWAYS_SEARCH_USER_PATHS = NO;
408 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
409 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
410 | CLANG_CXX_LIBRARY = "libc++";
411 | CLANG_ENABLE_MODULES = YES;
412 | CLANG_ENABLE_OBJC_ARC = YES;
413 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
414 | CLANG_WARN_BOOL_CONVERSION = YES;
415 | CLANG_WARN_COMMA = YES;
416 | CLANG_WARN_CONSTANT_CONVERSION = YES;
417 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
418 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
419 | CLANG_WARN_EMPTY_BODY = YES;
420 | CLANG_WARN_ENUM_CONVERSION = YES;
421 | CLANG_WARN_INFINITE_RECURSION = YES;
422 | CLANG_WARN_INT_CONVERSION = YES;
423 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
424 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
425 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
426 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
427 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
428 | CLANG_WARN_STRICT_PROTOTYPES = YES;
429 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
430 | CLANG_WARN_UNREACHABLE_CODE = YES;
431 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
432 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
433 | COPY_PHASE_STRIP = YES;
434 | ENABLE_NS_ASSERTIONS = NO;
435 | ENABLE_STRICT_OBJC_MSGSEND = YES;
436 | GCC_C_LANGUAGE_STANDARD = gnu99;
437 | GCC_NO_COMMON_BLOCKS = YES;
438 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
439 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
440 | GCC_WARN_UNDECLARED_SELECTOR = YES;
441 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
442 | GCC_WARN_UNUSED_FUNCTION = YES;
443 | GCC_WARN_UNUSED_VARIABLE = YES;
444 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
445 | LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)";
446 | LIBRARY_SEARCH_PATHS = (
447 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
448 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"",
449 | "\"$(inherited)\"",
450 | );
451 | MTL_ENABLE_DEBUG_INFO = NO;
452 | SDKROOT = iphoneos;
453 | VALIDATE_PRODUCT = YES;
454 | };
455 | name = Release;
456 | };
457 | /* End XCBuildConfiguration section */
458 |
459 | /* Begin XCConfigurationList section */
460 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "example" */ = {
461 | isa = XCConfigurationList;
462 | buildConfigurations = (
463 | 13B07F941A680F5B00A75B9A /* Debug */,
464 | 13B07F951A680F5B00A75B9A /* Release */,
465 | );
466 | defaultConfigurationIsVisible = 0;
467 | defaultConfigurationName = Release;
468 | };
469 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "example" */ = {
470 | isa = XCConfigurationList;
471 | buildConfigurations = (
472 | 83CBBA201A601CBA00E9B192 /* Debug */,
473 | 83CBBA211A601CBA00E9B192 /* Release */,
474 | );
475 | defaultConfigurationIsVisible = 0;
476 | defaultConfigurationName = Release;
477 | };
478 | /* End XCConfigurationList section */
479 | };
480 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
481 | }
482 |
--------------------------------------------------------------------------------
/example/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - boost-for-react-native (1.63.0)
3 | - CocoaAsyncSocket (7.6.4)
4 | - CocoaLibEvent (1.0.0)
5 | - DoubleConversion (1.1.6)
6 | - EXConstants (9.2.0):
7 | - UMConstantsInterface
8 | - UMCore
9 | - EXErrorRecovery (1.3.0):
10 | - UMCore
11 | - EXFileSystem (9.2.0):
12 | - UMCore
13 | - UMFileSystemInterface
14 | - EXFont (8.3.0):
15 | - UMCore
16 | - UMFontInterface
17 | - EXImageLoader (1.2.0):
18 | - React-Core
19 | - UMCore
20 | - UMImageLoaderInterface
21 | - EXKeepAwake (8.3.0):
22 | - UMCore
23 | - EXLinearGradient (8.3.1):
24 | - UMCore
25 | - EXLocation (9.0.1):
26 | - UMCore
27 | - UMPermissionsInterface
28 | - UMTaskManagerInterface
29 | - EXPermissions (9.3.0):
30 | - UMCore
31 | - UMPermissionsInterface
32 | - EXSplashScreen (0.6.2):
33 | - React
34 | - UMCore
35 | - EXSQLite (8.4.0):
36 | - UMCore
37 | - UMFileSystemInterface
38 | - EXUpdates (0.3.5):
39 | - React
40 | - UMCore
41 | - FBLazyVector (0.63.4)
42 | - FBReactNativeSpec (0.63.4):
43 | - Folly (= 2020.01.13.00)
44 | - RCTRequired (= 0.63.4)
45 | - RCTTypeSafety (= 0.63.4)
46 | - React-Core (= 0.63.4)
47 | - React-jsi (= 0.63.4)
48 | - ReactCommon/turbomodule/core (= 0.63.4)
49 | - Flipper (0.54.0):
50 | - Flipper-Folly (~> 2.2)
51 | - Flipper-RSocket (~> 1.1)
52 | - Flipper-DoubleConversion (1.1.7)
53 | - Flipper-Folly (2.2.0):
54 | - boost-for-react-native
55 | - CocoaLibEvent (~> 1.0)
56 | - Flipper-DoubleConversion
57 | - Flipper-Glog
58 | - OpenSSL-Universal (= 1.0.2.19)
59 | - Flipper-Glog (0.3.6)
60 | - Flipper-PeerTalk (0.0.4)
61 | - Flipper-RSocket (1.1.0):
62 | - Flipper-Folly (~> 2.2)
63 | - FlipperKit (0.54.0):
64 | - FlipperKit/Core (= 0.54.0)
65 | - FlipperKit/Core (0.54.0):
66 | - Flipper (~> 0.54.0)
67 | - FlipperKit/CppBridge
68 | - FlipperKit/FBCxxFollyDynamicConvert
69 | - FlipperKit/FBDefines
70 | - FlipperKit/FKPortForwarding
71 | - FlipperKit/CppBridge (0.54.0):
72 | - Flipper (~> 0.54.0)
73 | - FlipperKit/FBCxxFollyDynamicConvert (0.54.0):
74 | - Flipper-Folly (~> 2.2)
75 | - FlipperKit/FBDefines (0.54.0)
76 | - FlipperKit/FKPortForwarding (0.54.0):
77 | - CocoaAsyncSocket (~> 7.6)
78 | - Flipper-PeerTalk (~> 0.0.4)
79 | - FlipperKit/FlipperKitHighlightOverlay (0.54.0)
80 | - FlipperKit/FlipperKitLayoutPlugin (0.54.0):
81 | - FlipperKit/Core
82 | - FlipperKit/FlipperKitHighlightOverlay
83 | - FlipperKit/FlipperKitLayoutTextSearchable
84 | - YogaKit (~> 1.18)
85 | - FlipperKit/FlipperKitLayoutTextSearchable (0.54.0)
86 | - FlipperKit/FlipperKitNetworkPlugin (0.54.0):
87 | - FlipperKit/Core
88 | - FlipperKit/FlipperKitReactPlugin (0.54.0):
89 | - FlipperKit/Core
90 | - FlipperKit/FlipperKitUserDefaultsPlugin (0.54.0):
91 | - FlipperKit/Core
92 | - FlipperKit/SKIOSNetworkPlugin (0.54.0):
93 | - FlipperKit/Core
94 | - FlipperKit/FlipperKitNetworkPlugin
95 | - Folly (2020.01.13.00):
96 | - boost-for-react-native
97 | - DoubleConversion
98 | - Folly/Default (= 2020.01.13.00)
99 | - glog
100 | - Folly/Default (2020.01.13.00):
101 | - boost-for-react-native
102 | - DoubleConversion
103 | - glog
104 | - glog (0.3.5)
105 | - OpenSSL-Universal (1.0.2.19):
106 | - OpenSSL-Universal/Static (= 1.0.2.19)
107 | - OpenSSL-Universal/Static (1.0.2.19)
108 | - RCTRequired (0.63.4)
109 | - RCTTypeSafety (0.63.4):
110 | - FBLazyVector (= 0.63.4)
111 | - Folly (= 2020.01.13.00)
112 | - RCTRequired (= 0.63.4)
113 | - React-Core (= 0.63.4)
114 | - React (0.63.4):
115 | - React-Core (= 0.63.4)
116 | - React-Core/DevSupport (= 0.63.4)
117 | - React-Core/RCTWebSocket (= 0.63.4)
118 | - React-RCTActionSheet (= 0.63.4)
119 | - React-RCTAnimation (= 0.63.4)
120 | - React-RCTBlob (= 0.63.4)
121 | - React-RCTImage (= 0.63.4)
122 | - React-RCTLinking (= 0.63.4)
123 | - React-RCTNetwork (= 0.63.4)
124 | - React-RCTSettings (= 0.63.4)
125 | - React-RCTText (= 0.63.4)
126 | - React-RCTVibration (= 0.63.4)
127 | - React-callinvoker (0.63.4)
128 | - React-Core (0.63.4):
129 | - Folly (= 2020.01.13.00)
130 | - glog
131 | - React-Core/Default (= 0.63.4)
132 | - React-cxxreact (= 0.63.4)
133 | - React-jsi (= 0.63.4)
134 | - React-jsiexecutor (= 0.63.4)
135 | - Yoga
136 | - React-Core/CoreModulesHeaders (0.63.4):
137 | - Folly (= 2020.01.13.00)
138 | - glog
139 | - React-Core/Default
140 | - React-cxxreact (= 0.63.4)
141 | - React-jsi (= 0.63.4)
142 | - React-jsiexecutor (= 0.63.4)
143 | - Yoga
144 | - React-Core/Default (0.63.4):
145 | - Folly (= 2020.01.13.00)
146 | - glog
147 | - React-cxxreact (= 0.63.4)
148 | - React-jsi (= 0.63.4)
149 | - React-jsiexecutor (= 0.63.4)
150 | - Yoga
151 | - React-Core/DevSupport (0.63.4):
152 | - Folly (= 2020.01.13.00)
153 | - glog
154 | - React-Core/Default (= 0.63.4)
155 | - React-Core/RCTWebSocket (= 0.63.4)
156 | - React-cxxreact (= 0.63.4)
157 | - React-jsi (= 0.63.4)
158 | - React-jsiexecutor (= 0.63.4)
159 | - React-jsinspector (= 0.63.4)
160 | - Yoga
161 | - React-Core/RCTActionSheetHeaders (0.63.4):
162 | - Folly (= 2020.01.13.00)
163 | - glog
164 | - React-Core/Default
165 | - React-cxxreact (= 0.63.4)
166 | - React-jsi (= 0.63.4)
167 | - React-jsiexecutor (= 0.63.4)
168 | - Yoga
169 | - React-Core/RCTAnimationHeaders (0.63.4):
170 | - Folly (= 2020.01.13.00)
171 | - glog
172 | - React-Core/Default
173 | - React-cxxreact (= 0.63.4)
174 | - React-jsi (= 0.63.4)
175 | - React-jsiexecutor (= 0.63.4)
176 | - Yoga
177 | - React-Core/RCTBlobHeaders (0.63.4):
178 | - Folly (= 2020.01.13.00)
179 | - glog
180 | - React-Core/Default
181 | - React-cxxreact (= 0.63.4)
182 | - React-jsi (= 0.63.4)
183 | - React-jsiexecutor (= 0.63.4)
184 | - Yoga
185 | - React-Core/RCTImageHeaders (0.63.4):
186 | - Folly (= 2020.01.13.00)
187 | - glog
188 | - React-Core/Default
189 | - React-cxxreact (= 0.63.4)
190 | - React-jsi (= 0.63.4)
191 | - React-jsiexecutor (= 0.63.4)
192 | - Yoga
193 | - React-Core/RCTLinkingHeaders (0.63.4):
194 | - Folly (= 2020.01.13.00)
195 | - glog
196 | - React-Core/Default
197 | - React-cxxreact (= 0.63.4)
198 | - React-jsi (= 0.63.4)
199 | - React-jsiexecutor (= 0.63.4)
200 | - Yoga
201 | - React-Core/RCTNetworkHeaders (0.63.4):
202 | - Folly (= 2020.01.13.00)
203 | - glog
204 | - React-Core/Default
205 | - React-cxxreact (= 0.63.4)
206 | - React-jsi (= 0.63.4)
207 | - React-jsiexecutor (= 0.63.4)
208 | - Yoga
209 | - React-Core/RCTSettingsHeaders (0.63.4):
210 | - Folly (= 2020.01.13.00)
211 | - glog
212 | - React-Core/Default
213 | - React-cxxreact (= 0.63.4)
214 | - React-jsi (= 0.63.4)
215 | - React-jsiexecutor (= 0.63.4)
216 | - Yoga
217 | - React-Core/RCTTextHeaders (0.63.4):
218 | - Folly (= 2020.01.13.00)
219 | - glog
220 | - React-Core/Default
221 | - React-cxxreact (= 0.63.4)
222 | - React-jsi (= 0.63.4)
223 | - React-jsiexecutor (= 0.63.4)
224 | - Yoga
225 | - React-Core/RCTVibrationHeaders (0.63.4):
226 | - Folly (= 2020.01.13.00)
227 | - glog
228 | - React-Core/Default
229 | - React-cxxreact (= 0.63.4)
230 | - React-jsi (= 0.63.4)
231 | - React-jsiexecutor (= 0.63.4)
232 | - Yoga
233 | - React-Core/RCTWebSocket (0.63.4):
234 | - Folly (= 2020.01.13.00)
235 | - glog
236 | - React-Core/Default (= 0.63.4)
237 | - React-cxxreact (= 0.63.4)
238 | - React-jsi (= 0.63.4)
239 | - React-jsiexecutor (= 0.63.4)
240 | - Yoga
241 | - React-CoreModules (0.63.4):
242 | - FBReactNativeSpec (= 0.63.4)
243 | - Folly (= 2020.01.13.00)
244 | - RCTTypeSafety (= 0.63.4)
245 | - React-Core/CoreModulesHeaders (= 0.63.4)
246 | - React-jsi (= 0.63.4)
247 | - React-RCTImage (= 0.63.4)
248 | - ReactCommon/turbomodule/core (= 0.63.4)
249 | - React-cxxreact (0.63.4):
250 | - boost-for-react-native (= 1.63.0)
251 | - DoubleConversion
252 | - Folly (= 2020.01.13.00)
253 | - glog
254 | - React-callinvoker (= 0.63.4)
255 | - React-jsinspector (= 0.63.4)
256 | - React-jsi (0.63.4):
257 | - boost-for-react-native (= 1.63.0)
258 | - DoubleConversion
259 | - Folly (= 2020.01.13.00)
260 | - glog
261 | - React-jsi/Default (= 0.63.4)
262 | - React-jsi/Default (0.63.4):
263 | - boost-for-react-native (= 1.63.0)
264 | - DoubleConversion
265 | - Folly (= 2020.01.13.00)
266 | - glog
267 | - React-jsiexecutor (0.63.4):
268 | - DoubleConversion
269 | - Folly (= 2020.01.13.00)
270 | - glog
271 | - React-cxxreact (= 0.63.4)
272 | - React-jsi (= 0.63.4)
273 | - React-jsinspector (0.63.4)
274 | - React-RCTActionSheet (0.63.4):
275 | - React-Core/RCTActionSheetHeaders (= 0.63.4)
276 | - React-RCTAnimation (0.63.4):
277 | - FBReactNativeSpec (= 0.63.4)
278 | - Folly (= 2020.01.13.00)
279 | - RCTTypeSafety (= 0.63.4)
280 | - React-Core/RCTAnimationHeaders (= 0.63.4)
281 | - React-jsi (= 0.63.4)
282 | - ReactCommon/turbomodule/core (= 0.63.4)
283 | - React-RCTBlob (0.63.4):
284 | - FBReactNativeSpec (= 0.63.4)
285 | - Folly (= 2020.01.13.00)
286 | - React-Core/RCTBlobHeaders (= 0.63.4)
287 | - React-Core/RCTWebSocket (= 0.63.4)
288 | - React-jsi (= 0.63.4)
289 | - React-RCTNetwork (= 0.63.4)
290 | - ReactCommon/turbomodule/core (= 0.63.4)
291 | - React-RCTImage (0.63.4):
292 | - FBReactNativeSpec (= 0.63.4)
293 | - Folly (= 2020.01.13.00)
294 | - RCTTypeSafety (= 0.63.4)
295 | - React-Core/RCTImageHeaders (= 0.63.4)
296 | - React-jsi (= 0.63.4)
297 | - React-RCTNetwork (= 0.63.4)
298 | - ReactCommon/turbomodule/core (= 0.63.4)
299 | - React-RCTLinking (0.63.4):
300 | - FBReactNativeSpec (= 0.63.4)
301 | - React-Core/RCTLinkingHeaders (= 0.63.4)
302 | - React-jsi (= 0.63.4)
303 | - ReactCommon/turbomodule/core (= 0.63.4)
304 | - React-RCTNetwork (0.63.4):
305 | - FBReactNativeSpec (= 0.63.4)
306 | - Folly (= 2020.01.13.00)
307 | - RCTTypeSafety (= 0.63.4)
308 | - React-Core/RCTNetworkHeaders (= 0.63.4)
309 | - React-jsi (= 0.63.4)
310 | - ReactCommon/turbomodule/core (= 0.63.4)
311 | - React-RCTSettings (0.63.4):
312 | - FBReactNativeSpec (= 0.63.4)
313 | - Folly (= 2020.01.13.00)
314 | - RCTTypeSafety (= 0.63.4)
315 | - React-Core/RCTSettingsHeaders (= 0.63.4)
316 | - React-jsi (= 0.63.4)
317 | - ReactCommon/turbomodule/core (= 0.63.4)
318 | - React-RCTText (0.63.4):
319 | - React-Core/RCTTextHeaders (= 0.63.4)
320 | - React-RCTVibration (0.63.4):
321 | - FBReactNativeSpec (= 0.63.4)
322 | - Folly (= 2020.01.13.00)
323 | - React-Core/RCTVibrationHeaders (= 0.63.4)
324 | - React-jsi (= 0.63.4)
325 | - ReactCommon/turbomodule/core (= 0.63.4)
326 | - ReactCommon/turbomodule/core (0.63.4):
327 | - DoubleConversion
328 | - Folly (= 2020.01.13.00)
329 | - glog
330 | - React-callinvoker (= 0.63.4)
331 | - React-Core (= 0.63.4)
332 | - React-cxxreact (= 0.63.4)
333 | - React-jsi (= 0.63.4)
334 | - RNGestureHandler (1.7.0):
335 | - React
336 | - RNReanimated (1.13.3):
337 | - React-Core
338 | - RNScreens (2.10.1):
339 | - React
340 | - UMAppLoader (1.3.0)
341 | - UMBarCodeScannerInterface (5.3.0)
342 | - UMCameraInterface (5.3.0)
343 | - UMConstantsInterface (5.3.0)
344 | - UMCore (5.5.1)
345 | - UMFaceDetectorInterface (5.3.0)
346 | - UMFileSystemInterface (5.3.0)
347 | - UMFontInterface (5.3.0)
348 | - UMImageLoaderInterface (5.3.0)
349 | - UMPermissionsInterface (5.3.0):
350 | - UMCore
351 | - UMReactNativeAdapter (5.6.0):
352 | - React-Core
353 | - UMCore
354 | - UMFontInterface
355 | - UMSensorsInterface (5.3.0)
356 | - UMTaskManagerInterface (5.3.0)
357 | - Yoga (1.14.0)
358 | - YogaKit (1.18.1):
359 | - Yoga (~> 1.14)
360 |
361 | DEPENDENCIES:
362 | - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
363 | - EXConstants (from `../node_modules/expo-constants/ios`)
364 | - EXErrorRecovery (from `../node_modules/expo-error-recovery/ios`)
365 | - EXFileSystem (from `../node_modules/expo-file-system/ios`)
366 | - EXFont (from `../node_modules/expo-font/ios`)
367 | - EXImageLoader (from `../node_modules/expo-image-loader/ios`)
368 | - EXKeepAwake (from `../node_modules/expo-keep-awake/ios`)
369 | - EXLinearGradient (from `../node_modules/expo-linear-gradient/ios`)
370 | - EXLocation (from `../node_modules/expo-location/ios`)
371 | - EXPermissions (from `../node_modules/expo-permissions/ios`)
372 | - EXSplashScreen (from `../node_modules/expo-splash-screen/ios`)
373 | - EXSQLite (from `../node_modules/expo-sqlite/ios`)
374 | - EXUpdates (from `../node_modules/expo-updates/ios`)
375 | - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
376 | - FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`)
377 | - Flipper (~> 0.54.0)
378 | - Flipper-DoubleConversion (= 1.1.7)
379 | - Flipper-Folly (~> 2.2)
380 | - Flipper-Glog (= 0.3.6)
381 | - Flipper-PeerTalk (~> 0.0.4)
382 | - Flipper-RSocket (~> 1.1)
383 | - FlipperKit (~> 0.54.0)
384 | - FlipperKit/Core (~> 0.54.0)
385 | - FlipperKit/CppBridge (~> 0.54.0)
386 | - FlipperKit/FBCxxFollyDynamicConvert (~> 0.54.0)
387 | - FlipperKit/FBDefines (~> 0.54.0)
388 | - FlipperKit/FKPortForwarding (~> 0.54.0)
389 | - FlipperKit/FlipperKitHighlightOverlay (~> 0.54.0)
390 | - FlipperKit/FlipperKitLayoutPlugin (~> 0.54.0)
391 | - FlipperKit/FlipperKitLayoutTextSearchable (~> 0.54.0)
392 | - FlipperKit/FlipperKitNetworkPlugin (~> 0.54.0)
393 | - FlipperKit/FlipperKitReactPlugin (~> 0.54.0)
394 | - FlipperKit/FlipperKitUserDefaultsPlugin (~> 0.54.0)
395 | - FlipperKit/SKIOSNetworkPlugin (~> 0.54.0)
396 | - Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`)
397 | - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
398 | - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
399 | - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`)
400 | - React (from `../node_modules/react-native/`)
401 | - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`)
402 | - React-Core (from `../node_modules/react-native/`)
403 | - React-Core/DevSupport (from `../node_modules/react-native/`)
404 | - React-Core/RCTWebSocket (from `../node_modules/react-native/`)
405 | - React-CoreModules (from `../node_modules/react-native/React/CoreModules`)
406 | - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`)
407 | - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`)
408 | - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
409 | - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
410 | - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
411 | - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`)
412 | - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`)
413 | - React-RCTImage (from `../node_modules/react-native/Libraries/Image`)
414 | - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`)
415 | - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`)
416 | - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`)
417 | - React-RCTText (from `../node_modules/react-native/Libraries/Text`)
418 | - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`)
419 | - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
420 | - RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
421 | - RNReanimated (from `../node_modules/react-native-reanimated`)
422 | - RNScreens (from `../node_modules/react-native-screens`)
423 | - UMAppLoader (from `../node_modules/unimodules-app-loader/ios`)
424 | - UMBarCodeScannerInterface (from `../node_modules/unimodules-barcode-scanner-interface/ios`)
425 | - UMCameraInterface (from `../node_modules/unimodules-camera-interface/ios`)
426 | - UMConstantsInterface (from `../node_modules/unimodules-constants-interface/ios`)
427 | - "UMCore (from `../node_modules/@unimodules/core/ios`)"
428 | - UMFaceDetectorInterface (from `../node_modules/unimodules-face-detector-interface/ios`)
429 | - UMFileSystemInterface (from `../node_modules/unimodules-file-system-interface/ios`)
430 | - UMFontInterface (from `../node_modules/unimodules-font-interface/ios`)
431 | - UMImageLoaderInterface (from `../node_modules/unimodules-image-loader-interface/ios`)
432 | - UMPermissionsInterface (from `../node_modules/unimodules-permissions-interface/ios`)
433 | - "UMReactNativeAdapter (from `../node_modules/@unimodules/react-native-adapter/ios`)"
434 | - UMSensorsInterface (from `../node_modules/unimodules-sensors-interface/ios`)
435 | - UMTaskManagerInterface (from `../node_modules/unimodules-task-manager-interface/ios`)
436 | - Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
437 |
438 | SPEC REPOS:
439 | trunk:
440 | - boost-for-react-native
441 | - CocoaAsyncSocket
442 | - CocoaLibEvent
443 | - Flipper
444 | - Flipper-DoubleConversion
445 | - Flipper-Folly
446 | - Flipper-Glog
447 | - Flipper-PeerTalk
448 | - Flipper-RSocket
449 | - FlipperKit
450 | - OpenSSL-Universal
451 | - YogaKit
452 |
453 | EXTERNAL SOURCES:
454 | DoubleConversion:
455 | :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
456 | EXConstants:
457 | :path: "../node_modules/expo-constants/ios"
458 | EXErrorRecovery:
459 | :path: "../node_modules/expo-error-recovery/ios"
460 | EXFileSystem:
461 | :path: "../node_modules/expo-file-system/ios"
462 | EXFont:
463 | :path: "../node_modules/expo-font/ios"
464 | EXImageLoader:
465 | :path: "../node_modules/expo-image-loader/ios"
466 | EXKeepAwake:
467 | :path: "../node_modules/expo-keep-awake/ios"
468 | EXLinearGradient:
469 | :path: "../node_modules/expo-linear-gradient/ios"
470 | EXLocation:
471 | :path: "../node_modules/expo-location/ios"
472 | EXPermissions:
473 | :path: "../node_modules/expo-permissions/ios"
474 | EXSplashScreen:
475 | :path: "../node_modules/expo-splash-screen/ios"
476 | EXSQLite:
477 | :path: "../node_modules/expo-sqlite/ios"
478 | EXUpdates:
479 | :path: "../node_modules/expo-updates/ios"
480 | FBLazyVector:
481 | :path: "../node_modules/react-native/Libraries/FBLazyVector"
482 | FBReactNativeSpec:
483 | :path: "../node_modules/react-native/Libraries/FBReactNativeSpec"
484 | Folly:
485 | :podspec: "../node_modules/react-native/third-party-podspecs/Folly.podspec"
486 | glog:
487 | :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
488 | RCTRequired:
489 | :path: "../node_modules/react-native/Libraries/RCTRequired"
490 | RCTTypeSafety:
491 | :path: "../node_modules/react-native/Libraries/TypeSafety"
492 | React:
493 | :path: "../node_modules/react-native/"
494 | React-callinvoker:
495 | :path: "../node_modules/react-native/ReactCommon/callinvoker"
496 | React-Core:
497 | :path: "../node_modules/react-native/"
498 | React-CoreModules:
499 | :path: "../node_modules/react-native/React/CoreModules"
500 | React-cxxreact:
501 | :path: "../node_modules/react-native/ReactCommon/cxxreact"
502 | React-jsi:
503 | :path: "../node_modules/react-native/ReactCommon/jsi"
504 | React-jsiexecutor:
505 | :path: "../node_modules/react-native/ReactCommon/jsiexecutor"
506 | React-jsinspector:
507 | :path: "../node_modules/react-native/ReactCommon/jsinspector"
508 | React-RCTActionSheet:
509 | :path: "../node_modules/react-native/Libraries/ActionSheetIOS"
510 | React-RCTAnimation:
511 | :path: "../node_modules/react-native/Libraries/NativeAnimation"
512 | React-RCTBlob:
513 | :path: "../node_modules/react-native/Libraries/Blob"
514 | React-RCTImage:
515 | :path: "../node_modules/react-native/Libraries/Image"
516 | React-RCTLinking:
517 | :path: "../node_modules/react-native/Libraries/LinkingIOS"
518 | React-RCTNetwork:
519 | :path: "../node_modules/react-native/Libraries/Network"
520 | React-RCTSettings:
521 | :path: "../node_modules/react-native/Libraries/Settings"
522 | React-RCTText:
523 | :path: "../node_modules/react-native/Libraries/Text"
524 | React-RCTVibration:
525 | :path: "../node_modules/react-native/Libraries/Vibration"
526 | ReactCommon:
527 | :path: "../node_modules/react-native/ReactCommon"
528 | RNGestureHandler:
529 | :path: "../node_modules/react-native-gesture-handler"
530 | RNReanimated:
531 | :path: "../node_modules/react-native-reanimated"
532 | RNScreens:
533 | :path: "../node_modules/react-native-screens"
534 | UMAppLoader:
535 | :path: "../node_modules/unimodules-app-loader/ios"
536 | UMBarCodeScannerInterface:
537 | :path: "../node_modules/unimodules-barcode-scanner-interface/ios"
538 | UMCameraInterface:
539 | :path: "../node_modules/unimodules-camera-interface/ios"
540 | UMConstantsInterface:
541 | :path: "../node_modules/unimodules-constants-interface/ios"
542 | UMCore:
543 | :path: "../node_modules/@unimodules/core/ios"
544 | UMFaceDetectorInterface:
545 | :path: "../node_modules/unimodules-face-detector-interface/ios"
546 | UMFileSystemInterface:
547 | :path: "../node_modules/unimodules-file-system-interface/ios"
548 | UMFontInterface:
549 | :path: "../node_modules/unimodules-font-interface/ios"
550 | UMImageLoaderInterface:
551 | :path: "../node_modules/unimodules-image-loader-interface/ios"
552 | UMPermissionsInterface:
553 | :path: "../node_modules/unimodules-permissions-interface/ios"
554 | UMReactNativeAdapter:
555 | :path: "../node_modules/@unimodules/react-native-adapter/ios"
556 | UMSensorsInterface:
557 | :path: "../node_modules/unimodules-sensors-interface/ios"
558 | UMTaskManagerInterface:
559 | :path: "../node_modules/unimodules-task-manager-interface/ios"
560 | Yoga:
561 | :path: "../node_modules/react-native/ReactCommon/yoga"
562 |
563 | SPEC CHECKSUMS:
564 | boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
565 | CocoaAsyncSocket: 694058e7c0ed05a9e217d1b3c7ded962f4180845
566 | CocoaLibEvent: 2fab71b8bd46dd33ddb959f7928ec5909f838e3f
567 | DoubleConversion: cde416483dac037923206447da6e1454df403714
568 | EXConstants: f486f6b4a36b86e47ab258d4d2b7b2699786fdce
569 | EXErrorRecovery: 16696fe023fb46a32c3b09033abc361cfcf150a7
570 | EXFileSystem: afe9b1fd937d30270bf5108ba44e2f4a1d1ad694
571 | EXFont: a6a4353271395f3bb4ee528b52a5035b4b0e412a
572 | EXImageLoader: 7153fb1307ac643299a9072b71da0d276f4c7789
573 | EXKeepAwake: 76eed36786534f6a476748e600fa6faf07ac3d09
574 | EXLinearGradient: c7ca1c2933ac240ffbc805c014a72947e227ac75
575 | EXLocation: 90232c6f2773b04a3c146bfda9f181035722c10a
576 | EXPermissions: 30cbe5b72bd209b65c00884180ad058a60bb413d
577 | EXSplashScreen: 7ea40b8524f27e7444e3892411c8a4782ab6b4ce
578 | EXSQLite: d0d8677c13e60d5db2812387f059c697be27d3fb
579 | EXUpdates: 74b39409f68eca207075d87b0077bdf37865a8bf
580 | FBLazyVector: 3bb422f41b18121b71783a905c10e58606f7dc3e
581 | FBReactNativeSpec: f2c97f2529dd79c083355182cc158c9f98f4bd6e
582 | Flipper: be611d4b742d8c87fbae2ca5f44603a02539e365
583 | Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41
584 | Flipper-Folly: c12092ea368353b58e992843a990a3225d4533c3
585 | Flipper-Glog: 1dfd6abf1e922806c52ceb8701a3599a79a200a6
586 | Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9
587 | Flipper-RSocket: 64e7431a55835eb953b0bf984ef3b90ae9fdddd7
588 | FlipperKit: ab353d41aea8aae2ea6daaf813e67496642f3d7d
589 | Folly: b73c3869541e86821df3c387eb0af5f65addfab4
590 | glog: 40a13f7840415b9a77023fbcae0f1e6f43192af3
591 | OpenSSL-Universal: 8b48cc0d10c1b2923617dfe5c178aa9ed2689355
592 | RCTRequired: 082f10cd3f905d6c124597fd1c14f6f2655ff65e
593 | RCTTypeSafety: 8c9c544ecbf20337d069e4ae7fd9a377aadf504b
594 | React: b0a957a2c44da4113b0c4c9853d8387f8e64e615
595 | React-callinvoker: c3f44dd3cb195b6aa46621fff95ded79d59043fe
596 | React-Core: d3b2a1ac9a2c13c3bcde712d9281fc1c8a5b315b
597 | React-CoreModules: 0581ff36cb797da0943d424f69e7098e43e9be60
598 | React-cxxreact: c1480d4fda5720086c90df537ee7d285d4c57ac3
599 | React-jsi: a0418934cf48f25b485631deb27c64dc40fb4c31
600 | React-jsiexecutor: 93bd528844ad21dc07aab1c67cb10abae6df6949
601 | React-jsinspector: 58aef7155bc9a9683f5b60b35eccea8722a4f53a
602 | React-RCTActionSheet: 89a0ca9f4a06c1f93c26067af074ccdce0f40336
603 | React-RCTAnimation: 1bde3ecc0c104c55df246eda516e0deb03c4e49b
604 | React-RCTBlob: a97d378b527740cc667e03ebfa183a75231ab0f0
605 | React-RCTImage: c1b1f2d3f43a4a528c8946d6092384b5c880d2f0
606 | React-RCTLinking: 35ae4ab9dc0410d1fcbdce4d7623194a27214fb2
607 | React-RCTNetwork: 29ec2696f8d8cfff7331fac83d3e893c95ef43ae
608 | React-RCTSettings: 60f0691bba2074ef394f95d4c2265ec284e0a46a
609 | React-RCTText: 5c51df3f08cb9dedc6e790161195d12bac06101c
610 | React-RCTVibration: ae4f914cfe8de7d4de95ae1ea6cc8f6315d73d9d
611 | ReactCommon: 73d79c7039f473b76db6ff7c6b159c478acbbb3b
612 | RNGestureHandler: b6b359bb800ae399a9c8b27032bdbf7c18f08a08
613 | RNReanimated: 514a11da3a2bcc6c3dfd9de32b38e2b9bf101926
614 | RNScreens: b748efec66e095134c7166ca333b628cd7e6f3e2
615 | UMAppLoader: 5db5dc03176c6238da9c8b3657a370137882a4ad
616 | UMBarCodeScannerInterface: 017672479f93de88d94c3a50dfb66b5348b65989
617 | UMCameraInterface: 22bd2c4bf15dcf68530368fa5704af7490818457
618 | UMConstantsInterface: ff612789417aace6fd01a9c35616bc87dcdc8d97
619 | UMCore: 94e4725ab2efbbe247b5910a2a954a2dab64f7eb
620 | UMFaceDetectorInterface: 9bc6a197ad9d4d16ba13bfdf2340dd7f24964308
621 | UMFileSystemInterface: e7795274eee76beaadaf6015bcc7f5da3054b925
622 | UMFontInterface: bc5dd878b2f6fffdac80e41fd36893c619683712
623 | UMImageLoaderInterface: 78ab0fd45c2bcaee61957fa23858bf31f2bcb122
624 | UMPermissionsInterface: 4f21b0c2aaf953cf041109ff44231b2a69e22836
625 | UMReactNativeAdapter: 61ae88818058b7849bbf5b79bf97872cb3c8e0eb
626 | UMSensorsInterface: 49bea41dcfcc041f0bbab27cfe4a6006f1dde0c0
627 | UMTaskManagerInterface: 6cad5929dbc0a5b986ad4d77caac497d4de730a7
628 | Yoga: 4bd86afe9883422a7c4028c00e34790f560923d6
629 | YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
630 |
631 | PODFILE CHECKSUM: 6085fe48976ac0753f4023545483f99001329fde
632 |
633 | COCOAPODS: 1.10.0
634 |
--------------------------------------------------------------------------------