Skip to content

Commit 11061b1

Browse files
authored
Merge pull request #29 from 4cc3ssX/feat/upgrade_react_native_version_to_74
feat(example): upgrade react-native to 0.74.2
2 parents 9122ba8 + 4c669ed commit 11061b1

34 files changed

+24123
-15621
lines changed

.gitignore

+11
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,17 @@ buck-out/
6060
android/app/libs
6161
android/keystores/debug.keystore
6262

63+
# Yarn
64+
**/.yarn/*
65+
!**/.yarn/patches
66+
!**/.yarn/plugins
67+
!**/.yarn/releases
68+
!**/.yarn/sdks
69+
!**/.yarn/versions
70+
71+
# Expo
72+
.expo/
73+
6374
# Turborepo
6475
.turbo/
6576

.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

+541
Large diffs are not rendered by default.

.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

+28
Large diffs are not rendered by default.

.yarn/releases/yarn-3.6.1.cjs

+874
Large diffs are not rendered by default.

.yarnrc.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
nodeLinker: node-modules
2+
nmHoistingLimits: workspaces
3+
4+
plugins:
5+
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
6+
spec: "@yarnpkg/plugin-interactive-tools"
7+
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
8+
spec: "@yarnpkg/plugin-workspace-tools"
9+
10+
yarnPath: .yarn/releases/yarn-3.6.1.cjs

babel.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
presets: ['module:metro-react-native-babel-preset'],
2+
presets: ['module:@react-native/babel-preset'],
33
};

example/Gemfile

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@ source 'https://rubygems.org'
33
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
44
ruby ">= 2.6.10"
55

6-
gem 'cocoapods', '~> 1.12'
6+
# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
7+
# bound in the template on Cocoapods with next React Native release.
8+
gem 'cocoapods', '>= 1.13', '< 1.15'
9+
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'

example/Gemfile.lock

