Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
b0025d5
Updated react-native-documents/picker lib and related implementation
CandelR Feb 19, 2026
6225bf1
Added folder upload UI, logic to pick folders and tests
CandelR Feb 20, 2026
bbffb57
Merge pull request #366 from internxt/feature/PB-5947-update-react-na…
CandelR Feb 20, 2026
3cdea30
Merge pull request #368 from internxt/feat/PB-5948-add-upload-folder-ui
CandelR Feb 20, 2026
20a1cd6
Added traverse folder service for file:// paths (iOS)
CandelR Feb 20, 2026
5fb81cd
Added Android SAF folder traversal with expo-file-system patch
CandelR Feb 20, 2026
d71b885
Merge pull request #369 from internxt/feature/PB-5949-add-ios-traversal
CandelR Feb 20, 2026
f93d7f1
Added folder upload orchestration with progress and cancellation
CandelR Feb 24, 2026
b143b95
Merge pull request #370 from internxt/feature/PB-5950-android-folder-…
CandelR Feb 24, 2026
3d9fdd1
Added tests for folder upload orchestration service
CandelR Feb 24, 2026
fe20e64
Refactor test descriptions for clarity in folder upload services
CandelR Feb 24, 2026
3d0c7fa
Fix sonar cloud issues
CandelR Feb 24, 2026
9b15bb0
Merge branch 'feature/PB-5951-folders-upload-orchestration' into feat…
CandelR Feb 24, 2026
b197fe7
Changed object assign for spread
CandelR Feb 24, 2026
00bcb01
Merge pull request #371 from internxt/feature/PB-5951-add-tests
CandelR Feb 24, 2026
e751c38
Merge pull request #372 from internxt/feature/PB-5951-folders-upload-…
CandelR Feb 24, 2026
f34400c
Add name collision handling for folder uploads and moves
CandelR Feb 25, 2026
0dbfaae
feat: integrate expo-share-extension for sharing functionality
CandelR Feb 26, 2026
2d20441
Fixed wrong translation in name collision modal and minor issues
CandelR Feb 26, 2026
76cd7db
Fixes in swift ShareExtensionViewController and minor changes
CandelR Feb 27, 2026
dce46bd
add auth check and not-signed-in screen for iOS and Android
CandelR Mar 2, 2026
727d388
fix: update keychain accessibility to 'When Unlocked' for improved se…
CandelR Mar 2, 2026
8a37b71
feat: create main sharing extesion interface
CandelR Mar 6, 2026
0f0b0f9
feat: navigation and folder listing in share extension
CandelR Mar 6, 2026
f7a35b4
feat: create folders in share extension
CandelR Mar 6, 2026
1b3817c
feat: add rename function and panel
CandelR Mar 6, 2026
d86b132
feat: add ShareSdkManager, replace DriveListViewMode enum to fix shar…
CandelR Mar 9, 2026
cda1fb6
fix: sonar cloud issues
CandelR Mar 9, 2026
25bf908
fix: sonar cloud issues, improve null checks and variable naming in f…
CandelR Mar 10, 2026
a4db2c0
Merge pull request #373 from internxt/feature/PB-5986-name-collision-…
CandelR Mar 10, 2026
4cbabd4
Merge pull request #375 from internxt/feature/PB-5933-share-extension…
CandelR Mar 10, 2026
7c5ca9a
Merge pull request #377 from internxt/feature/PB-5934-add-login-flow
CandelR Mar 12, 2026
73a34e0
Merge pull request #380 from internxt/feature/PB-5935-create-main-sha…
CandelR Mar 12, 2026
819d04a
Merge pull request #381 from internxt/feature/PB-5936-navigation-fold…
CandelR Mar 12, 2026
2b48d86
Merge pull request #382 from internxt/feature/PB-5938-create-folders
CandelR Mar 12, 2026
eeeaf64
Merge pull request #383 from internxt/feature/PB-5939-rename-files-be…
CandelR Mar 12, 2026
827f53d
feat: enhance share extension with additional user data handling
CandelR Mar 13, 2026
eb84654
feat: implement file upload logic and encryption in share extension
CandelR Mar 13, 2026
f3f8bb0
Merge branch 'feature/PB-5318-share-extension' into feature/PB-5937-f…
CandelR Mar 13, 2026
3e3c67e
Enhance file upload error handling and response validation
CandelR Mar 16, 2026
43d7078
Fix sonar cloud issues
CandelR Mar 16, 2026
7a92944
Merge branch 'feature/PB-5937-file-upload-logic' into feature/PB-5937…
CandelR Mar 16, 2026
4d75ace
Fix sonar cloud issues
CandelR Mar 16, 2026
b1ae1b0
Merge branch 'feature/PB-5937-file-upload-logic' into feature/PB-5937…
CandelR Mar 16, 2026
12bafc9
Add CODEOWNERS for encryption files and implement file key generation…
CandelR Mar 16, 2026
d4df71b
Fix sonar issues
CandelR Mar 16, 2026
5d4220a
feat: create success upload ui in share extension, implement deep lin…
CandelR Mar 18, 2026
5ca6418
rename variables for clarity and improve folder data fetching logic
CandelR Mar 18, 2026
c461f28
Use noble for generate random bytes and removed string type in comput…
CandelR Mar 23, 2026
d240dfb
Merge pull request #385 from internxt/feature/PB-5937-file-upload-logic
CandelR Mar 24, 2026
dcb20f6
Merge pull request #386 from internxt/feature/PB-5937-file-upload-log…
CandelR Mar 24, 2026
ab4ed91
Merge pull request #389 from internxt/feature/PB-6110-uploaded-file-ui
CandelR Mar 24, 2026
9ab7341
Added and refactor thumbnail generation in share extension
CandelR Mar 24, 2026
ac56a5c
implement deep link handling for large file sharing
CandelR Mar 27, 2026
ae65a98
propagate error handling and update upload logic to manage already up…
CandelR Mar 30, 2026
e26e0a4
Implement name collision handling and modal for file uploads
CandelR Mar 31, 2026
f6cb23f
Refactor file upload logic and modularize upload process
CandelR Mar 31, 2026
7e89d2f
Refactor shared file mapping function
CandelR Apr 1, 2026
ab8fa9e
Rename variable for encrypted thumbnail path
CandelR Apr 1, 2026
a39da0e
Merge pull request #392 from internxt/feature/PB-6º49-create-thumbnai…
CandelR Apr 1, 2026
644c738
Merge pull request #395 from internxt/feature/PB-6187-ios-upload-larg…
CandelR Apr 1, 2026
9b9f6ec
Merge pull request #398 from internxt/feature/propagate-errors-and-re…
CandelR Apr 1, 2026
100c6c3
Merge pull request #399 from internxt/feature/add-name-collision-modal
CandelR Apr 1, 2026
67af8cc
Merge pull request #402 from internxt/feature/PB-5877-enable-folder-u…
CandelR Apr 1, 2026
d556afa
Merge branch 'release-v1.9.0' into feature/PB-5318-share-extension
CandelR Apr 1, 2026
2ad9e17
update function parameters to be readonly in NotSignedInScreenProps a…
CandelR Apr 1, 2026
d401e56
Update cancel upload strigs and fixed drive header styles
CandelR Apr 2, 2026
8760c9d
Merge pull request #401 from internxt/feature/PB-5318-share-extension
CandelR Apr 2, 2026
2018497
Bump version to 1.9.0 and update related configurations, fixed sonar …
CandelR Apr 2, 2026
db88929
Merge pull request #405 from internxt/feat/bump-version-1.9.0
CandelR Apr 2, 2026
3830967
fix: replace pure-JS PBKDF2 with native rn-crypto to unblock UI durin…
CandelR Apr 7, 2026
1aaca86
Merge pull request #406 from internxt/bugfix/block-ui-decrypting-thum…
CandelR Apr 7, 2026
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
6 changes: 6 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Encryption / key derivation
src/network/crypto.ts @TamaraFinogina
src/network/crypto.spec.ts @TamaraFinogina
src/shareExtension/services/shareEncryptionService.ts @TamaraFinogina
src/shareExtension/services/shareUploadService.ts @TamaraFinogina
src/network/NetworkFacade.ts @TamaraFinogina
9 changes: 9 additions & 0 deletions __mocks__/@internxt/rn-crypto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import crypto from 'node:crypto';

