Skip to content

Commit 85df094

Browse files
authored
Upgraded Project to new RN 0.72.6 + various fixes (#1281)
* Updaged chore, refactor, removed redux-flipper, removed old splashscreen package * Chore redux, added Lato as main project font * UI fixes, clean code * Fixed android compilation, fixed duped arrow back on the header on Android * Config fixes * Chore dependencies
1 parent 955026a commit 85df094

File tree

115 files changed

+6052
-6861
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+6052
-6861
lines changed

.all-contributorsrc

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,6 @@
2929
"example"
3030
]
3131
},
32-
{
33-
"login": "panz3r",
34-
"name": "Mattia Panzeri",
35-
"avatar_url": "https://avatars3.githubusercontent.com/u/1754457?v=4",
36-
"profile": "http://panz3r.dev",
37-
"contributions": [
38-
"ideas",
39-
"doc",
40-
"tool"
41-
]
42-
}
4332
],
4433
"contributorsPerLine": 7
4534
}

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module.exports = {
33
parser: '@typescript-eslint/parser',
44
plugins: ['@typescript-eslint', 'react-hooks'],
55
extends: [
6-
'@react-native-community',
6+
'@react-native',
77
'plugin:prettier/recommended',
88
'eslint:recommended',
99
'plugin:@typescript-eslint/eslint-recommended',

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,8 @@ src/env.js
9898

9999
deps-graph.svg
100100
.eslintcache
101+
102+
# Temporary files created by Metro to check the health of the file watcher
103+
.metro-health-check*
104+
# testing
105+
/coverage

.nvmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.ruby-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

Gemfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
source 'https://rubygems.org'
22

33
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4-
ruby '2.7.5'
4+
ruby ">= 2.6.10"
55

6-
gem 'cocoapods', '~> 1.11', '>= 1.11.2'
6+
gem 'cocoapods', '~> 1.13'
7+
gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'

Gemfile.lock

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,40 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
CFPropertyList (3.0.5)
4+
CFPropertyList (3.0.6)
55
rexml
6-
activesupport (6.1.5)
6+
activesupport (7.0.8)
77
concurrent-ruby (~> 1.0, >= 1.0.2)
88
i18n (>= 1.6, < 2)
99
minitest (>= 5.1)
1010
tzinfo (~> 2.0)
11-
zeitwerk (~> 2.3)
12-
addressable (2.8.0)
13-
public_suffix (>= 2.0.2, < 5.0)
11+
addressable (2.8.5)
12+
public_suffix (>= 2.0.2, < 6.0)
1413
algoliasearch (1.27.5)
1514
httpclient (~> 2.8, >= 2.8.3)
1615
json (>= 1.5.1)
1716
atomos (0.1.3)
1817
claide (1.1.0)
19-
cocoapods (1.11.3)
18+
cocoapods (1.13.0)
2019
addressable (~> 2.8)
2120
claide (>= 1.0.2, < 2.0)
22-
cocoapods-core (= 1.11.3)
21+
cocoapods-core (= 1.13.0)
2322
cocoapods-deintegrate (>= 1.0.3, < 2.0)
24-
cocoapods-downloader (>= 1.4.0, < 2.0)
23+
cocoapods-downloader (>= 1.6.0, < 2.0)
2524
cocoapods-plugins (>= 1.0.0, < 2.0)
2625
cocoapods-search (>= 1.0.0, < 2.0)
27-
cocoapods-trunk (>= 1.4.0, < 2.0)
26+
cocoapods-trunk (>= 1.6.0, < 2.0)
2827
cocoapods-try (>= 1.1.0, < 2.0)
2928
colored2 (~> 3.1)
3029
escape (~> 0.0.4)
3130
fourflusher (>= 2.3.0, < 3.0)
3231
gh_inspector (~> 1.0)
3332
molinillo (~> 0.8.0)
3433
nap (~> 1.0)
35-
ruby-macho (>= 1.0, < 3.0)
36-
xcodeproj (>= 1.21.0, < 2.0)
37-
cocoapods-core (1.11.3)
38-
activesupport (>= 5.0, < 7)
34+
ruby-macho (>= 2.3.0, < 3.0)
35+
xcodeproj (>= 1.23.0, < 2.0)
36+
cocoapods-core (1.13.0)
37+
activesupport (>= 5.0, < 8)
3938
addressable (~> 2.8)
4039
algoliasearch (~> 1.0)
4140
concurrent-ruby (~> 1.1)
@@ -54,47 +53,47 @@ GEM
5453
netrc (~> 0.11)
5554
cocoapods-try (1.2.0)
5655
colored2 (3.1.2)
57-
concurrent-ruby (1.1.10)
56+
concurrent-ruby (1.2.2)
5857
escape (0.0.4)
59-
ethon (0.15.0)
58+
ethon (0.16.0)
6059
ffi (>= 1.15.0)
61-
ffi (1.15.5)
60+
ffi (1.16.3)
6261
fourflusher (2.3.1)
6362
fuzzy_match (2.0.4)
6463
gh_inspector (1.1.3)
6564
httpclient (2.8.3)
66-
i18n (1.10.0)
65+
i18n (1.14.1)
6766
concurrent-ruby (~> 1.0)
68-
json (2.6.1)
69-
minitest (5.15.0)
67+
json (2.6.3)
68+
minitest (5.20.0)
7069
molinillo (0.8.0)
7170
nanaimo (0.3.0)
7271
nap (1.1.0)
7372
netrc (0.11.0)
7473
public_suffix (4.0.7)
75-
rexml (3.2.5)
74+
rexml (3.2.6)
7675
ruby-macho (2.5.1)
7776
typhoeus (1.4.0)
7877
ethon (>= 0.9.0)
79-
tzinfo (2.0.4)
78+
tzinfo (2.0.6)
8079
concurrent-ruby (~> 1.0)
81-
xcodeproj (1.21.0)
80+
xcodeproj (1.23.0)
8281
CFPropertyList (>= 2.3.3, < 4.0)
8382
atomos (~> 0.1.3)
8483
claide (>= 1.0.2, < 2.0)
8584
colored2 (~> 3.1)
8685
nanaimo (~> 0.3.0)
8786
rexml (~> 3.2.4)
88-
zeitwerk (2.5.4)
8987

9088
PLATFORMS
9189
ruby
9290

9391
DEPENDENCIES
94-
cocoapods (~> 1.11, >= 1.11.2)
92+
activesupport (>= 6.1.7.3, < 7.1.0)
93+
cocoapods (~> 1.13)
9594

9695
RUBY VERSION
97-
ruby 2.7.4p191
96+
ruby 3.0.0p0
9897

9998
BUNDLED WITH
100-
2.2.27
99+
2.2.3

README.md

Lines changed: 59 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> A React Native boilerplate app to bootstrap your next app with Redux Toolkit and Saga!
44
5-
## 🔥🔥🔥 Upgraded to the latest React-Native (> 0.69.x) with brand New Architecture (Fabric) 🔥🔥🔥
5+
## 🔥🔥🔥 Upgraded to the latest React-Native (> 0.72.x) with brand New Architecture (Fabric) 🔥🔥🔥
66

77
<br/>
88
<div align="center">
@@ -27,19 +27,20 @@
2727

2828
# Table of Contents <!-- omit in toc -->
2929

30-
- [🔥🔥🔥 Upgraded to the latest React-Native (> 0.69.x) with brand New Architecture (Fabric) 🔥🔥🔥](#-upgraded-to-the-latest-react-native--069x-with-brand-new-architecture-fabric-)
30+
- [🔥🔥🔥 Upgraded to the latest React-Native (\> 0.72.x) with brand New Architecture (Fabric) 🔥🔥🔥](#-upgraded-to-the-latest-react-native--072x-with-brand-new-architecture-fabric-)
3131
- [🔥🔥 Checkout also my brand new React Native React-Query (no redux toolkit) here 🔥🔥](#-checkout-also-my-brand-new-react-native-react-query-no-redux-toolkit-here-)
32-
- [Installation :inbox_tray:](#installation-inbox_tray)
32+
- [Installation :inbox\_tray:](#installation-inbox_tray)
3333
- [Rename project and bundles :memo: :package:](#rename-project-and-bundles-memo-package)
34-
- [iOS & Android](#ios--android)
35-
- [Environment Setup :globe_with_meridians:](#environment-setup-globe_with_meridians)
34+
- [iOS \& Android](#ios--android)
35+
- [Environment Setup :globe\_with\_meridians:](#environment-setup-globe_with_meridians)
3636
- [Scripts :wrench:](#scripts-wrench)
3737
- [Run the app](#run-the-app)
3838
- [Generate app icons](#generate-app-icons)
3939
- [Generate Splashscreen](#generate-splashscreen)
4040
- [To enabled React-Native (Fabric) new architecture](#to-enabled-react-native-fabric-new-architecture)
4141
- [Setup iOS](#setup-ios)
4242
- [Typescript (optional)](#typescript-optional)
43+
- [ATTENTION Circular dependencies script checker](#attention-circular-dependencies-script-checker)
4344
- [Roadmap :running:](#roadmap-running)
4445
- [Screenshots](#screenshots)
4546
- [Contributors :sparkles:](#contributors-sparkles)
@@ -95,6 +96,14 @@ If you want to use IDEs such Xcode or Android Studio, you have to set up the ENV
9596
- `yarn env:stage`, to set the staging ENV variables
9697
- `yarn env:prod`, to set the production ENV variables
9798

99+
If you want to use this in any file, just:
100+
101+
`import env from '@env';`
102+
103+
and use like this:
104+
105+
`env.API_URL`
106+
98107
---
99108

100109
## Scripts :wrench:
@@ -111,6 +120,24 @@ To run the app use one of the following scripts:
111120
- `yarn ios:stage`, to start the app on iOS with the `staging` environment variables.
112121
- `yarn ios:prod`, to start the app on iOS with the `production` environment variables.
113122

123+
If using the `ios` commands you will receive an error like this:
124+
125+
<img src="./docs/error.png" maxWidth="700px" />
126+
127+
Just do the following steps:
128+
129+
- Launch Xcode
130+
- Settings
131+
- Locations
132+
133+
Make sure there's a dropdown option selected for the command line tools
134+
NOTE: Even if you're seeing Command Line Tools dropdown being selected with proper version, you might want to re-select it again. It will ask for login password.
135+
136+
<img src="./docs/ios_locations.png" maxWidth="700px" />
137+
138+
_REMEMBER: The Command Line Tools should be the latest one or the one matching your Xcode version_
139+
140+
114141
### Generate app icons
115142

116143
To setup the app icons:
@@ -125,16 +152,29 @@ yarn assets:icons
125152

126153
### Generate Splashscreen
127154

128-
To setup the app splashscreen:
155+
To setup the iOS app splashscreen:
129156

130157
- create an image at least `1242x2208px`
131-
- place it under `/assets` folder as `splashscreen.png`
158+
- place it under `/assets` folder as `ios_splashscreen.png`
132159
- run
133160

134161
```sh
135-
yarn assets:splashscreen
162+
yarn assets:splashscreen:ios
136163
```
137164

165+
To setup the Android app splashscreen:
166+
167+
- create an image at least `150x134px`
168+
- place it under `/assets` folder as `android_splashscreen.png`
169+
- run
170+
171+
```sh
172+
yarn assets:splashscreen:android
173+
```
174+
175+
If you want to customize the output icon, open the `package.json` file and customized the backgtound color, size, ..... in the following command `assets:splashscreen:android`
176+
177+
138178
### To enabled React-Native (Fabric) new architecture
139179

140180
Check the official documentation [here](https://reactnative.dev/docs/new-architecture-intro)
@@ -169,17 +209,24 @@ _REMEMBER: the entry point file in the root of the project MUST be index.js_
169209

170210
---
171211

212+
### ATTENTION Circular dependencies script checker
213+
214+
If running this script `dependencies:graph`, you get this error:
215+
`Error: Graphviz could not be found. Ensure that "gvpr" is in your $PATH`
216+
217+
If you are on a Mac: `brew install graphviz`
218+
On Windows, after installation, do this: <img src="https://user-images.githubusercontent.com/24865815/91755813-b8224a00-eb99-11ea-9489-10973000c043.png" maxWidth="700px" />
219+
172220
## Roadmap :running:
173221

174222
✅ Initial Setup<br/>
175-
`react-native-splashscreen` (https://github.com/crazycodeboy/react-native-splash-screen)<br/>
176-
`react-native-toolbox` to generate Splashscreen and icons automagically (https://github.com/panz3r/react-native-toolbox)<br/>
223+
`react-native-bootsplash` (https://github.com/zoontek/react-native-bootsplash)<br/>
224+
`react-native-toolbox` to generate Splashscreen and icons automagically (https://github.com/Forward-Software/react-native-toolbox)<br/>
177225
✅ Standard tree folders structure<br/>
178-
`React-Native 0.69 (new architecture)`<br/>
226+
`React-Native 0.72.6`<br/>
179227
`redux-toolkit`<br/>
180228
`redux-persist` (https://github.com/rt2zz/redux-persist)<br/>
181229
`React Native Debugger`<br/>
182-
`React Native Flipper Integration`<br/>
183230
`redux-saga`<br/>
184231
`i18next`<br/>
185232
`react-navigation v6` ❤️<br/>
@@ -218,7 +265,6 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
218265
<table>
219266
<tr>
220267
<td align="center"><a href="https://github.com/IronTony"><img src="https://avatars3.githubusercontent.com/u/3645225?v=4" width="100px;" alt=""/><br /><sub><b>IronTony</b></sub></a><br /><a href="#ideas-IronTony" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/IronTony/react-native-redux-toolkit-starter-app/commits?author=IronTony" title="Code">💻</a> <a href="https://github.com/IronTony/react-native-redux-toolkit-starter-app/commits?author=IronTony" title="Documentation">📖</a> <a href="https://github.com/IronTony/react-native-redux-toolkit-starter-app/issues?q=author%3AIronTony" title="Bug reports">🐛</a> <a href="#maintenance-IronTony" title="Maintenance">🚧</a> <a href="#platform-IronTony" title="Packaging/porting to new platform">📦</a> <a href="#question-IronTony" title="Answering Questions">💬</a> <a href="https://github.com/IronTony/react-native-redux-toolkit-starter-app/pulls?q=is%3Apr+reviewed-by%3AIronTony" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/IronTony/react-native-redux-toolkit-starter-app/commits?author=IronTony" title="Tests">⚠️</a> <a href="#example-IronTony" title="Examples">💡</a></td>
221-
<td align="center"><a href="http://panz3r.dev"><img src="https://avatars3.githubusercontent.com/u/1754457?v=4" width="100px;" alt=""/><br /><sub><b>Mattia Panzeri</b></sub></a><br /><a href="#ideas-panz3r" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/IronTony/react-native-redux-toolkit-starter-app/commits?author=panz3r" title="Documentation">📖</a> <a href="#tool-panz3r" title="Tools">🔧</a></td>
222268
</tr>
223269
</table>
224270

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import 'react-native';
66
import React from 'react';
77
import App from '../App';
88

9+
// Note: import explicitly to use the types shiped with jest.
10+
import {it} from '@jest/globals';
11+
912
// Note: test renderer must be required after react-native.
1013
import renderer from 'react-test-renderer';
1114

0 commit comments

Comments
 (0)