Skip to content

Commit 26b8021

Browse files
authored
Merge pull request #5 from handi-dev/react-native-064
React native 0.64.0
2 parents ead5349 + 1e1e03f commit 26b8021

File tree

35 files changed

+2978
-12271
lines changed

35 files changed

+2978
-12271
lines changed

.flowconfig

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88
; Ignore polyfills
99
node_modules/react-native/Libraries/polyfills/.*
1010

11-
; These should not be required directly
12-
; require from fbjs/lib instead: require('fbjs/lib/warning')
13-
node_modules/warning/.*
14-
1511
; Flow doesn't support platforms
1612
.*/Libraries/Utilities/LoadingView.js
1713

@@ -30,6 +26,8 @@ emoji=true
3026
esproposal.optional_chaining=enable
3127
esproposal.nullish_coalescing=enable
3228

29+
exact_by_default=true
30+
3331
module.file_ext=.js
3432
module.file_ext=.json
3533
module.file_ext=.ios.js
@@ -44,10 +42,6 @@ suppress_type=$FlowFixMe
4442
suppress_type=$FlowFixMeProps
4543
suppress_type=$FlowFixMeState
4644

47-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
48-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
49-
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
50-
5145
[lints]
5246
sketchy-null-number=warn
5347
sketchy-null-mixed=warn
@@ -58,7 +52,6 @@ deprecated-type=warn
5852
unsafe-getters-setters=warn
5953
unnecessary-invariant=warn
6054
signature-verification-failure=warn
61-
deprecated-utility=error
6255

6356
[strict]
6457
deprecated-type
@@ -70,4 +63,4 @@ untyped-import
7063
untyped-type-import
7164

7265
[version]
73-
^0.122.0
66+
^0.137.0

.gitattributes

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
*.pbxproj -text
1+
# Windows files should use crlf line endings
2+
# https://help.github.com/articles/dealing-with-line-endings/
3+
*.bat text eol=crlf

README.md

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# react-native-boilerplate
22

33
## What is React Native Boilerplate
4-
It is a template that you can clone and reuse for every project. It is starting point for React Native application.
4+
5+
It is a template that you can clone and reuse for every project. It is starting point for React Native application.
56

67
## React Native Boilerplate
78

89
consist of:
910

