Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3ac44d2

Browse files
committed
Update examples/Explorer to RN 0.28
1 parent 9166a2b commit 3ac44d2

File tree

9 files changed

+49
-29
lines changed

9 files changed

+49
-29
lines changed

‎examples/Explorer/.flowconfig

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
# Ignore react and fbjs where there are overlaps, but don't ignore
1616
# anything that react-native relies on
1717
.*/node_modules/fbjs/lib/Map.js
18-
.*/node_modules/fbjs/lib/fetch.js
19-
.*/node_modules/fbjs/lib/ExecutionEnvironment.js
2018
.*/node_modules/fbjs/lib/ErrorUtils.js
2119

2220
# Flow has a built-in definition for the 'react' module which we prefer to use
@@ -48,6 +46,9 @@
4846
# Ignore BUCK generated folders
4947
.*\.buckd/
5048

49+
# Ignore RNPM
50+
.*/local-cli/rnpm/.*
51+
5152
.*/node_modules/is-my-json-valid/test/.*\.json
5253
.*/node_modules/iconv-lite/encodings/tables/.*\.json
5354
.*/node_modules/y18n/test/.*\.json
@@ -79,18 +80,20 @@ module.system=haste
7980
esproposal.class_static_fields=enable
8081
esproposal.class_instance_fields=enable
8182

83+
experimental.strict_type_args=true
84+
8285
munge_underscores=true
8386

8487
module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub'
85-
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\)$' -> 'RelativeImageStub'
88+
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'
8689

8790
suppress_type=$FlowIssue
8891
suppress_type=$FlowFixMe
8992
suppress_type=$FixMe
9093

91-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-3]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
92-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-3]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
94+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-6]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
95+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-6]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
9396
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
9497

9598
[version]
96-
0.23.0
99+
^0.26.0

‎examples/Explorer/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ project.xcworkspace
2424

2525
# Android/IJ
2626
#
27+
*.iml
2728
.idea
2829
.gradle
2930
local.properties

‎examples/Explorer/android/app/build.gradle

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,13 @@ import com.android.build.OutputFile
5555
* // date; if you have any other folders that you want to ignore for performance reasons (gradle
5656
* // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
5757
* // for example, you might want to remove it from here.
58-
* inputExcludes: ["android/**", "ios/**"]
58+
* inputExcludes: ["android/**", "ios/**"],
59+
*
60+
* // override which node gets called and with what additional arguments
61+
* nodeExecutableAndArgs: ["node"]
62+
*
63+
* // supply additional arguments to the packager
64+
* extraPackagerArgs: []
5965
* ]
6066
*/
6167

‎examples/Explorer/android/app/proguard-rules.pro

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,14 @@
2626
# See http://sourceforge.net/p/proguard/bugs/466/
2727
-keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip
2828
-keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters
29+
-keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip
2930

3031
# Do not strip any method/class that is annotated with @DoNotStrip
3132
-keep @com.facebook.proguard.annotations.DoNotStrip class *
33+
-keep @com.facebook.common.internal.DoNotStrip class *
3234
-keepclassmembers class * {
3335
@com.facebook.proguard.annotations.DoNotStrip *;
36+
@com.facebook.common.internal.DoNotStrip *;
3437
}
3538

3639
-keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * {
@@ -51,9 +54,9 @@
5154

5255
-keepattributes Signature
5356
-keepattributes *Annotation*
54-
-keep class com.squareup.okhttp.** { *; }
55-
-keep interface com.squareup.okhttp.** { *; }
56-
-dontwarn com.squareup.okhttp.**
57+
-keep class okhttp3.** { *; }
58+
-keep interface okhttp3.** { *; }
59+
-dontwarn okhttp3.**
5760

5861
# okio
5962

‎examples/Explorer/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ allprojects {
1818
jcenter()
1919
maven {
2020
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
21-
url "$projectDir/../../node_modules/react-native/android"
21+
url "$rootDir/../node_modules/react-native/android"
2222
}
2323
}
2424
}

‎examples/Explorer/ios/Explorer.xcodeproj/project.pbxproj

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; };
2121
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
2222
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
23+
140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
2324
146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
2425
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
2526
/* End PBXBuildFile section */
@@ -133,6 +134,7 @@
133134
isa = PBXFrameworksBuildPhase;
134135
buildActionMask = 2147483647;
135136
files = (
137+
140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */,
136138
);
137139
runOnlyForDeploymentPostprocessing = 0;
138140
};
@@ -575,10 +577,6 @@
575577
isa = XCBuildConfiguration;
576578
buildSettings = {
577579
BUNDLE_LOADER = "$(TEST_HOST)";
578-
FRAMEWORK_SEARCH_PATHS = (
579-
"$(SDKROOT)/Developer/Library/Frameworks",
580-
"$(inherited)",
581-
);
582580
GCC_PREPROCESSOR_DEFINITIONS = (
583581
"DEBUG=1",
584582
"$(inherited)",
@@ -596,10 +594,6 @@
596594
buildSettings = {
597595
BUNDLE_LOADER = "$(TEST_HOST)";
598596
COPY_PHASE_STRIP = NO;
599-
FRAMEWORK_SEARCH_PATHS = (
600-
"$(SDKROOT)/Developer/Library/Frameworks",
601-
"$(inherited)",
602-
);
603597
INFOPLIST_FILE = ExplorerTests/Info.plist;
604598
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
605599
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
@@ -620,7 +614,10 @@
620614
);
621615
INFOPLIST_FILE = "Explorer/Info.plist";
622616
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
623-
OTHER_LDFLAGS = "-ObjC";
617+
OTHER_LDFLAGS = (
618+
"-ObjC",
619+
"-lc++",
620+
);
624621
PRODUCT_NAME = Explorer;
625622
};
626623
name = Debug;
@@ -636,7 +633,10 @@
636633
);
637634
INFOPLIST_FILE = "Explorer/Info.plist";
638635
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
639-
OTHER_LDFLAGS = "-ObjC";
636+
OTHER_LDFLAGS = (
637+
"-ObjC",
638+
"-lc++",
639+
);
640640
PRODUCT_NAME = Explorer;
641641
};
642642
name = Release;

‎examples/Explorer/ios/Explorer/AppDelegate.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
4747
moduleName:@"Explorer"
4848
initialProperties:nil
4949
launchOptions:launchOptions];
50+
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
5051

5152
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
5253
UIViewController *rootViewController = [UIViewController new];

‎examples/Explorer/ios/Explorer/Info.plist

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,17 @@
3838
<false/>
3939
<key>NSLocationWhenInUseUsageDescription</key>
4040
<string></string>
41-
<key>NSAppTransportSecurity</key>
42-
<dict>
43-
<!--See http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/ -->
44-
<key>NSAllowsArbitraryLoads</key>
45-
<true/>
46-
</dict>
41+
<key>NSAppTransportSecurity</key>
42+
<!--See http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/ -->
43+
<dict>
44+
<key>NSExceptionDomains</key>
45+
<dict>
46+
<key>localhost</key>
47+
<dict>
48+
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
49+
<true/>
50+
</dict>
51+
</dict>
52+
</dict>
4753
</dict>
4854
</plist>

‎examples/Explorer/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"start": "node node_modules/react-native/local-cli/cli.js start"
77
},
88
"dependencies": {
9-
"react": "^0.14.8",
10-
"react-native": "^0.25.1",
9+
"react": "^15.1.0",
10+
"react-native": "^0.28.0",
1111
"react-native-simple-router": "file:../../"
1212
}
1313
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /