Skip to content

Commit 80e61b9

Browse files
committed
Upgrade react native to 0.53 on Example app
1 parent f71a0b5 commit 80e61b9

16 files changed

Lines changed: 7644 additions & 106 deletions

File tree

Example/.flowconfig

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,19 @@
1212
; For RN Apps installed via npm, "Libraries" folder is inside
1313
; "node_modules/react-native" but in the source repo it is in the root
1414
.*/Libraries/react-native/React.js
15-
.*/Libraries/react-native/ReactNative.js
15+
16+
; Ignore polyfills
17+
.*/Libraries/polyfills/.*
18+
19+
; Ignore metro
20+
.*/node_modules/metro/.*
1621

1722
[include]
1823

1924
[libs]
2025
node_modules/react-native/Libraries/react-native/react-native-interface.js
21-
node_modules/react-native/flow
22-
flow/
26+
node_modules/react-native/flow/
27+
node_modules/react-native/flow-github/
2328

2429
[options]
2530
emoji=true
@@ -30,16 +35,20 @@ munge_underscores=true
3035

3136
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
3237

38+
module.file_ext=.js
39+
module.file_ext=.jsx
40+
module.file_ext=.json
41+
module.file_ext=.native.js
42+
3343
suppress_type=$FlowIssue
3444
suppress_type=$FlowFixMe
35-
suppress_type=$FixMe
45+
suppress_type=$FlowFixMeProps
46+
suppress_type=$FlowFixMeState
3647

37-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-9]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
38-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-9]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
48+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
49+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
3950
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
4051
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
4152

42-
unsafe.enable_getters_and_setters=true
43-
4453
[version]
45-
^0.49.1
54+
^0.63.0

Example/.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ buck-out/
4646
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
4747
# screenshots whenever they are needed.
4848
# For more information about the recommended setup visit:
49-
# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
49+
# https://docs.fastlane.tools/best-practices/source-control/
5050

51-
fastlane/report.xml
52-
fastlane/Preview.html
53-
fastlane/screenshots
51+
*/fastlane/report.xml
52+
*/fastlane/Preview.html
53+
*/fastlane/screenshots
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
import React, { Component } from 'react';
88
import {
9-
AppRegistry,
109
Modal,
1110
StyleSheet,
1211
Text,
@@ -16,11 +15,12 @@ import {
1615
View
1716
} from 'react-native';
1817

19-
var wifi = require('react-native-android-wifi');
18+
import wifi from 'react-native-android-wifi';
2019

21-
export default class Example extends Component {
22-
23-
componentWillMount(){
20+
type Props = {};
21+
export default class App extends Component<Props> {
22+
constructor(props){
23+
super(props);
2424
this.state = {
2525
isWifiNetworkEnabled: null,
2626
ssid: null,
@@ -289,5 +289,3 @@ const styles = StyleSheet.create({
289289
marginTop: 5,
290290
}
291291
});
292-
293-
AppRegistry.registerComponent('Example', () => Example);
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import 'react-native';
22
import React from 'react';
3-
import Index from '../index.ios.js';
3+
import App from '../App';
44

55
// Note: test renderer must be required after react-native.
66
import renderer from 'react-test-renderer';
77

88
it('renders correctly', () => {
99
const tree = renderer.create(
10-
<Index />
10+
<App />
1111
);
1212
});

Example/__tests__/index.android.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

Example/android/app/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ import com.android.build.OutputFile
7272
* ]
7373
*/
7474

75+
project.ext.react = [
76+
entryFile: "index.js"
77+
]
78+
7579
apply from: "../../node_modules/react-native/react.gradle"
7680

7781
/**

Example/android/app/src/main/java/com/example/MainApplication.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ protected List<ReactPackage> getPackages() {
2727
new AndroidWifiPackage()
2828
);
2929
}
30+
31+
@Override
32+
protected String getJSMainModuleName() {
33+
return "index";
34+
}
3035
};
3136

3237
@Override

Example/index.ios.js

Lines changed: 0 additions & 53 deletions
This file was deleted.

Example/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { AppRegistry } from 'react-native';
2+
import App from './App';
3+
4+
AppRegistry.registerComponent('Example', () => App);

Example/ios/Example.xcodeproj/project.pbxproj

Lines changed: 62 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@
2525
2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
2626
2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
2727
2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
28-
2D02E4C21E0B4AEC006451C7 /* libRCTAnimation-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */; };
28+
2D02E4C21E0B4AEC006451C7 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */; };
2929
2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */; };
3030
2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */; };
3131
2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */; };
3232
2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */; };
3333
2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */; };
3434
2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */; };
35-
2D02E4C91E0B4AEC006451C7 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact.a */; };
35+
2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D16E6891FA4F8E400B85C8A /* libReact.a */; };
3636
2DCD954D1E0B4F2C00145EB5 /* ExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* ExampleTests.m */; };
3737
5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; };
3838
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
@@ -110,6 +110,27 @@
110110
remoteGlobalIDString = 2D02E47A1E0B4A5D006451C7;
111111
remoteInfo = "Example-tvOS";
112112
};
113+
2D16E6711FA4F8DC00B85C8A /* PBXContainerItemProxy */ = {
114+
isa = PBXContainerItemProxy;
115+
containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */;
116+
proxyType = 2;
117+
remoteGlobalIDString = ADD01A681E09402E00F6D226;
118+
remoteInfo = "RCTBlob-tvOS";
119+
};
120+
2D16E6831FA4F8DC00B85C8A /* PBXContainerItemProxy */ = {
121+
isa = PBXContainerItemProxy;
122+
containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
123+
proxyType = 2;
124+
remoteGlobalIDString = 3DBE0D001F3B181A0099AA32;
125+
remoteInfo = fishhook;
126+
};
127+
2D16E6851FA4F8DC00B85C8A /* PBXContainerItemProxy */ = {
128+
isa = PBXContainerItemProxy;
129+
containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
130+
proxyType = 2;
131+
remoteGlobalIDString = 3DBE0D0D1F3B181C0099AA32;
132+
remoteInfo = "fishhook-tvOS";
133+
};
113134
3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */ = {
114135
isa = PBXContainerItemProxy;
115136
containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
@@ -260,6 +281,7 @@
260281
146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = "<group>"; };
261282
2D02E47B1E0B4A5D006451C7 /* Example-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Example-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
262283
2D02E4901E0B4A5D006451C7 /* Example-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Example-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
284+
2D16E6891FA4F8E400B85C8A /* libReact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libReact.a; sourceTree = BUILT_PRODUCTS_DIR; };
263285
5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = "<group>"; };
264286
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
265287
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; };
@@ -299,8 +321,8 @@
299321
isa = PBXFrameworksBuildPhase;
300322
buildActionMask = 2147483647;
301323
files = (
302-
2D02E4C91E0B4AEC006451C7 /* libReact.a in Frameworks */,
303-
2D02E4C21E0B4AEC006451C7 /* libRCTAnimation-tvOS.a in Frameworks */,
324+
2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */,
325+
2D02E4C21E0B4AEC006451C7 /* libRCTAnimation.a in Frameworks */,
304326
2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */,
305327
2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */,
306328
2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */,
@@ -393,6 +415,8 @@
393415
children = (
394416
139FDEF41B06529B00C62182 /* libRCTWebSocket.a */,
395417
3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */,
418+
2D16E6841FA4F8DC00B85C8A /* libfishhook.a */,
419+
2D16E6861FA4F8DC00B85C8A /* libfishhook-tvOS.a */,
396420
);
397421
name = Products;
398422
sourceTree = "<group>";
@@ -415,7 +439,6 @@
415439
isa = PBXGroup;
416440
children = (
417441
146834041AC3E56700842450 /* libReact.a */,
418-
3DAD3EA31DF850E9000B6D8A /* libReact.a */,
419442
3DAD3EA51DF850E9000B6D8A /* libyoga.a */,
420443
3DAD3EA71DF850E9000B6D8A /* libyoga.a */,
421444
3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */,
@@ -427,11 +450,19 @@
427450
name = Products;
428451
sourceTree = "<group>";
429452
};
453+
2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
454+
isa = PBXGroup;
455+
children = (
456+
2D16E6891FA4F8E400B85C8A /* libReact.a */,
457+
);
458+
name = Frameworks;
459+
sourceTree = "<group>";
460+
};
430461
5E91572E1DD0AC6500FF2AA8 /* Products */ = {
431462
isa = PBXGroup;
432463
children = (
433464
5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */,
434-
5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */,
465+
5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */,
435466
);
436467
name = Products;
437468
sourceTree = "<group>";
@@ -480,6 +511,7 @@
480511
832341AE1AAA6A7D00B99B32 /* Libraries */,
481512
00E356EF1AD99517003FC87E /* ExampleTests */,
482513
83CBBA001A601CBA00E9B192 /* Products */,
514+
2D16E6871FA4F8E400B85C8A /* Frameworks */,
483515
);
484516
indentWidth = 2;
485517
sourceTree = "<group>";
@@ -501,6 +533,7 @@
501533
isa = PBXGroup;
502534
children = (
503535
ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */,
536+
2D16E6721FA4F8DC00B85C8A /* libRCTBlob-tvOS.a */,
504537
);
505538
name = Products;
506539
sourceTree = "<group>";
@@ -732,6 +765,27 @@
732765
remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */;
733766
sourceTree = BUILT_PRODUCTS_DIR;
734767
};
768+
2D16E6721FA4F8DC00B85C8A /* libRCTBlob-tvOS.a */ = {
769+
isa = PBXReferenceProxy;
770+
fileType = archive.ar;
771+
path = "libRCTBlob-tvOS.a";
772+
remoteRef = 2D16E6711FA4F8DC00B85C8A /* PBXContainerItemProxy */;
773+
sourceTree = BUILT_PRODUCTS_DIR;
774+
};
775+
2D16E6841FA4F8DC00B85C8A /* libfishhook.a */ = {
776+
isa = PBXReferenceProxy;
777+
fileType = archive.ar;
778+
path = libfishhook.a;
779+
remoteRef = 2D16E6831FA4F8DC00B85C8A /* PBXContainerItemProxy */;
780+
sourceTree = BUILT_PRODUCTS_DIR;
781+
};
782+
2D16E6861FA4F8DC00B85C8A /* libfishhook-tvOS.a */ = {
783+
isa = PBXReferenceProxy;
784+
fileType = archive.ar;
785+
path = "libfishhook-tvOS.a";
786+
remoteRef = 2D16E6851FA4F8DC00B85C8A /* PBXContainerItemProxy */;
787+
sourceTree = BUILT_PRODUCTS_DIR;
788+
};
735789
3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */ = {
736790
isa = PBXReferenceProxy;
737791
fileType = archive.ar;
@@ -830,10 +884,10 @@
830884
remoteRef = 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */;
831885
sourceTree = BUILT_PRODUCTS_DIR;
832886
};
833-
5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */ = {
887+
5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */ = {
834888
isa = PBXReferenceProxy;
835889
fileType = archive.ar;
836-
path = "libRCTAnimation-tvOS.a";
890+
path = libRCTAnimation.a;
837891
remoteRef = 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */;
838892
sourceTree = BUILT_PRODUCTS_DIR;
839893
};

0 commit comments

Comments
 (0)