Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

Use react-native-screens #168

Merged
merged 2 commits into from
Sep 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ configurations.all {
dependencies {
compile project(':react-native-gesture-handler')
compile project(':react-native-open-settings')
compile project(':react-native-screens')
compile project(':react-native-config')
compile project(':react-native-svg')
compile project(':@ledgerhq_react-native-hid')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

import android.os.Bundle;

import com.facebook.react.ReactActivity;
import com.facebook.react.ReactFragmentActivity;

import org.devio.rn.splashscreen.SplashScreen;
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.ReactRootView;
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;


public class MainActivity extends ReactActivity {
public class MainActivity extends ReactFragmentActivity {

/**
* Returns the name of the main component registered from JavaScript.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.facebook.react.ReactApplication;
import com.swmansion.gesturehandler.react.RNGestureHandlerPackage;
import com.opensettings.OpenSettingsPackage;
import com.swmansion.rnscreens.RNScreenPackage;
import com.lugg.ReactNativeConfig.ReactNativeConfigPackage;
import com.horcrux.svg.SvgPackage;
import com.ledgerwallet.hid.ReactHIDPackage;
Expand Down Expand Up @@ -36,6 +37,7 @@ protected List<ReactPackage> getPackages() {
new MainReactPackage(),
new RNGestureHandlerPackage(),
new OpenSettingsPackage(),
new RNScreenPackage(),
new ReactNativeConfigPackage(),
new SvgPackage(),
new ReactHIDPackage(),
Expand Down
2 changes: 2 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ include ':react-native-gesture-handler'
project(':react-native-gesture-handler').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-gesture-handler/android')
include ':react-native-open-settings'
project(':react-native-open-settings').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-open-settings/android')
include ':react-native-screens'
project(':react-native-screens').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-screens/android')
include ':react-native-config'
project(':react-native-config').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-config/android')
include ':react-native-svg'
Expand Down
36 changes: 36 additions & 0 deletions ios/ledgerlivemobile.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
D38D9E8A1BA34222AFFD6469 /* Octicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = C3CB4695C9554CACBA1EDD1F /* Octicons.ttf */; };
D5C1F1874ECE48F4AA5693AF /* MuseoSans-SemiBold.otf in Resources */ = {isa = PBXBuildFile; fileRef = CEDB8CDC561E4D4BBA7A64CD /* MuseoSans-SemiBold.otf */; };
DEF1B1546B36491B9894A599 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 545FD04868AD450083DC4717 /* libz.tbd */; };
FD935BBB77A24B79B2604726 /* libRNScreens.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 35AA9FCF9B3A4E54A2282A09 /* libRNScreens.a */; };
FEA0D6AE27DE42709BBB7FC7 /* Foundation.ttf in Resources */ = {isa = PBXBuildFile; fileRef = CD5489262AA84BDF9684E3AA /* Foundation.ttf */; };
/* End PBXBuildFile section */

Expand Down Expand Up @@ -165,6 +166,13 @@
remoteGlobalIDString = 3DBE0D0D1F3B181C0099AA32;
remoteInfo = "fishhook-tvOS";
};
34532BFD2159525400CA371F /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1A6A2D21459F426EA996EA88 /* RNScreens.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 134814201AA4EA6300B7C361;
remoteInfo = RNScreens;
};
345C15652089152000A0E797 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = EE89361C161C48FB98136880 /* PasscodeAuth.xcodeproj */;
Expand Down Expand Up @@ -446,9 +454,11 @@
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = ledgerlivemobile/Info.plist; sourceTree = "<group>"; };
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ledgerlivemobile/main.m; sourceTree = "<group>"; };
146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = "<group>"; };
1A6A2D21459F426EA996EA88 /* RNScreens.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNScreens.xcodeproj; path = "../node_modules/react-native-screens/ios/RNScreens.xcodeproj"; sourceTree = "<group>"; };
2CB99C7AA791411C87B310E9 /* ReactNativeConfig.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = ReactNativeConfig.xcodeproj; path = "../node_modules/react-native-config/ios/ReactNativeConfig.xcodeproj"; sourceTree = "<group>"; };
3263CCC7104E4B86AC2ADDB4 /* MuseoSans-Regular.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "MuseoSans-Regular.otf"; path = "../assets/fonts/MuseoSans-Regular.otf"; sourceTree = "<group>"; };
349F66542045ADCC002149B4 /* RNCamera.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNCamera.xcodeproj; path = "../node_modules/react-native-camera/ios/RNCamera.xcodeproj"; sourceTree = "<group>"; };
35AA9FCF9B3A4E54A2282A09 /* libRNScreens.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNScreens.a; sourceTree = "<group>"; };
3A45C4CF346C4C9594B2EC36 /* libRNVectorIcons.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNVectorIcons.a; sourceTree = "<group>"; };
3E46E77C7D524ECDB200DA38 /* RNGestureHandler.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNGestureHandler.xcodeproj; path = "../node_modules/react-native-gesture-handler/ios/RNGestureHandler.xcodeproj"; sourceTree = "<group>"; };
4396DC4264644851ADA99A35 /* MaterialCommunityIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = MaterialCommunityIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -546,6 +556,7 @@
139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
DEF1B1546B36491B9894A599 /* libz.tbd in Frameworks */,
7EDEA35621D64751B73F49C7 /* libReact Native Open Settings.a in Frameworks */,
FD935BBB77A24B79B2604726 /* libRNScreens.a in Frameworks */,
C1E2A1AC36C040B689A72E76 /* libRNGestureHandler.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -693,10 +704,19 @@
3A45C4CF346C4C9594B2EC36 /* libRNVectorIcons.a */,
88F6163E74364066BC1A5713 /* libReact Native Open Settings.a */,
76B12D3F99F7436CAD186C2C /* libRNGestureHandler.a */,
35AA9FCF9B3A4E54A2282A09 /* libRNScreens.a */,
);
name = "Recovered References";
sourceTree = "<group>";
};
34532BFA2159525400CA371F /* Products */ = {
isa = PBXGroup;
children = (
34532BFE2159525400CA371F /* libRNScreens.a */,
);
name = Products;
sourceTree = "<group>";
};
345C15612089152000A0E797 /* Products */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -825,6 +845,7 @@
EE89361C161C48FB98136880 /* PasscodeAuth.xcodeproj */,
4AD2AECC687D45E9BBCCED05 /* RNVectorIcons.xcodeproj */,
A49125B8906C40DFB2011F37 /* React Native Open Settings.xcodeproj */,
1A6A2D21459F426EA996EA88 /* RNScreens.xcodeproj */,
3E46E77C7D524ECDB200DA38 /* RNGestureHandler.xcodeproj */,
);
name = Libraries;
Expand Down Expand Up @@ -1068,6 +1089,10 @@
ProductGroup = 34DE44012155286100259C93 /* Products */;
ProjectRef = 3E46E77C7D524ECDB200DA38 /* RNGestureHandler.xcodeproj */;
},
{
ProductGroup = 34532BFA2159525400CA371F /* Products */;
ProjectRef = 1A6A2D21459F426EA996EA88 /* RNScreens.xcodeproj */;
},
{
ProductGroup = 347AB1EC2049885900BE6F60 /* Products */;
ProjectRef = 64C6A31B337D471B93E32DCD /* RNSentry.xcodeproj */;
Expand Down Expand Up @@ -1182,6 +1207,13 @@
remoteRef = 34457ED02003A12500415724 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
34532BFE2159525400CA371F /* libRNScreens.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRNScreens.a;
remoteRef = 34532BFD2159525400CA371F /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
345C15662089152000A0E797 /* libPasscodeAuth.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
Expand Down Expand Up @@ -1593,6 +1625,7 @@
"$(SRCROOT)/../node_modules/@ledgerhq/react-native-passcode-auth",
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
"$(SRCROOT)/../node_modules/react-native-open-settings",
"$(SRCROOT)/../node_modules/react-native-screens/ios",
"$(SRCROOT)/../node_modules/react-native-gesture-handler/ios/**",
);
INFOPLIST_FILE = ledgerlivemobileTests/Info.plist;
Expand Down Expand Up @@ -1634,6 +1667,7 @@
"$(SRCROOT)/../node_modules/@ledgerhq/react-native-passcode-auth",
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
"$(SRCROOT)/../node_modules/react-native-open-settings",
"$(SRCROOT)/../node_modules/react-native-screens/ios",
"$(SRCROOT)/../node_modules/react-native-gesture-handler/ios/**",
);
INFOPLIST_FILE = ledgerlivemobileTests/Info.plist;
Expand Down Expand Up @@ -1679,6 +1713,7 @@
"$(SRCROOT)/../node_modules/@ledgerhq/react-native-passcode-auth",
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
"$(SRCROOT)/../node_modules/react-native-open-settings",
"$(SRCROOT)/../node_modules/react-native-screens/ios",
"$(SRCROOT)/../node_modules/react-native-gesture-handler/ios/**",
);
INFOPLIST_FILE = ledgerlivemobile/Info.plist;
Expand Down Expand Up @@ -1721,6 +1756,7 @@
"$(SRCROOT)/../node_modules/@ledgerhq/react-native-passcode-auth",
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
"$(SRCROOT)/../node_modules/react-native-open-settings",
"$(SRCROOT)/../node_modules/react-native-screens/ios",
"$(SRCROOT)/../node_modules/react-native-gesture-handler/ios/**",
);
INFOPLIST_FILE = ledgerlivemobile/Info.plist;
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,14 @@
"react-native-open-settings": "^1.0.1",
"react-native-progress": "^3.5.0",
"react-native-qrcode-svg": "5.1.0",
"react-native-screens": "^1.0.0-alpha.11",
"react-native-sentry": "0.39.0",
"react-native-simple-store": "1.3.0",
"react-native-splash-screen": "3.1.1",
"react-native-svg": "6.5.2",
"react-native-touch-id": "4.0.4",
"react-native-vector-icons": "^5.0.0",
"react-navigation": "2.9.3",
"react-navigation": "2.14.2",
"react-navigation-tabs": "^0.6.0",
"react-redux": "5.0.7",
"redux": "4.0.0",
Expand Down
3 changes: 3 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import "./polyfill"; /* eslint-disable import/first */
import React, { Component } from "react";
import { StyleSheet, View } from "react-native";
import { useScreens } from "react-native-screens";
import SplashScreen from "react-native-splash-screen";
import { exportSelector as settingsExportSelector } from "./reducers/settings";
import { exportSelector as accountsExportSelector } from "./reducers/accounts";
Expand All @@ -18,6 +19,8 @@ import StyledStatusBar from "./components/StyledStatusBar";
import { BridgeSyncProvider } from "./bridge/BridgeSyncContext";
import DBSave from "./components/DBSave";

useScreens();

const styles = StyleSheet.create({
root: {
flex: 1,
Expand Down
48 changes: 29 additions & 19 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2450,7 +2450,7 @@ create-react-class@^15.5.2, create-react-class@^15.5.3, create-react-class@^15.6
loose-envify "^1.3.1"
object-assign "^4.1.1"

[email protected], create-react-context@^0.2.1:
[email protected]:
version "0.2.2"
resolved "https://registry.yarnpkg.com/create-react-context/-/create-react-context-0.2.2.tgz#9836542f9aaa22868cd7d4a6f82667df38019dca"
dependencies:
Expand Down Expand Up @@ -6722,17 +6722,21 @@ [email protected]:
prop-types "^15.5.10"
qrcode "^1.2.0"

react-native-safe-area-view@^0.10.0:
version "0.10.0"
resolved "https://registry.yarnpkg.com/react-native-safe-area-view/-/react-native-safe-area-view-0.10.0.tgz#e8e9228d22698c0f82ad1202d24a4e4977260489"
dependencies:
hoist-non-react-statics "^2.3.1"

react-native-safe-area-view@^0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/react-native-safe-area-view/-/react-native-safe-area-view-0.7.0.tgz#38f5ab9368d6ef9e5d18ab64212938af3ec39421"
dependencies:
hoist-non-react-statics "^2.3.1"

react-native-safe-area-view@^0.8.0:
version "0.8.0"
resolved "https://registry.yarnpkg.com/react-native-safe-area-view/-/react-native-safe-area-view-0.8.0.tgz#22d78cb8e8658d04a10cd53c1546e0bc86cb7aea"
dependencies:
hoist-non-react-statics "^2.3.1"
react-native-screens@^1.0.0-alpha.10, react-native-screens@^1.0.0-alpha.11:
version "1.0.0-alpha.11"
resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-1.0.0-alpha.11.tgz#4f4faeb5607b1e08cc70d76a04c2f8da0b241200"

[email protected]:
version "0.39.0"
Expand Down Expand Up @@ -6845,20 +6849,25 @@ [email protected]:
dependencies:
react-native-tab-view "^0.0.77"

react-navigation-drawer@0.4.3:
version "0.4.3"
resolved "https://registry.yarnpkg.com/react-navigation-drawer/-/react-navigation-drawer-0.4.3.tgz#c04c94e2429b7e724801af05bd0a93a79cb27f71"
react-navigation-drawer@0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/react-navigation-drawer/-/react-navigation-drawer-0.5.0.tgz#d91b6a6ec65c34ba78c00f814b1e6508922cc9ec"
dependencies:
react-native-drawer-layout-polyfill "^1.3.2"

react-navigation-tabs@0.5.1:
react-navigation-stack@0.5.1:
version "0.5.1"
resolved "https://registry.yarnpkg.com/react-navigation-tabs/-/react-navigation-tabs-0.5.1.tgz#ed33bce3a3e21b92646700de25bd94b8fc570371"
resolved "https://registry.yarnpkg.com/react-navigation-stack/-/react-navigation-stack-0.5.1.tgz#acc3c84c7b5209c7d89380d7f4576f17624f683c"
dependencies:
react-native-screens "^1.0.0-alpha.10"

[email protected]:
version "0.7.0"
resolved "https://registry.yarnpkg.com/react-navigation-tabs/-/react-navigation-tabs-0.7.0.tgz#c89d41e501043f7fdb38550de85814452c3e6104"
dependencies:
hoist-non-react-statics "^2.5.0"
prop-types "^15.6.1"
react-lifecycles-compat "^3.0.4"
react-native-safe-area-view "^0.7.0"
react-native-tab-view "^1.0.0"

react-navigation-tabs@^0.6.0:
Expand All @@ -6871,20 +6880,21 @@ react-navigation-tabs@^0.6.0:
react-native-safe-area-view "^0.7.0"
react-native-tab-view "^1.0.0"

react-navigation@2.9.3:
version "2.9.3"
resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-2.9.3.tgz#de97f7102df6b836af780bfa5bfa80747148da19"
react-navigation@2.14.2:
version "2.14.2"
resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-2.14.2.tgz#e3c933b15efdc6bcb1e9b014aeacfb2a08997d5b"
dependencies:
clamp "^1.0.1"
create-react-context "^0.2.1"
create-react-context "0.2.2"
hoist-non-react-statics "^2.2.0"
path-to-regexp "^1.7.0"
query-string "^6.1.0"
react-lifecycles-compat "^3"
react-native-safe-area-view "^0.8.0"
react-native-safe-area-view "^0.10.0"
react-navigation-deprecated-tab-navigator "1.3.0"
react-navigation-drawer "0.4.3"
react-navigation-tabs "0.5.1"
react-navigation-drawer "0.5.0"
react-navigation-stack "0.5.1"
react-navigation-tabs "0.7.0"

react-proxy@^1.1.7:
version "1.1.8"
Expand Down