+24-19
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,30 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
CFPropertyList (3.0.6)
4+
CFPropertyList (3.0.7)
5+
base64
6+
nkf
57
rexml
6-
activesupport (6.1.7.3)
8+
activesupport (6.1.7.7)
79
concurrent-ruby (~> 1.0, >= 1.0.2)
810
i18n (>= 1.6, < 2)
911
minitest (>= 5.1)
1012
tzinfo (~> 2.0)
1113
zeitwerk (~> 2.3)
12-
addressable (2.8.4)
14+
addressable (2.8.6)
1315
public_suffix (>= 2.0.2, < 6.0)
1416
algoliasearch (1.27.5)
1517
httpclient (~> 2.8, >= 2.8.3)
1618
json (>= 1.5.1)
1719
atomos (0.1.3)
20+
base64 (0.2.0)
1821
claide (1.1.0)
19-
cocoapods (1.12.1)
22+
cocoapods (1.14.3)
2023
addressable (~> 2.8)
2124
claide (>= 1.0.2, < 2.0)
22-
cocoapods-core (= 1.12.1)
25+
cocoapods-core (= 1.14.3)
2326
cocoapods-deintegrate (>= 1.0.3, < 2.0)
24-
cocoapods-downloader (>= 1.6.0, < 2.0)
27+
cocoapods-downloader (>= 2.1, < 3.0)
2528
cocoapods-plugins (>= 1.0.0, < 2.0)
2629
cocoapods-search (>= 1.0.0, < 2.0)
2730
cocoapods-trunk (>= 1.6.0, < 2.0)
@@ -33,8 +36,8 @@ GEM
3336
molinillo (~> 0.8.0)
3437
nap (~> 1.0)
3538
ruby-macho (>= 2.3.0, < 3.0)
36-
xcodeproj (>= 1.21.0, < 2.0)
37-
cocoapods-core (1.12.1)
39+
xcodeproj (>= 1.23.0, < 2.0)
40+
cocoapods-core (1.14.3)
3841
activesupport (>= 5.0, < 8)
3942
addressable (~> 2.8)
4043
algoliasearch (~> 1.0)
@@ -45,7 +48,7 @@ GEM
4548
public_suffix (~> 4.0)
4649
typhoeus (~> 1.0)
4750
cocoapods-deintegrate (1.0.5)
48-
cocoapods-downloader (1.6.3)
51+
cocoapods-downloader (2.1)
4952
cocoapods-plugins (1.0.0)
5053
nap
5154
cocoapods-search (1.0.1)
@@ -54,44 +57,46 @@ GEM
5457
netrc (~> 0.11)
5558
cocoapods-try (1.2.0)
5659
colored2 (3.1.2)
57-
concurrent-ruby (1.2.2)
60+
concurrent-ruby (1.2.3)
5861
escape (0.0.4)
5962
ethon (0.16.0)
6063
ffi (>= 1.15.0)
61-
ffi (1.15.5)
64+
ffi (1.16.3)
6265
fourflusher (2.3.1)
6366
fuzzy_match (2.0.4)
6467
gh_inspector (1.1.3)
6568
httpclient (2.8.3)
66-
i18n (1.14.1)
69+
i18n (1.14.4)
6770
concurrent-ruby (~> 1.0)
68-
json (2.6.3)
69-
minitest (5.18.1)
71+
json (2.7.1)
72+
minitest (5.22.3)
7073
molinillo (0.8.0)
7174
nanaimo (0.3.0)
7275
nap (1.1.0)
7376
netrc (0.11.0)
77+
nkf (0.2.0)
7478
public_suffix (4.0.7)
75-
rexml (3.2.5)
79+
rexml (3.2.6)
7680
ruby-macho (2.5.1)
77-
typhoeus (1.4.0)
81+
typhoeus (1.4.1)
7882
ethon (>= 0.9.0)
7983
tzinfo (2.0.6)
8084
concurrent-ruby (~> 1.0)
81-
xcodeproj (1.22.0)
85+
xcodeproj (1.24.0)
8286
CFPropertyList (>= 2.3.3, < 4.0)
8387
atomos (~> 0.1.3)
8488
claide (>= 1.0.2, < 2.0)
8589
colored2 (~> 3.1)
8690
nanaimo (~> 0.3.0)
8791
rexml (~> 3.2.4)
88-
zeitwerk (2.6.8)
92+
zeitwerk (2.6.13)
8993

9094
PLATFORMS
9195
ruby
9296

9397
DEPENDENCIES
94-
cocoapods (~> 1.12)
98+
activesupport (>= 6.1.7.5, < 7.1.0)
99+
cocoapods (>= 1.13, < 1.15)
95100

96101
RUBY VERSION
97102
ruby 2.6.10p210

