Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased (develop)

- changed: Upgrade to React Native 0.83.2 and enable the new architecture (Fabric/TurboModules)
- fixed: iOS build failure in the "Bundle React Native code and images" script phase under RN 0.83, by patching with-environment.sh to eval the Sentry-wrapped bundle command instead of running it as a single path.

## 4.49.0 (staging)

- added: Monero wallet import support
Expand Down
3 changes: 2 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:usesCleartextTraffic="true"
android:theme="@style/AppTheme">
android:theme="@style/AppTheme"
android:supportsRtl="true">
<meta-data android:name="io.sentry.auto-init" android:value="false" />
<meta-data android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@mipmap/edge_logo_hollow" />
Expand Down
64 changes: 25 additions & 39 deletions android/app/src/main/java/co/edgesecure/app/MainApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,10 @@ import android.content.res.Configuration
import com.facebook.react.PackageList
import com.facebook.react.ReactApplication
import com.facebook.react.ReactHost
import com.facebook.react.ReactNativeHost
import com.facebook.react.ReactPackage
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
import com.facebook.react.defaults.DefaultReactNativeHost
import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative
import com.facebook.react.modules.i18nmanager.I18nUtil
import com.facebook.react.soloader.OpenSourceMergedSoMapping
import com.facebook.soloader.SoLoader
import expo.modules.ApplicationLifecycleDispatcher.onApplicationCreate
import expo.modules.ApplicationLifecycleDispatcher.onConfigurationChanged
import expo.modules.ReactNativeHostWrapper
import expo.modules.ApplicationLifecycleDispatcher
import expo.modules.ExpoReactHostFactory
import io.sentry.Hint
import io.sentry.SentryEvent
import io.sentry.SentryLevel
Expand All @@ -26,28 +19,20 @@ import io.sentry.android.core.SentryAndroid
class MainApplication :
Application(),
ReactApplication {
override val reactNativeHost: ReactNativeHost =
ReactNativeHostWrapper(
this,
object : DefaultReactNativeHost(this) {
override fun getPackages(): List<ReactPackage> {
// Packages that cannot be autolinked yet can be added manually here, for
// example:
// packages.add(new MyReactNativePackage());
return PackageList(this).packages
}

override fun getJSMainModuleName(): String = "index"

override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG

override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
},
override val reactHost: ReactHost by lazy {
ExpoReactHostFactory.getDefaultReactHost(
context = applicationContext,
packageList =
PackageList(this).packages.apply {
// Packages that cannot be autolinked yet can be added manually here, for example:
// add(MyReactNativePackage())
},
// The app's JS entry is `index.ts`; match the iOS bundle root so Metro
// resolves `index` instead of the default `index.android` (which the new
// ExpoReactHostFactory derives from jsBundleAssetPath and does not exist).
jsMainModulePath = "index",
)

override val reactHost: ReactHost
get() = getDefaultReactHost(applicationContext, reactNativeHost)
}

override fun onCreate() {
super.onCreate()
Expand Down Expand Up @@ -102,17 +87,18 @@ class MainApplication :
// Background task:
MessagesWorker.ensureScheduled(context)
// MessagesWorker.testRun(context);
SoLoader.init(this, OpenSourceMergedSoMapping)
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this
// app.
load()
}
onApplicationCreate(this)

// React Native template code:
loadReactNative(this)

// Expo integration:
ApplicationLifecycleDispatcher.onApplicationCreate(this)
}

override fun onConfigurationChanged(newConfig: Configuration) {
super.onConfigurationChanged(newConfig)
onConfigurationChanged(this, newConfig)

// Expo integration:
ApplicationLifecycleDispatcher.onConfigurationChanged(this, newConfig)
}
}
9 changes: 7 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ buildscript {
ext {
buildToolsVersion = "35.0.0"
minSdkVersion = 28 // Edge modified from 21
compileSdkVersion = 35
targetSdkVersion = 35
compileSdkVersion = 36
targetSdkVersion = 36
ndkVersion = "27.1.12297006"
kotlinVersion = "2.3.20" // Required by zcash-android-sdk >= 2.4.8 (Kotlin 2.3 metadata)
}
Expand All @@ -28,4 +28,9 @@ buildscript {
}
}

// KSP no longer uses the <kotlin>-<ksp> version scheme past Kotlin 2.2.x; for Kotlin
// 2.3 (required by zcash-android-sdk) use the independently-versioned KSP2 line, since
// expo-root-project's Kotlin->KSP lookup table does not yet know Kotlin 2.3.
ext.kspVersion = "2.3.9"
apply plugin: "com.facebook.react.rootproject"
apply plugin: "expo-root-project"
10 changes: 6 additions & 4 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true

# Version of flipper SDK to use with React Native
FLIPPER_VERSION=0.125.0

# Use this property to specify which architecture you want to build.
# You can also override it from the CLI using
# ./gradlew <task> -PreactNativeArchitectures=x86_64
Expand All @@ -37,10 +34,15 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a
# your application. You should enable this flag either if you want
# to write custom TurboModules/Fabric components OR use libraries that
# are providing them.
newArchEnabled=false
newArchEnabled=true

# Use this property to enable or disable the Hermes JS engine.
# If set to false, you will be using JSC instead.
hermesEnabled=true

# Use this property to enable edge-to-edge display support.
# This allows your app to draw behind system bars for an immersive UI.
# Note: Only works with ReactActivity and should not be used with custom Activity.
edgeToEdgeEnabled=false

VisionCamera_enableCodeScanner=true
Binary file modified android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
4 changes: 2 additions & 2 deletions android/gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions android/gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 18 additions & 5 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") }
plugins { id("com.facebook.react.settings") }
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
// Expo integration:
pluginManagement {
includeBuild("../node_modules/@react-native/gradle-plugin")
includeBuild("../node_modules/expo-modules-autolinking/android/expo-gradle-plugin")
}
plugins {
id("com.facebook.react.settings")
id("expo-autolinking-settings")
}
extensions.configure(com.facebook.react.ReactSettingsExtension) {
ex -> ex.autolinkLibrariesFromCommand(expoAutolinking.rnConfigCommand)
}

// React template code:
rootProject.name = 'co.edgesecure.app'
include ':app'
includeBuild('../node_modules/@react-native/gradle-plugin')

apply from: new File(["node", "--print", "require.resolve('expo/package.json')"].execute(null, rootDir).text.trim(), "../scripts/autolinking.gradle")
useExpoModules()
// Expo integration:
expoAutolinking.useExpoModules()
expoAutolinking.useExpoVersionCatalog()
includeBuild(expoAutolinking.reactNativeGradlePlugin)
14 changes: 3 additions & 11 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
module.exports = function (api) {
const isAndroid = api.caller(c => c.platform === 'android')

return {
presets: ['module:@react-native/babel-preset'],
plugins: [
isAndroid
? './node_modules/r3-hack/node_modules/react-native-reanimated/plugin'
: 'react-native-worklets/plugin'
]
}
module.exports = {
presets: ['babel-preset-expo'],
plugins: ['react-native-worklets/plugin']
}
4 changes: 2 additions & 2 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export default [
'src/components/FioAddress/FioActionSubmit.tsx',
'src/components/FioAddress/FioName.tsx',
'src/components/hoc/maybeComponent.tsx',
'src/components/hoc/styled.tsx',

'src/components/hoc/withExtendedTouchable.tsx',

'src/components/icons/FiatIcon.tsx',
Expand Down Expand Up @@ -463,7 +463,7 @@ export default [
'src/styles/common/textStyles.tsx',
'src/styles/common/textStylesThemed.ts',
'src/types/reactRedux.ts',
'src/util/borrowUtils.ts',

'src/util/cleaners.ts',

'src/util/crypto.ts',
Expand Down
Loading
Loading