Skip to content

Commit 01dfc57

Browse files
committed
upgrade example react-native version to 0.48.4
1 parent c0981d6 commit 01dfc57

File tree

15 files changed

+841
-263
lines changed

15 files changed

+841
-263
lines changed

example/Basic/.babelrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"presets": ["react-native"]
3-
}
2+
"presets": ["react-native"]
3+
}

example/Basic/.flowconfig

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ emoji=true
2626

2727
module.system=haste
2828

29-
experimental.strict_type_args=true
30-
3129
munge_underscores=true
3230

3331
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'
@@ -36,12 +34,12 @@ suppress_type=$FlowIssue
3634
suppress_type=$FlowFixMe
3735
suppress_type=$FixMe
3836

39-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-0]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
40-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-0]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
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]+
4139
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
4240
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
4341

4442
unsafe.enable_getters_and_setters=true
4543

4644
[version]
47-
^0.40.0
45+
^0.49.1

example/Basic/android/app/build.gradle

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ import com.android.build.OutputFile
3333
* // bundleInPaidRelease: true,
3434
* // bundleInBeta: true,
3535
*
36+
* // whether to disable dev mode in custom build variants (by default only disabled in release)
37+
* // for example: to disable dev mode in the staging build type (if configured)
38+
* devDisabledInStaging: true,
39+
* // The configuration property can be in the following formats
40+
* // 'devDisabledIn${productFlavor}${buildType}'
41+
* // 'devDisabledIn${buildType}'
42+
*
3643
* // the root of your project, i.e. where "package.json" lives
3744
* root: "../../",
3845
*
@@ -58,7 +65,7 @@ import com.android.build.OutputFile
5865
* inputExcludes: ["android/**", "ios/**"],
5966
*
6067
* // override which node gets called and with what additional arguments
61-
* nodeExecutableAndArgs: ["node"]
68+
* nodeExecutableAndArgs: ["node"],
6269
*
6370
* // supply additional arguments to the packager
6471
* extraPackagerArgs: []

example/Basic/android/app/proguard-rules.pro

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@
5050

5151
-dontwarn com.facebook.react.**
5252

53+
# TextLayoutBuilder uses a non-public Android constructor within StaticLayout.
54+
# See libs/proxy/src/main/java/com/facebook/fbui/textlayoutbuilder/proxy for details.
55+
-dontwarn android.text.StaticLayout
56+
5357
# okhttp
5458

5559
-keepattributes Signature

example/Basic/ios/example.xcodeproj/project.pbxproj

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
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 */; };
39+
ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; };
3940
/* End PBXBuildFile section */
4041

4142
/* Begin PBXContainerItemProxy section */
@@ -228,6 +229,13 @@
228229
remoteGlobalIDString = 58B5119B1A9E6C1200147676;
229230
remoteInfo = RCTText;
230231
};
232+
ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */ = {
233+
isa = PBXContainerItemProxy;
234+
containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */;
235+
proxyType = 2;
236+
remoteGlobalIDString = 358F4ED71D1E81A9004DF814;
237+
remoteInfo = RCTBlob;
238+
};
231239
/* End PBXContainerItemProxy section */
232240

233241
/* Begin PBXFileReference section */
@@ -255,6 +263,7 @@
255263
5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = "<group>"; };
256264
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
257265
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; };
266+
ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = "<group>"; };
258267
/* End PBXFileReference section */
259268

260269
/* Begin PBXFrameworksBuildPhase section */
@@ -270,6 +279,8 @@
270279
isa = PBXFrameworksBuildPhase;
271280
buildActionMask = 2147483647;
272281
files = (
282+
ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */,
283+
5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */,
273284
146834051AC3E58100842450 /* libReact.a in Frameworks */,
274285
5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */,
275286
00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */,
@@ -411,6 +422,7 @@
411422
3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */,
412423
3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */,
413424
3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */,
425+
3DAD3EA31DF850E9000B6D8A /* libReact-tvOS.a */,
414426
);
415427
name = Products;
416428
sourceTree = "<group>";
@@ -439,6 +451,7 @@
439451
5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */,
440452
146833FF1AC3E56700842450 /* React.xcodeproj */,
441453
00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */,
454+
ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */,
442455
00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */,
443456
00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */,
444457
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */,
@@ -471,6 +484,7 @@
471484
indentWidth = 2;
472485
sourceTree = "<group>";
473486
tabWidth = 2;
487+
usesTabs = 0;
474488
};
475489
83CBBA001A601CBA00E9B192 /* Products */ = {
476490
isa = PBXGroup;
@@ -483,6 +497,14 @@
483497
name = Products;
484498
sourceTree = "<group>";
485499
};
500+
ADBDB9201DFEBF0600ED6528 /* Products */ = {
501+
isa = PBXGroup;
502+
children = (
503+
ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */,
504+
);
505+
name = Products;
506+
sourceTree = "<group>";
507+
};
486508
/* End PBXGroup section */
487509

488510
/* Begin PBXNativeTarget section */
@@ -602,6 +624,10 @@
602624
ProductGroup = 5E91572E1DD0AC6500FF2AA8 /* Products */;
603625
ProjectRef = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
604626
},
627+
{
628+
ProductGroup = ADBDB9201DFEBF0600ED6528 /* Products */;
629+
ProjectRef = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */;
630+
},
605631
{
606632
ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */;
607633
ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */;
@@ -748,10 +774,10 @@
748774
remoteRef = 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */;
749775
sourceTree = BUILT_PRODUCTS_DIR;
750776
};
751-
3DAD3EA31DF850E9000B6D8A /* libReact.a */ = {
777+
3DAD3EA31DF850E9000B6D8A /* libReact-tvOS.a */ = {
752778
isa = PBXReferenceProxy;
753779
fileType = archive.ar;
754-
path = libReact.a;
780+
path = "libReact-tvOS.a";
755781
remoteRef = 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */;
756782
sourceTree = BUILT_PRODUCTS_DIR;
757783
};
@@ -825,6 +851,13 @@
825851
remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */;
826852
sourceTree = BUILT_PRODUCTS_DIR;
827853
};
854+
ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */ = {
855+
isa = PBXReferenceProxy;
856+
fileType = archive.ar;
857+
path = libRCTBlob.a;
858+
remoteRef = ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */;
859+
sourceTree = BUILT_PRODUCTS_DIR;
860+
};
828861
/* End PBXReferenceProxy section */
829862

830863
/* Begin PBXResourcesBuildPhase section */
@@ -874,7 +907,7 @@
874907
);
875908
runOnlyForDeploymentPostprocessing = 0;
876909
shellPath = /bin/sh;
877-
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh";
910+
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
878911
};
879912
2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = {
880913
isa = PBXShellScriptBuildPhase;
@@ -888,7 +921,7 @@
888921
);
889922
runOnlyForDeploymentPostprocessing = 0;
890923
shellPath = /bin/sh;
891-
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh";
924+
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
892925
};
893926
/* End PBXShellScriptBuildPhase section */
894927

example/Basic/ios/exampleTests/exampleTests.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
3737

3838
- (void)testRendersWelcomeScreen
3939
{
40-
UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController];
40+
UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
4141
NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
4242
BOOL foundElement = NO;
4343

example/Basic/package.json

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
{
2-
"name": "example",
3-
"version": "0.0.1",
4-
"private": true,
5-
"scripts": {
6-
"start": "node node_modules/react-native/local-cli/cli.js start",
7-
"test": "jest"
8-
},
9-
"dependencies": {
10-
"react": "16.0.0-alpha.6",
11-
"react-native": "0.43.3",
12-
"react-native-fetch-mock": "../../"
13-
},
14-
"devDependencies": {
15-
"babel-jest": "19.0.0",
16-
"babel-preset-react-native": "1.9.1",
17-
"jest": "19.0.2",
18-
"react-test-renderer": "16.0.0-alpha.6"
19-
},
20-
"jest": {
21-
"preset": "react-native"
22-
}
2+
"name": "example",
3+
"version": "0.0.1",
4+
"private": true,
5+
"scripts": {
6+
"start": "node node_modules/react-native/local-cli/cli.js start",
7+
"test": "jest"
8+
},
9+
"dependencies": {
10+
"react": "^16.0.0-alpha.12",
11+
"react-native": "^0.48.4",
12+
"react-native-fetch-mock": "../../"
13+
},
14+
"devDependencies": {
15+
"babel-jest": "19.0.0",
16+
"babel-preset-react-native": "1.9.1",
17+
"jest": "19.0.2",
18+
"react-test-renderer": "16.0.0-alpha.6"
19+
},
20+
"jest": {
21+
"preset": "react-native"
22+
}
2323
}

example/WithMockJs/.babelrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"presets": ["react-native"]
3-
}
2+
"presets": ["react-native"]
3+
}

example/WithMockJs/.flowconfig

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ emoji=true
2626

2727
module.system=haste
2828

29-
experimental.strict_type_args=true
30-
3129
munge_underscores=true
3230

3331
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'
@@ -36,12 +34,12 @@ suppress_type=$FlowIssue
3634
suppress_type=$FlowFixMe
3735
suppress_type=$FixMe
3836

39-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-0]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
40-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-0]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
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]+
4139
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
4240
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
4341

4442
unsafe.enable_getters_and_setters=true
4543

4644
[version]
47-
^0.40.0
45+
^0.49.1

example/WithMockJs/android/app/build.gradle

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ import com.android.build.OutputFile
3333
* // bundleInPaidRelease: true,
3434
* // bundleInBeta: true,
3535
*
36+
* // whether to disable dev mode in custom build variants (by default only disabled in release)
37+
* // for example: to disable dev mode in the staging build type (if configured)
38+
* devDisabledInStaging: true,
39+
* // The configuration property can be in the following formats
40+
* // 'devDisabledIn${productFlavor}${buildType}'
41+
* // 'devDisabledIn${buildType}'
42+
*
3643
* // the root of your project, i.e. where "package.json" lives
3744
* root: "../../",
3845
*
@@ -58,7 +65,7 @@ import com.android.build.OutputFile
5865
* inputExcludes: ["android/**", "ios/**"],
5966
*
6067
* // override which node gets called and with what additional arguments
61-
* nodeExecutableAndArgs: ["node"]
68+
* nodeExecutableAndArgs: ["node"],
6269
*
6370
* // supply additional arguments to the packager
6471
* extraPackagerArgs: []

0 commit comments

Comments
 (0)