export const pbkdf2 = (
password: string,
salt: string,
rounds: number,
derivedKeyLength: number,
): Promise<Buffer> =>
Promise.resolve(crypto.pbkdf2Sync(password, salt, rounds, derivedKeyLength, 'sha512'));
33 changes: 19 additions & 14 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ react {
hermesCommand = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsolutePath() + "/sdks/hermesc/%OS-BIN%/hermesc"
codegenDir = new File(["node", "--print", "require.resolve('@react-native/codegen/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim()).getParentFile().getAbsoluteFile()

enableBundleCompression = (findProperty('android.enableBundleCompression') ?: false).toBoolean()
// Use Expo CLI to bundle the app, this ensures the Metro config
// works correctly with Expo projects.
cliFile = new File(["node", "--print", "require.resolve('@expo/cli', { paths: [require.resolve('expo/package.json')] })"].execute(null, rootDir).text.trim())
Expand All @@ -31,6 +32,7 @@ react {
// The list of variants to that are debuggable. For those we're going to
// skip the bundling of the JS bundle and the assets. By default is just 'debug'.
// If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
// debuggableVariants = ["liteDebug", "prodDebug"]
debuggableVariants = ["callbackTiramisuDebug"]

/* Bundling */
Expand Down Expand Up @@ -63,9 +65,9 @@ react {
}

/**
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
* Set this to true in release builds to optimize the app using [R8](https://developer.android.com/topic/performance/app-optimization/enable-app-optimization).
*/
def enableProguardInReleaseBuilds = (findProperty('android.enableProguardInReleaseBuilds') ?: false).toBoolean()
def enableMinifyInReleaseBuilds = (findProperty('android.enableMinifyInReleaseBuilds') ?: false).toBoolean()

/**
* The preferred build flavor of JavaScriptCore (JSC)
Expand All @@ -78,7 +80,7 @@ def enableProguardInReleaseBuilds = (findProperty('android.enableProguardInRelea
* give correct results when using with locales other than en-US. Note that
* this variant is about 6MiB larger per architecture than default.
*/
def jscFlavor = 'org.webkit:android-jsc:+'
def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+'

android {
ndkVersion rootProject.ext.ndkVersion
Expand All @@ -91,17 +93,17 @@ android {
applicationId 'com.internxt.cloud'
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 119
versionName "1.8.7"
}
versionCode 120
versionName "1.9.0"

buildConfigField "String", "REACT_NATIVE_RELEASE_LEVEL", "\"${findProperty('reactNativeReleaseLevel') ?: 'stable'}\""
}
flavorDimensions "react-native-capture-protection"
productFlavors {
callbackTiramisu {
dimension "react-native-capture-protection"
}
}

signingConfigs {
debug {
storeFile file('debug.keystore')
Expand All @@ -124,15 +126,18 @@ android {
// Caution! In production, you need to generate your own keystore file.
// see https://reactnative.dev/docs/signed-apk-android.
signingConfig signingConfigs.debug
shrinkResources (findProperty('android.enableShrinkResourcesInReleaseBuilds')?.toBoolean() ?: false)
minifyEnabled enableProguardInReleaseBuilds
def enableShrinkResources = findProperty('android.enableShrinkResourcesInReleaseBuilds') ?: 'false'
shrinkResources enableShrinkResources.toBoolean()
minifyEnabled enableMinifyInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
crunchPngs (findProperty('android.enablePngCrunchInReleaseBuilds')?.toBoolean() ?: true)
def enablePngCrunchInRelease = findProperty('android.enablePngCrunchInReleaseBuilds') ?: 'true'
crunchPngs enablePngCrunchInRelease.toBoolean()
}
}
packagingOptions {
jniLibs {
useLegacyPackaging (findProperty('expo.useLegacyPackaging')?.toBoolean() ?: false)
def enableLegacyPackaging = findProperty('expo.useLegacyPackaging') ?: 'false'
useLegacyPackaging enableLegacyPackaging.toBoolean()
}
}
androidResources {
Expand Down Expand Up @@ -170,15 +175,15 @@ dependencies {

if (isGifEnabled) {
// For animated gif support
implementation("com.facebook.fresco:animated-gif:${reactAndroidLibs.versions.fresco.get()}")
implementation("com.facebook.fresco:animated-gif:${expoLibs.versions.fresco.get()}")
}

if (isWebpEnabled) {
// For webp support
implementation("com.facebook.fresco:webpsupport:${reactAndroidLibs.versions.fresco.get()}")
implementation("com.facebook.fresco:webpsupport:${expoLibs.versions.fresco.get()}")
if (isWebpAnimatedEnabled) {
// Animated webp support
implementation("com.facebook.fresco:animated-webp:${reactAndroidLibs.versions.fresco.get()}")
implementation("com.facebook.fresco:animated-webp:${expoLibs.versions.fresco.get()}")
}
}

Expand Down
7 changes: 7 additions & 0 deletions android/app/src/debugOptimized/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

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

<application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" tools:replace="android:usesCleartextTraffic" />
</manifest>
18 changes: 14 additions & 4 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO"/>
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO"/>
<uses-permission android:name="android.permission.READ_MEDIA_VISUAL_USER_SELECTED"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
Expand All @@ -16,13 +19,12 @@
<data android:scheme="https"/>
</intent>
</queries>
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="false" android:theme="@style/AppTheme" android:supportsRtl="false" android:usesCleartextTraffic="false" android:requestLegacyExternalStorage="true">
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="false" android:theme="@style/AppTheme" android:supportsRtl="true" android:usesCleartextTraffic="false" android:enableOnBackInvokedCallback="false" android:requestLegacyExternalStorage="true">
<meta-data android:name="expo.modules.updates.ENABLED" android:value="true"/>
<meta-data android:name="expo.modules.updates.EXPO_RUNTIME_VERSION" android:value="@string/expo_runtime_version"/>
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_CHECK_ON_LAUNCH" android:value="ALWAYS"/>
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_LAUNCH_WAIT_MS" android:value="0"/>
<meta-data android:name="expo.modules.updates.EXPO_UPDATE_URL" android:value="https://u.expo.dev/680f4feb-6315-4a50-93ec-36dcd0b831d2"/>
<meta-data android:name="io.sentry.auto-init" android:value="false"/>
<activity android:name=".MainActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|uiMode|locale|layoutDirection" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:theme="@style/Theme.App.SplashScreen" android:exported="true" android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
Expand All @@ -33,7 +35,16 @@
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="internxt"/>
<data android:scheme="com.internxt.cloud"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="*/*"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND_MULTIPLE"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="*/*"/>
</intent-filter>
<intent-filter data-generated="true">
<action android:name="android.intent.action.VIEW"/>
Expand All @@ -47,6 +58,5 @@
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<provider android:name="io.sentry.android.core.SentryInitProvider" android:authorities="${applicationId}.SentryInitProvider" tools:node="remove"/>
</application>
</manifest>
119 changes: 86 additions & 33 deletions android/app/src/main/java/com/internxt/cloud/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -1,61 +1,114 @@
package com.internxt.cloud
import expo.modules.splashscreen.SplashScreenManager

import android.content.Intent
import android.net.Uri
import android.os.Build
import android.os.Bundle

import android.provider.OpenableColumns
import com.facebook.react.ReactActivity
import com.facebook.react.ReactActivityDelegate
import com.facebook.react.bridge.Arguments
import com.facebook.react.bridge.WritableArray
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
import com.facebook.react.defaults.DefaultReactActivityDelegate

import expo.modules.ReactActivityDelegateWrapper
import expo.modules.splashscreen.SplashScreenManager

class MainActivity : ReactActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
// @generated begin expo-splashscreen - expo prebuild (DO NOT MODIFY) sync-f3ff59a738c56c9a6119210cb55f0b613eb8b6af
// @generated begin expo-splashscreen - expo prebuild (DO NOT MODIFY)
// sync-f3ff59a738c56c9a6119210cb55f0b613eb8b6af
SplashScreenManager.registerOnActivity(this)
// @generated end expo-splashscreen
super.onCreate(null)
parseShareIntent(intent)
}

override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent)
setIntent(intent)
val files = parseShareIntent(intent) ?: return
ShareIntentModule.emitFilesIfReady(files)
}

/**
* Returns the name of the main component registered from JavaScript. This is used to schedule
* rendering of the component.
*/
override fun getMainComponentName(): String = "main"

/**
* Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
* which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
*/
override fun createReactActivityDelegate(): ReactActivityDelegate {
return ReactActivityDelegateWrapper(
this,
BuildConfig.IS_NEW_ARCHITECTURE_ENABLED,
object : DefaultReactActivityDelegate(
this,
mainComponentName,
fabricEnabled
){})
this,
BuildConfig.IS_NEW_ARCHITECTURE_ENABLED,
object : DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled) {}
)
}

/**
* Align the back button behavior with Android S
* where moving root activities to background instead of finishing activities.
* @see <a href="https://developer.android.com/reference/android/app/Activity#onBackPressed()">onBackPressed</a>
*/
override fun invokeDefaultOnBackPressed() {
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.R) {
if (!moveTaskToBack(false)) {
// For non-root activities, use the default implementation to finish them.
super.invokeDefaultOnBackPressed()
}
return
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.R) {
if (!moveTaskToBack(false)) {
super.invokeDefaultOnBackPressed()
}
return
}
super.invokeDefaultOnBackPressed()
}

private fun parseShareIntent(intent: Intent): WritableArray? {
val action = intent.action ?: return null
if (action != Intent.ACTION_SEND && action != Intent.ACTION_SEND_MULTIPLE) return null

val uris = mutableListOf<Uri>()
val mimeType = intent.type

// Use the default back button implementation on Android S
// because it's doing more than [Activity.moveTaskToBack] in fact.
super.invokeDefaultOnBackPressed()
if (action == Intent.ACTION_SEND) {
val uri = getParcelableUri(intent) ?: return null
uris.add(uri)
} else {
val list = getParcelableUriList(intent) ?: return null
uris.addAll(list)
}

val files = mutableListOf<Map<String, String?>>()
for (uri in uris) {
files.add(
mapOf(
"uri" to uri.toString(),
"mimeType" to mimeType,
"fileName" to resolveFileName(uri)
)
)
}

ShareIntentModule.pendingFiles = files

val array = Arguments.createArray()
for (file in files) {
val map = Arguments.createMap()
file.forEach { (k, v) -> if (v != null) map.putString(k, v) else map.putNull(k) }
array.pushMap(map)
}
return array
}

private fun resolveFileName(uri: Uri): String? {
return try {
contentResolver.query(uri, null, null, null, null)?.use { cursor ->
if (!cursor.moveToFirst()) return null
val idx = cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME)
if (idx < 0) null else cursor.getString(idx)
}
} catch (e: Exception) {
null
}
}

@Suppress("DEPRECATION")
private fun getParcelableUri(intent: Intent): Uri? =
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU)
intent.getParcelableExtra(Intent.EXTRA_STREAM, Uri::class.java)
else intent.getParcelableExtra(Intent.EXTRA_STREAM)

@Suppress("DEPRECATION")
private fun getParcelableUriList(intent: Intent): ArrayList<Uri>? =
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU)
intent.getParcelableArrayListExtra(Intent.EXTRA_STREAM, Uri::class.java)
else intent.getParcelableArrayListExtra(Intent.EXTRA_STREAM)
}
30 changes: 14 additions & 16 deletions android/app/src/main/java/com/internxt/cloud/MainApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,32 @@ import android.content.res.Configuration