example/README.md

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
This is a new [**React Native**](https://reactnative.dev) project, bootstrapped using [`@react-native-community/cli`](https://github.com/react-native-community/cli).
2+
3+
# Getting Started
4+
5+
>**Note**: Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/environment-setup) instructions till "Creating a new application" step, before proceeding.
6+
7+
## Step 1: Start the Metro Server
8+
9+
First, you will need to start **Metro**, the JavaScript _bundler_ that ships _with_ React Native.
10+
11+
To start Metro, run the following command from the _root_ of your React Native project:
12+
13+
```bash
14+
# using npm
15+
npm start
16+
17+
# OR using Yarn
18+
yarn start
19+
```
20+
21+
## Step 2: Start your Application
22+
23+
Let Metro Bundler run in its _own_ terminal. Open a _new_ terminal from the _root_ of your React Native project. Run the following command to start your _Android_ or _iOS_ app:
24+
25+
### For Android
26+
27+
```bash
28+
# using npm
29+
npm run android
30+
31+
# OR using Yarn
32+
yarn android
33+
```
34+
35+
### For iOS
36+
37+
```bash
38+
# using npm
39+
npm run ios
40+
41+
# OR using Yarn
42+
yarn ios
43+
```
44+
45+
If everything is set up _correctly_, you should see your new app running in your _Android Emulator_ or _iOS Simulator_ shortly provided you have set up your emulator/simulator correctly.
46+
47+
This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively.
48+
49+
## Step 3: Modifying your App
50+
51+
Now that you have successfully run the app, let's modify it.
52+
53+
1. Open `App.tsx` in your text editor of choice and edit some lines.
54+
2. For **Android**: Press the <kbd>R</kbd> key twice or select **"Reload"** from the **Developer Menu** (<kbd>Ctrl</kbd> + <kbd>M</kbd> (on Window and Linux) or <kbd>Cmd ⌘</kbd> + <kbd>M</kbd> (on macOS)) to see your changes!
55+
56+
For **iOS**: Hit <kbd>Cmd ⌘</kbd> + <kbd>R</kbd> in your iOS Simulator to reload the app and see your changes!
57+
58+
## Congratulations! :tada:
59+
60+
You've successfully run and modified your React Native App. :partying_face:
61+
62+
### Now what?
63+
64+
- If you want to add this new React Native code to an existing application, check out the [Integration guide](https://reactnative.dev/docs/integration-with-existing-apps).
65+
- If you're curious to learn more about React Native, check out the [Introduction to React Native](https://reactnative.dev/docs/getting-started).
66+
67+
# Troubleshooting
68+
69+
If you can't get this to work, see the [Troubleshooting](https://reactnative.dev/docs/troubleshooting) page.
70+
71+
# Learn More
72+
73+
To learn more about React Native, take a look at the following resources:
74+
75+
- [React Native Website](https://reactnative.dev) - learn more about React Native.
76+
- [Getting Started](https://reactnative.dev/docs/environment-setup) - an **overview** of React Native and how setup your environment.
77+
- [Learn the Basics](https://reactnative.dev/docs/getting-started) - a **guided tour** of the React Native **basics**.
78+
- [Blog](https://reactnative.dev/blog) - read the latest official React Native **Blog** posts.
79+
- [`@facebook/react-native`](https://github.com/facebook/react-native) - the Open Source; GitHub **repository** for React Native.

example/android/app/build.gradle

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: "com.android.application"
2+
apply plugin: "org.jetbrains.kotlin.android"
23
apply plugin: "com.facebook.react"
34

45
/**
@@ -71,7 +72,8 @@ def jscFlavor = 'org.webkit:android-jsc:+'
7172
android {
7273
ndkVersion rootProject.ext.ndkVersion
7374

74-
compileSdkVersion rootProject.ext.compileSdkVersion
75+
buildToolsVersion rootProject.ext.buildToolsVersion
76+
compileSdk rootProject.ext.compileSdkVersion
7577

7678
namespace "com.tingexample"
7779
defaultConfig {
@@ -107,12 +109,6 @@ dependencies {
107109
// The version of react-native is set by the React Native Gradle Plugin
108110
implementation("com.facebook.react:react-android")
109111

110-
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
111-
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
112-
exclude group:'com.squareup.okhttp3', module:'okhttp'
113-
}
114-
115-
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
116112
if (hermesEnabled.toBoolean()) {
117113
implementation("com.facebook.react:hermes-android")
118114
} else {

example/android/app/src/debug/AndroidManifest.xml

+1-5
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,8 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:tools="http://schemas.android.com/tools">
44

5-
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
6-
75
<application
86
android:usesCleartextTraffic="true"
97
tools:targetApi="28"
10-
tools:ignore="GoogleAppIndexingWarning">
11-
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
12-
</application>
8+
tools:ignore="GoogleAppIndexingWarning"/>
139
</manifest>

example/android/app/src/debug/java/com/tingexample/ReactNativeFlipper.java

-75
This file was deleted.

example/android/app/src/main/java/com/tingexample/MainActivity.java

-32
This file was deleted.

0 commit comments

Comments
 (0)