Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Commit ef1c7f1

Browse files
committed
Bump example project to RN 0.57.8
1 parent bbd1f72 commit ef1c7f1

File tree

9 files changed

+1208
-113
lines changed

9 files changed

+1208
-113
lines changed

Example/android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ buildscript {
99
supportLibVersion = "27.1.1"
1010
}
1111
repositories {
12-
jcenter()
1312
google()
13+
jcenter()
1414
}
1515
dependencies {
1616
classpath 'com.android.tools.build:gradle:3.1.4'
@@ -23,12 +23,12 @@ buildscript {
2323
allprojects {
2424
repositories {
2525
mavenLocal()
26+
google()
2627
jcenter()
2728
maven {
2829
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
2930
url "$rootDir/../node_modules/react-native/android"
3031
}
31-
google()
3232
}
3333
}
3434

Example/ios/Example.xcodeproj/project.pbxproj

Lines changed: 1105 additions & 46 deletions
Large diffs are not rendered by default.

Example/ios/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,20 @@
66
parallelizeBuildables = "NO"
77
buildImplicitDependencies = "YES">
88
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "83CBBA2D1A601D0E00E9B192"
18+
BuildableName = "libReact.a"
19+
BlueprintName = "React"
20+
ReferencedContainer = "container:../node_modules/react-native/React/React.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
923
<BuildActionEntry
1024
buildForTesting = "YES"
1125
buildForRunning = "YES"

Example/ios/Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist

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

Example/ios/Example/AppDelegate.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
1616
{
1717
NSURL *jsCodeLocation;
1818

19-
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
19+
#ifdef DEBUG
20+
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
21+
#else
22+
jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
23+
#endif
2024

2125
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
2226
moduleName:@"Example"

Example/ios/Example/Info.plist

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,6 @@
2424
<string>1</string>
2525
<key>LSRequiresIPhoneOS</key>
2626
<true/>
27-
<key>NSAppTransportSecurity</key>
28-
<dict>
29-
<key>NSAllowsArbitraryLoads</key>
30-
<true/>
31-
<key>NSExceptionDomains</key>
32-
<dict>
33-
<key>localhost</key>
34-
<dict>
35-
<key>NSExceptionAllowsInsecureHTTPLoads</key>
36-
<true/>
37-
</dict>
38-
</dict>
39-
</dict>
4027
<key>NSLocationWhenInUseUsageDescription</key>
4128
<string></string>
4229
<key>UILaunchStoryboardName</key>
@@ -53,5 +40,21 @@
5340
</array>
5441
<key>UIViewControllerBasedStatusBarAppearance</key>
5542
<false/>
43+
<key>NSLocationWhenInUseUsageDescription</key>
44+
<string></string>
45+
<key>NSAppTransportSecurity</key>
46+
<!--See http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/ -->
47+
<dict>
48+
<key>NSAllowsArbitraryLoads</key>
49+
<true/>
50+
<key>NSExceptionDomains</key>
51+
<dict>
52+
<key>localhost</key>
53+
<dict>
54+
<key>NSExceptionAllowsInsecureHTTPLoads</key>
55+
<true/>
56+
</dict>
57+
</dict>
58+
</dict>
5659
</dict>
5760
</plist>

Example/ios/Podfile

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,25 @@
11
# Uncomment the next line to define a global platform for your project
22
platform :ios, '9.0'
33

4+
post_install do |installer|
5+
patch_subspecs(installer)
6+
end
7+
8+
def patch_subspecs(installer)
9+
# patch source and header files
10+
# `find node_modules/react-native/React node_modules/react-native/ReactCommon \\( -name *.h -o -name *.m -o -name *.mm \\) -print0 | xargs -0 sed -i '' -E 's:<(yoga|jschelpers|cxxreact)/(.*)>:"\\2":g'`
11+
12+
# exclude duplicate symbols
13+
# https://github.com/facebook/react-native/issues/11502
14+
installer.pods_project.targets.each do |target|
15+
next unless target.name == 'React'
16+
17+
source_files = target.source_build_phase.files
18+
uniqs = source_files.uniq { |f| f.file_ref.path }
19+
(source_files - uniqs).each { |dup| source_files.delete(dup) }
20+
end
21+
end
22+
423
target 'Example' do
524
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
625
# use_frameworks!
@@ -9,22 +28,22 @@ target 'Example' do
928
pod 'react-native-shimmer', :path => '../../react-native-shimmer.podspec'
1029

1130
pod 'React', :path => './../node_modules/react-native', :subspecs => [
12-
'Core',
13-
'CxxBridge', # Include this for RN >= 0.47
14-
'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
15-
'RCTText',
16-
'RCTActionSheet',
17-
'RCTNetwork',
18-
'RCTWebSocket', # Needed for debugging
19-
'RCTAnimation', # Needed for FlatList and animations running on native UI thread
20-
'RCTImage',
21-
'RCTSettings'
22-
# Add any other subspecs you want to use in your project
31+
'Core',
32+
'CxxBridge', # Include this for RN >= 0.47
33+
'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
34+
'RCTText',
35+
'RCTActionSheet',
36+
'RCTNetwork',
37+
'RCTWebSocket', # Needed for debugging
38+
'RCTAnimation', # Needed for FlatList and animations running on native UI thread
39+
'RCTImage',
40+
'RCTSettings'
41+
# Add any other subspecs you want to use in your project
2342
]
24-
43+
2544
# Explicitly include Yoga if you are using RN >= 0.42.0
2645
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
27-
46+
2847
# Third party deps podspec link
2948
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
3049
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'

Example/ios/Podfile.lock

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,52 +6,52 @@ PODS:
66
- DoubleConversion
77
- glog
88
- glog (0.3.5)
9-
- React (0.57.1):
10-
- React/Core (= 0.57.1)
11-
- react-native-shimmer (0.3.2):
9+
- React (0.57.8):
10+
- React/Core (= 0.57.8)
11+
- react-native-shimmer (0.4.1):
1212
- React (>= 0.45.1)
1313
- Shimmer (~> 1)
14-
- React/Core (0.57.1):
15-
- yoga (= 0.57.1.React)
16-
- React/CxxBridge (0.57.1):
14+
- React/Core (0.57.8):
15+
- yoga (= 0.57.8.React)
16+
- React/CxxBridge (0.57.8):
1717
- Folly (= 2016.10.31.00)
1818
- React/Core
1919
- React/cxxreact
20-
- React/cxxreact (0.57.1):
20+
- React/cxxreact (0.57.8):
2121
- boost-for-react-native (= 1.63.0)
2222
- Folly (= 2016.10.31.00)
2323
- React/jschelpers
2424
- React/jsinspector
25-
- React/DevSupport (0.57.1):
25+
- React/DevSupport (0.57.8):
2626
- React/Core
2727
- React/RCTWebSocket
28-
- React/fishhook (0.57.1)
29-
- React/jschelpers (0.57.1):
28+
- React/fishhook (0.57.8)
29+
- React/jschelpers (0.57.8):
3030
- Folly (= 2016.10.31.00)
3131
- React/PrivateDatabase
32-
- React/jsinspector (0.57.1)
33-
- React/PrivateDatabase (0.57.1)
34-
- React/RCTActionSheet (0.57.1):
32+
- React/jsinspector (0.57.8)
33+
- React/PrivateDatabase (0.57.8)
34+
- React/RCTActionSheet (0.57.8):
3535
- React/Core
36-
- React/RCTAnimation (0.57.1):
36+
- React/RCTAnimation (0.57.8):
3737
- React/Core
38-
- React/RCTBlob (0.57.1):
38+
- React/RCTBlob (0.57.8):
3939
- React/Core
40-
- React/RCTImage (0.57.1):
40+
- React/RCTImage (0.57.8):
4141
- React/Core
4242
- React/RCTNetwork
43-
- React/RCTNetwork (0.57.1):
43+
- React/RCTNetwork (0.57.8):
4444
- React/Core
45-
- React/RCTSettings (0.57.1):
45+
- React/RCTSettings (0.57.8):
4646
- React/Core
47-
- React/RCTText (0.57.1):
47+
- React/RCTText (0.57.8):
4848
- React/Core
49-
- React/RCTWebSocket (0.57.1):
49+
- React/RCTWebSocket (0.57.8):
5050
- React/Core
5151
- React/fishhook
5252
- React/RCTBlob
5353
- Shimmer (1.0.2)
54-
- yoga (0.57.1.React)
54+
- yoga (0.57.8.React)
5555

5656
DEPENDENCIES:
5757
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
@@ -95,10 +95,10 @@ SPEC CHECKSUMS:
9595
Folly: c89ac2d5c6ab169cd7397ef27485c44f35f742c7
9696
glog: e8acf0ebbf99759d3ff18c86c292a5898282dcde
9797
React: 1fe0eb13d90b625d94c3b117c274dcfd2e760e11
98-
react-native-shimmer: 037bebac572a59889f59fc70447c5b948da23566
98+
react-native-shimmer: 5f0d6556b577e4390e99ee16dd2667a6996f9015
9999
Shimmer: c5374be1c2b0c9e292fb05b339a513cf291cac86
100100
yoga: b1ce48b6cf950b98deae82838f5173ea7cf89e85
101101

102-
PODFILE CHECKSUM: d325383b623f56dd24147c217fcb6a59d1981eec
102+
PODFILE CHECKSUM: e3cf1ead8566a7f97c0be51ea225d4825dc5210b
103103

104104
COCOAPODS: 1.5.3

Example/package.json

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,21 @@
33
"version": "0.0.1",
44
"private": true,
55
"scripts": {
6-
"start": "node node_modules/react-native/local-cli/cli.js start"
6+
"start": "node node_modules/react-native/local-cli/cli.js start",
7+
"test": "jest"
78
},
89
"dependencies": {
9-
"react": "16.5.0",
10-
"react-native": "0.57.1",
10+
"react": "16.6.3",
11+
"react-native": "0.57.8",
1112
"react-native-shimmer": "*"
1213
},
1314
"devDependencies": {
14-
"@babel/core": "^7.0.0-0",
15-
"@babel/runtime": "^7.0.0",
16-
"babel-core": "^7.0.0-bridge.0",
17-
"metro-react-native-babel-preset": "0.47.1"
15+
"babel-jest": "23.6.0",
16+
"jest": "23.6.0",
17+
"metro-react-native-babel-preset": "0.51.1",
18+
"react-test-renderer": "16.6.3"
19+
},
20+
"jest": {
21+
"preset": "react-native"
1822
}
1923
}

0 commit comments

Comments
 (0)