import com.facebook.react.PackageList
import com.facebook.react.ReactApplication
import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative
import com.facebook.react.ReactNativeHost
import com.facebook.react.ReactPackage
import com.facebook.react.ReactHost
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
import com.facebook.react.common.ReleaseLevel
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint
import com.facebook.react.defaults.DefaultReactNativeHost
import com.facebook.react.soloader.OpenSourceMergedSoMapping
import com.facebook.soloader.SoLoader

import expo.modules.ApplicationLifecycleDispatcher
import expo.modules.ReactNativeHostWrapper

class MainApplication : Application(), ReactApplication {

override val reactNativeHost: ReactNativeHost = ReactNativeHostWrapper(
this,
object : DefaultReactNativeHost(this) {
override fun getPackages(): List<ReactPackage> {
val packages = PackageList(this).packages
// Packages that cannot be autolinked yet can be added manually here, for example:
// packages.add(new MyReactNativePackage());
return packages
}
this,
object : DefaultReactNativeHost(this) {
override fun getPackages(): List<ReactPackage> =
PackageList(this).packages.apply {
add(ShareIntentPackage())
}

override fun getJSMainModuleName(): String = ".expo/.virtual-metro-entry"

override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG

override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
}
)

Expand All @@ -42,11 +39,12 @@ class MainApplication : Application(), ReactApplication {

override fun onCreate() {
super.onCreate()
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()
DefaultNewArchitectureEntryPoint.releaseLevel = try {
ReleaseLevel.valueOf(BuildConfig.REACT_NATIVE_RELEASE_LEVEL.uppercase())
} catch (e: IllegalArgumentException) {
ReleaseLevel.STABLE
}
loadReactNative(this)
ApplicationLifecycleDispatcher.onApplicationCreate(this)
}

Expand Down
Loading
Loading