From 2b56067e0ec23f7199b00eec5cdbb2d1984115ca Mon Sep 17 00:00:00 2001 From: TheTrunk Date: Wed, 6 Mar 2024 12:23:04 +0700 Subject: [PATCH] update rn 73 implementation --- Gemfile | 4 +- android/app/build.gradle | 2 +- .../src/main/java/com/sspkey/MainActivity.kt | 6 -- .../main/java/com/sspkey/MainApplication.kt | 10 ++-- .../gradle/wrapper/gradle-wrapper.properties | 1 + ios/SSPKey.xcodeproj/project.pbxproj | 2 + package.json | 58 +++++++++---------- 7 files changed, 41 insertions(+), 42 deletions(-) diff --git a/Gemfile b/Gemfile index 1fa2c2e..b23a340 100644 --- a/Gemfile +++ b/Gemfile @@ -3,4 +3,6 @@ source 'https://rubygems.org' # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version ruby ">= 2.6.10" -gem 'cocoapods', '~> 1.12' +# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper +# bound in the template on Cocoapods with next React Native release. +gem 'cocoapods', '>= 1.13', '< 1.15' \ No newline at end of file diff --git a/android/app/build.gradle b/android/app/build.gradle index 0abb2b9..efb3766 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -40,7 +40,7 @@ react { // The name of the generated asset file containing your JS bundle // bundleAssetName = "MyApplication.android.bundle" // - // The entry file for bundle generation. Default is 'index.android.js' or 'index.ts' + // The entry file for bundle generation. Default is 'index.android.js' or 'index.js' // entryFile = file("../js/MyApplication.android.js") // // A list of extra flags to pass to the 'bundle' commands. diff --git a/android/app/src/main/java/com/sspkey/MainActivity.kt b/android/app/src/main/java/com/sspkey/MainActivity.kt index ba824e0..81a06f5 100644 --- a/android/app/src/main/java/com/sspkey/MainActivity.kt +++ b/android/app/src/main/java/com/sspkey/MainActivity.kt @@ -1,6 +1,5 @@ package com.runonflux.sspkey -import android.os.Bundle import com.facebook.react.ReactActivity import com.facebook.react.ReactActivityDelegate import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled @@ -20,9 +19,4 @@ class MainActivity : ReactActivity() { */ override fun createReactActivityDelegate(): ReactActivityDelegate = DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled) - - override fun onCreate(savedInstance: Bundle?) { - super.onCreate(savedInstance) - setTheme(com.runonflux.sspkey.R.style.AppTheme) - } } \ No newline at end of file diff --git a/android/app/src/main/java/com/sspkey/MainApplication.kt b/android/app/src/main/java/com/sspkey/MainApplication.kt index ba8fac9..979ae76 100644 --- a/android/app/src/main/java/com/sspkey/MainApplication.kt +++ b/android/app/src/main/java/com/sspkey/MainApplication.kt @@ -16,11 +16,11 @@ class MainApplication : Application(), ReactApplication { override val reactNativeHost: ReactNativeHost = object : DefaultReactNativeHost(this) { - override fun getPackages(): List { - // Packages that cannot be autolinked yet can be added manually here, for example: - // packages.add(new MyReactNativePackage()); - return PackageList(this).packages - } + override fun getPackages(): List = + PackageList(this).packages.apply { + // Packages that cannot be autolinked yet can be added manually here, for example: + // add(MyReactNativePackage()) + } override fun getJSMainModuleName(): String = "index" diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 03bc515..d11cdd9 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -2,5 +2,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/ios/SSPKey.xcodeproj/project.pbxproj b/ios/SSPKey.xcodeproj/project.pbxproj index b673bc5..4d5ec93 100644 --- a/ios/SSPKey.xcodeproj/project.pbxproj +++ b/ios/SSPKey.xcodeproj/project.pbxproj @@ -651,6 +651,7 @@ ); REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; + USE_HERMES = true; }; name = Debug; }; @@ -729,6 +730,7 @@ ); REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; + USE_HERMES = true; VALIDATE_PRODUCT = YES; }; name = Release; diff --git a/package.json b/package.json index 81eebad..0dcd2fe 100644 --- a/package.json +++ b/package.json @@ -20,9 +20,9 @@ "@react-native-firebase/app": "^18.7.3", "@react-native-firebase/messaging": "^18.7.3", "@react-native-picker/picker": "^2.6.1", - "@react-navigation/native": "^6.1.9", - "@react-navigation/stack": "^6.3.20", - "@reduxjs/toolkit": "^2.0.1", + "@react-navigation/native": "^6.1.14", + "@react-navigation/stack": "^6.3.25", + "@reduxjs/toolkit": "^2.2.1", "@runonflux/react-native-step-indicator": "^1.0.0", "@runonflux/utxo-lib": "^1.0.0", "@scure/bip32": "^1.3.3", @@ -34,52 +34,52 @@ "crypto-js": "^4.2.0", "events": "^3.3.0", "fastestsmallesttextencoderdecoder": "^1.0.22", - "i18next": "^23.7.11", + "i18next": "^23.10.0", "postinstall-postinstall": "^2.1.0", "process": "^0.11.10", "react": "~18.2.0", - "react-i18next": "^13.2.0", - "react-native": "~0.73.1", + "react-i18next": "^14.0.5", + "react-native": "~0.73.5", "react-native-biometrics": "^3.0.1", "react-native-camera-kit": "13.0.0", - "react-native-device-info": "^10.12.0", + "react-native-device-info": "^10.13.1", "react-native-encrypted-storage": "^4.0.3", - "react-native-gesture-handler": "^2.14.0", + "react-native-gesture-handler": "^2.15.0", "react-native-keyboard-aware-scroll-view": "^0.9.5", - "react-native-mmkv": "^2.11.0", + "react-native-mmkv": "^2.12.1", "react-native-permissions": "^3.10.1", "react-native-popup-menu": "^0.16.1", "react-native-quick-base64": "^2.0.8", "react-native-quick-crypto": "^0.6.1", "react-native-randombytes": "^3.6.1", - "react-native-reanimated": "^3.6.1", - "react-native-safe-area-context": "^4.8.1", + "react-native-reanimated": "^3.7.2", + "react-native-safe-area-context": "^4.9.0", "react-native-screens": "^3.29.0", "react-native-svg": "^14.1.0", "react-native-toast-message": "^2.2.0", "react-native-vector-icons": "^10.0.3", - "react-redux": "^9.0.4", - "readable-stream": "^4.5.1", + "react-redux": "^9.1.0", + "readable-stream": "^4.5.2", "redux-persist": "^6.0.0", - "socket.io-client": "^4.7.2", + "socket.io-client": "^4.7.4", "stream-browserify": "^3.0.0", "util": "^0.12.5" }, "devDependencies": { - "@babel/core": "^7.23.6", - "@babel/preset-env": "^7.23.6", - "@babel/runtime": "^7.23.6", - "@react-native/babel-preset": "^0.73.18", + "@babel/core": "^7.24.0", + "@babel/preset-env": "^7.24.0", + "@babel/runtime": "^7.24.0", + "@react-native/babel-preset": "^0.73.21", "@react-native/eslint-config": "^0.74.0", "@react-native/metro-config": "^0.73.2", - "@react-native/typescript-config": "^0.73.1", - "@react-navigation/devtools": "^6.0.20", + "@react-native/typescript-config": "^0.74.0", + "@react-navigation/devtools": "^6.0.23", "@testing-library/jest-native": "^5.4.3", - "@testing-library/react-native": "^12.4.2", - "@types/jest": "^29.5.11", + "@testing-library/react-native": "^12.4.3", + "@types/jest": "^29.5.12", "@types/metro-config": "^0.76.3", - "@types/node": "^20.10.5", - "@types/react": "^18.2.45", + "@types/node": "^20.11.24", + "@types/react": "^18.2.63", "@types/react-native": "^0.73.0", "@types/react-native-vector-icons": "^6.4.18", "@types/react-test-renderer": "^18.0.7", @@ -88,15 +88,15 @@ "babel-plugin-module-resolver": "^5.0.0", "babel-plugin-rewrite-require": "^1.14.5", "babel-plugin-root-import": "^6.6.0", - "dotenv": "^16.3.1", - "eslint": "^8.56.0", - "eslint-plugin-prettier": "^5.1.0", + "dotenv": "^16.4.5", + "eslint": "^8.57.0", + "eslint-plugin-prettier": "^5.1.3", "jest": "^29.7.0", "patch-package": "^8.0.0", - "prettier": "^3.1.1", + "prettier": "^3.2.5", "react-native-svg-transformer": "^1.3.0", "react-test-renderer": "18.2.0", - "redux-flipper": "^2.0.2", + "redux-flipper": "^2.0.3", "rn-nodeify": "^10.3.0", "typescript": "^5.3.3" },