Skip to content

Commit 3b14cfb

Browse files
committed
Update to RN 0.74, edit README
1 parent 2795733 commit 3b14cfb

File tree

18 files changed

+1381
-1362
lines changed

18 files changed

+1381
-1362
lines changed

.gitignore

+10-15
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
/config.json
22

3-
# yarn
4-
.pnp.*
5-
.yarn/*
6-
!.yarn/patches
7-
!.yarn/plugins
8-
!.yarn/releases
9-
!.yarn/sdks
10-
!.yarn/versions
11-
123
# OSX
134
#
145
.DS_Store
@@ -31,7 +22,7 @@ DerivedData
3122
*.hmap
3223
*.ipa
3324
*.xcuserstate
34-
ios/.xcode.env.local
25+
**/.xcode.env.local
3526

3627
# Android/IntelliJ
3728
#
@@ -45,10 +36,6 @@ local.properties
4536
*.keystore
4637
!debug.keystore
4738

48-
# Visual Studio Code
49-
#
50-
.vscode/
51-
5239
# node.js
5340
#
5441
node_modules/
@@ -71,11 +58,19 @@ yarn-error.log
7158
*.jsbundle
7259

7360
# Ruby / CocoaPods
74-
/ios/Pods/
61+
**/Pods/
7562
/vendor/bundle/
7663

7764
# Temporary files created by Metro to check the health of the file watcher
7865
.metro-health-check*
7966