10-
- react-native": "0.63.4"
11+
- react-native": "0.64.0"
1112
- react-navigation and its dependencies
1213
- redux, redux persist and redux thunk
1314
- react native vector icons
@@ -20,7 +21,24 @@ consist of:
2021
3. Remove `.git` folder, `rm -rf .git`
2122
4. Use [React Native Rename](https://github.com/junedomingo/react-native-rename) to update project name `$ npx react-native-rename <newName>`
2223
5. Run `npm install` to install dependencies
23-
6. Run `npx pod-install` from root of your project
24+
6. Run `npx pod-install` from root of your project.
25+
26+
If you got error like: `The version of CocoaPods used to generate the lockfile (x.x.x) is higher than the version of the current executable (x.x.x)`, then you can upgrade your cocoapods version.
27+
28+
If you install cocoapods using homebrew, you can using this command: `brew upgrade cocoapods` if that does not work, try `brew install cocoapods`.
29+
30+
If you previously install using `gem`, then use this command and run on your terminal: `sudo gem install cocoapods`.
31+
32+
make sure your cocoapods version is updated after run that command.
33+
34+
To check your current version of cocoapods, run `pod --version`.
35+
36+
After that, don't forget to execute in your terminal `pod repo update`
37+
38+
And, finally, run `npx pod-install`. Those methods must be solved that problem.
39+
40+
Last method: If All the above steps not work, remove `Podfile.lock` in folder `ios` , and then run `npx pod-install`.
41+
2442
7. Start the packager with `npm start`
2543
8. Connect your device or use emulator that's installed in your pc
2644
9. Run the test application:
@@ -34,18 +52,20 @@ consist of:
3452

3553
## List of Q & A:
3654

37-
#### I got error `Error: spawn ./gradlew EACCES` when run `npx react-native run-android`.
38-
Run this command `chmod 755 android/gradlew` from your root project directory
55+
#### I got error `Error: spawn ./gradlew EACCES` when run `npx react-native run-android`.
56+
57+
Run this command `chmod 755 android/gradlew` from your root project directory
58+
59+
#### I got error `Error: SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.`
3960

40-
#### I got error `Error: SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.`
41-
- Go to your Project -> Android
42-
- Create a file local.properties
43-
- Open the file
44-
- Paste your Android SDK path depending on the operating system:
61+
- Go to your Project -> Android
62+
- Create a file local.properties
63+
- Open the file
64+
- Paste your Android SDK path depending on the operating system:
4565

46-
- Windows:
47-
sdk.dir=C:/Users/`USERNAME`/AppData/Local/Android/sdk
48-
- Linux or MacOS
49-
sdk.dir=/home/`USERNAME`/Android/sdk
66+
- Windows:
67+
sdk.dir=C:/Users/`USERNAME`/AppData/Local/Android/sdk
68+
- Linux or MacOS
69+
sdk.dir=/home/`USERNAME`/Android/sdk
5070

51-
- Replace `USERNAME` with your PC username
71+
- Replace `USERNAME` with your PC username

_editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Windows files
2+
[*.bat]
3+
end_of_line = crlf
File renamed without changes.

android/app/build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ def jscFlavor = 'org.webkit:android-jsc:+'
121121
def enableHermes = project.ext.react.get("enableHermes", false);
122122

123123
android {
124+
ndkVersion rootProject.ext.ndkVersion
125+
124126
compileSdkVersion rootProject.ext.compileSdkVersion
125127

126128
compileOptions {
@@ -169,11 +171,12 @@ android {
169171
variant.outputs.each { output ->
170172
// For each separate APK per architecture, set a unique version code as described here:
171173
// https://developer.android.com/studio/build/configure-apk-splits.html
174+
// Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
172175
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
173176
def abi = output.getFilter(OutputFile.ABI)
174177
if (abi != null) { // null for the universal-debug, universal-release variants
175178
output.versionCodeOverride =
176-
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
179+
defaultConfig.versionCode * 1000 + versionCodes.get(abi)
177180
}
178181

179182
}
@@ -216,5 +219,4 @@ task copyDownloadableDepsToLibs(type: Copy) {
216219
into 'libs'
217220
}
218221

219-
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
220222
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

android/app/src/debug/AndroidManifest.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,10 @@
44

55
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
66

7-
<application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" />
7+
<application
8+
android:usesCleartextTraffic="true"
9+
tools:targetApi="28"
10+
tools:ignore="GoogleAppIndexingWarning">
11+
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
12+
</application>
813
</manifest>

android/app/src/main/AndroidManifest.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,5 @@
2121
<category android:name="android.intent.category.LAUNCHER" />
2222
</intent-filter>
2323
</activity>
24-
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
2524
</application>
26-
2725
</manifest>

android/app/src/main/java/com/reactnativeboilerplate/MainActivity.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,13 @@ public class MainActivity extends ReactActivity {
99
* rendering of the component.
1010
*/
1111

12+
@Override
13+
protected void onCreate(Bundle savedInstanceState) {
14+
super.onCreate(null);
15+
}
1216

13-
@Override
14-
protected void onCreate(Bundle savedInstanceState) {
15-
super.onCreate(null);
16-
}
17-
1817
@Override
1918
protected String getMainComponentName() {
20-
return "reactNativeBoilerplate";
19+
return "reactnativeboilerplate";
2120
}
2221
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<resources>
2-
<string name="app_name">reactNativeBoilerplate</string>
2+
<string name="app_name">reactnativeboilerplate</string>
33
</resources>

0 commit comments

Comments
 (0)