8067
# testing
8168
/coverage
69+
70+
# Yarn
71+
.yarn/*
72+
!.yarn/patches
73+
!.yarn/plugins
74+
!.yarn/releases
75+
!.yarn/sdks
76+
!.yarn/versions

Gemfile

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,5 +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.13'
7-
gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'
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'

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Discord server for EnderChat and other projects](https://dcbadge.vercel.app/api/server/MFSJa9TpPS)](https://discord.gg/MFSJa9TpPS)
44

5-
A React Native app for Android/iOS to chat on Minecraft servers from your phone.
5+
An app for Android/iOS to chat on Minecraft servers from your phone.
66

77
Disclaimer: This app is NOT an official Minecraft product. It is not associated with Mojang in any way.
88

android/app/build.gradle

-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ android {
121121
dependencies {
122122
// The version of react-native is set by the React Native Gradle Plugin
123123
implementation("com.facebook.react:react-android")
124-
implementation("com.facebook.react:flipper-integration")
125124

126125
if (hermesEnabled.toBoolean()) {
127126
implementation("com.facebook.react:hermes-android")

android/app/src/main/java/com/enderchat/MainApplication.kt

+1-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import com.facebook.react.ReactPackage
1111
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
1212
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
1313
import com.facebook.react.defaults.DefaultReactNativeHost
14-
import com.facebook.react.flipper.ReactNativeFlipper
1514
import com.facebook.soloader.SoLoader
1615

1716
class MainApplication : Application(), ReactApplication {
@@ -35,7 +34,7 @@ class MainApplication : Application(), ReactApplication {
3534
}
3635

3736
override val reactHost: ReactHost
38-
get() = getDefaultReactHost(this.applicationContext, reactNativeHost)
37+
get() = getDefaultReactHost(applicationContext, reactNativeHost)
3938

4039
override fun onCreate() {
4140
super.onCreate()
@@ -44,6 +43,5 @@ class MainApplication : Application(), ReactApplication {
4443
// If you opted-in for the New Architecture, we load the native entry point for this app.
4544
load()
4645
}
47-
ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager)
4846
}
4947
}

android/app/src/main/res/drawable/rn_edit_text_material.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
android:insetLeft="@dimen/abc_edit_text_inset_horizontal_material"
1515
android:insetRight="@dimen/abc_edit_text_inset_horizontal_material"
1616
android:insetTop="@dimen/abc_edit_text_inset_top_material"
17-
android:insetBottom="@dimen/abc_edit_text_inset_bottom_material">
17+
android:insetBottom="@dimen/abc_edit_text_inset_bottom_material"
18+
>
1819
<selector>
1920
<!--
2021
This file is a copy of abc_edit_text_material (https://bit.ly/3k8fX7I).

android/build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
buildscript {
22
ext {
33
buildToolsVersion = "34.0.0"
4-
minSdkVersion = 21
4+
minSdkVersion = 23
55
compileSdkVersion = 34
66
targetSdkVersion = 34
7-
ndkVersion = "25.1.8937393"
8-
kotlinVersion = "1.9.10" // manual
7+
ndkVersion = "26.1.10909125"
8+
kotlinVersion = "1.9.22"
99
}
1010
repositories {
1111
google()

android/gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
# manual
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
55
networkTimeout=10000
66
validateDistributionUrl=true
77
zipStoreBase=GRADLE_USER_HOME

android/gradlew

+7-7
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
145145
case $MAX_FD in #(
146146
max*)
147147
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
148-
# shellcheck disable=SC3045
148+
# shellcheck disable=SC2039,SC3045
149149
MAX_FD=$( ulimit -H -n ) ||
150150
warn "Could not query maximum file descriptor limit"
151151
esac
152152
case $MAX_FD in #(
153153
'' | soft) :;; #(
154154
*)
155155
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
156-
# shellcheck disable=SC3045
156+
# shellcheck disable=SC2039,SC3045
157157
ulimit -n "$MAX_FD" ||
158158
warn "Could not set maximum file descriptor limit to $MAX_FD"
159159
esac
@@ -202,11 +202,11 @@ fi
202202
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
203203
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
204204

205-
# Collect all arguments for the java command;
206-
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
207-
# shell script including quotes and variable substitutions, so put them in
208-
# double quotes to make sure that they get re-expanded; and
209-
# * put everything else in single quotes, so that it's not re-expanded.
205+
# Collect all arguments for the java command:
206+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
207+
# and any embedded shellness will be escaped.
208+
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
209+
# treated as '${Hostname}' itself on the command line.
210210

211211
set -- \
212212
"-Dorg.gradle.appname=$APP_BASE_NAME" \

android/gradlew.bat

+10-10
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
4343
%JAVA_EXE% -version >NUL 2>&1
4444
if %ERRORLEVEL% equ 0 goto execute
4545

46-
echo.
47-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
48-
echo.
49-
echo Please set the JAVA_HOME variable in your environment to match the
50-
echo location of your Java installation.
46+
echo. 1>&2
47+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
48+
echo. 1>&2
49+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
50+
echo location of your Java installation. 1>&2
5151

5252
goto fail
5353

@@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5757

5858
if exist "%JAVA_EXE%" goto execute
5959

60-
echo.
61-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
62-
echo.
63-
echo Please set the JAVA_HOME variable in your environment to match the
64-
echo location of your Java installation.
60+
echo. 1>&2
61+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
62+
echo. 1>&2
63+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
64+
echo location of your Java installation. 1>&2
6565

6666
goto fail
6767

ios/EnderChat.xcodeproj/project.pbxproj

+3-1
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@
271271
);
272272
runOnlyForDeploymentPostprocessing = 0;
273273
shellPath = /bin/sh;
274-
shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
274+
shellScript = "set -e\n\nWITH_ENVIRONMENT=\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"$REACT_NATIVE_PATH/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
275275
};
276276
00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = {
277277
isa = PBXShellScriptBuildPhase;
@@ -586,6 +586,7 @@
586586
"-DFOLLY_MOBILE=1",
587587
"-DFOLLY_USE_LIBCPP=1",
588588
"-DFOLLY_CFG_NO_COROUTINES=1",
589+
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
589590
);
590591
SDKROOT = iphoneos;
591592
};
@@ -650,6 +651,7 @@
650651
"-DFOLLY_MOBILE=1",
651652
"-DFOLLY_USE_LIBCPP=1",
652653
"-DFOLLY_CFG_NO_COROUTINES=1",
654+
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
653655
);
654656
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
655657
SDKROOT = iphoneos;

ios/EnderChat/AppDelegate.mm

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
1616

1717
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
1818
{
19-
return [self getBundleURL];
19+
return [self bundleURL];
2020
}
2121

22-
- (NSURL *)getBundleURL
22+
- (NSURL *)bundleURL
2323
{
2424
#if DEBUG
2525
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];

ios/EnderChat/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<string>LaunchScreen</string>
4444
<key>UIRequiredDeviceCapabilities</key>
4545
<array>
46-
<string>armv7</string>
46+
<string>arm64</string>
4747
</array>
4848
<key>UISupportedInterfaceOrientations</key>
4949
<array>

ios/Podfile

+2-17
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,6 @@ require Pod::Executable.execute_command('node', ['-p',
88
platform :ios, min_ios_version_supported
99
prepare_react_native_project!
1010

11-
# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
12-
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
13-
#
14-
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
15-
# ```js
16-
# module.exports = {
17-
# dependencies: {
18-
# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
19-
# ```
20-
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
21-
2211
linkage = ENV['USE_FRAMEWORKS']
2312
if linkage != nil
2413
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
@@ -30,11 +19,6 @@ target 'EnderChat' do
3019

3120
use_react_native!(
3221
:path => config[:reactNativePath],
33-
# Enables Flipper.
34-
#
35-
# Note that if you have use_frameworks! enabled, Flipper will not work and
36-
# you should disable the next line.
37-
:flipper_configuration => flipper_config,
3822
# An absolute path to your application root.
3923
:app_path => "#{Pod::Config.instance.installation_root}/.."
4024
)
@@ -49,7 +33,8 @@ target 'EnderChat' do
4933
react_native_post_install(
5034
installer,
5135
config[:reactNativePath],
52-
:mac_catalyst_enabled => false
36+
:mac_catalyst_enabled => false,
37+
# :ccache_enabled => true
5338
)
5439
end
5540
end

metro.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config')
22

33
/**
44
* Metro configuration
5-
* https://facebook.github.io/metro/docs/configuration
5+
* https://reactnative.dev/docs/metro
66
*
77
* @type {import('metro-config').MetroConfig}
88
*/

package.json

+11-11
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
"test": "jest",
1212
"lint": "tsc && eslint ."
1313
},
14-
"packageManager": "yarn@4.0.2",
14+
"packageManager": "yarn@4.1.1",
1515
"engines": {
1616
"node": ">=18"
1717
},
1818
"dependencies": {
1919
"@react-native-async-storage/async-storage": "^1.19.1",
20-
"@react-native-clipboard/clipboard": "^1.13.0",
21-
"@react-native-picker/picker": "^2.4.10",
20+
"@react-native-clipboard/clipboard": "^1.13.2",
21+
"@react-native-picker/picker": "^2.7.2",
2222
"@react-navigation/bottom-tabs": "^6.5.8",
2323
"@react-navigation/material-top-tabs": "^6.6.3",
2424
"@react-navigation/native": "^6.1.7",
@@ -28,16 +28,16 @@
2828
"buffer": "^6.0.3",
2929
"events": "^3.3.0",
3030
"react": "18.2.0",
31-
"react-native": "0.73.2",
31+
"react-native": "0.74.0-rc.5",
3232
"react-native-crypto": "^2.2.0",
3333
"react-native-pager-view": "^6.2.0",
3434
"react-native-randombytes": "^3.6.1",
35-
"react-native-safe-area-context": "^4.8.1",
36-
"react-native-screens": "^3.29.0",
35+
"react-native-safe-area-context": "4.10.0-rc.1",
36+
"react-native-screens": "^3.30.1",
3737
"react-native-tab-view": "^3.5.2",
3838
"react-native-tcp": "github:aprock/react-native-tcp",
3939
"react-native-vector-icons": "^10.0.0",
40-
"react-native-webview": "^13.6.3",
40+
"react-native-webview": "^13.8.4",
4141
"semaphore-async-await": "^1.5.1",
4242
"stream-browserify": "^3.0.0",
4343
"zustand": "^4.3.9"
@@ -46,10 +46,10 @@
4646
"@babel/core": "^7.22.9",
4747
"@babel/preset-env": "^7.22.9",
4848
"@babel/runtime": "^7.22.6",
49-
"@react-native/babel-preset": "0.73.19",
50-
"@react-native/eslint-config": "0.73.2",
51-
"@react-native/metro-config": "0.73.3",
52-
"@react-native/typescript-config": "0.73.1",
49+
"@react-native/babel-preset": "0.74.76",
50+
"@react-native/eslint-config": "0.74.76",
51+
"@react-native/metro-config": "0.74.76",
52+
"@react-native/typescript-config": "0.74.76",
5353
"@types/jest": "^29.5.3",
5454
"@types/metro-config": "^0.76.3",
5555
"@types/node": "^20.4.2",

src/components/accounts/MicrosoftLogin.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ const MicrosoftLogin = ({ close }: { close: () => void }): JSX.Element => {
149149
ref={webview}
150150
originWhitelist={['*']}
151151
source={html ? { html } : { uri }}
152-
onNavigationStateChange={ev => {
152+
onNavigationStateChange={(ev: WebViewNavigation) => {
153153
handleNavigationStateChange(ev).catch(console.error)
154154
}}
155155
/>

0 commit comments

Comments
 (0)