Skip to content
Closed
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
9 changes: 0 additions & 9 deletions android/app/src/debug/AndroidManifest.xml

This file was deleted.

1 change: 1 addition & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
android:requestLegacyExternalStorage="true"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="${usesCleartextTraffic}"
android:hardwareAccelerated="true"
tools:replace="android:allowBackup">
<activity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ import com.facebook.react.ReactApplication
import com.facebook.react.ReactHost
import com.facebook.react.ReactInstanceEventListener
import com.facebook.react.ReactNativeHost
import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative
import com.facebook.react.ReactPackage
import com.facebook.react.bridge.ReactContext
import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
import com.facebook.react.defaults.DefaultReactNativeHost
import com.facebook.react.soloader.OpenSourceMergedSoMapping
import com.facebook.soloader.SoLoader
import com.nozbe.watermelondb.jsi.WatermelonDBJSIPackage;
import com.bugsnag.android.Bugsnag
import expo.modules.ApplicationLifecycleDispatcher
Expand Down Expand Up @@ -61,15 +59,13 @@ open class MainApplication : Application(), ReactApplication {

override fun onCreate() {
super.onCreate()
SoLoader.init(this, OpenSourceMergedSoMapping)
Bugsnag.start(this)

// Initialize MMKV encryption - reads existing key or generates new one
// Must run before React Native starts to avoid race conditions
MMKVKeyManager.initialize(this)

// Load the native entry point for the New Architecture
load()
loadReactNative(this)

// Register listener to set React context when initialized
reactHost.addReactInstanceEventListener(object : ReactInstanceEventListener {
Expand Down
8 changes: 4 additions & 4 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
buildscript {
ext {
buildToolsVersion = "35.0.0"
buildToolsVersion = "36.0.0"
minSdkVersion = 24
compileSdkVersion = 35
targetSdkVersion = 35
compileSdkVersion = 36
targetSdkVersion = 36
ndkVersion = "27.1.12297006"
kotlinVersion = "2.0.21"
kotlinVersion = "2.1.20"
kotlin_version = kotlinVersion
glideVersion = "4.11.0"
supportLibVersion = "28.0.0"
Expand Down
7 changes: 6 additions & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,9 @@ BugsnagAPIKey=""

# Use this property to enable or disable the Hermes JS engine.
# If set to false, you will be using JSC instead.
hermesEnabled=true
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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

planning to enable edge to edge with unistyle migration

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-8.14.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
4 changes: 2 additions & 2 deletions android/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;;
esac

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
CLASSPATH="\\\"\\\""


# Determine the Java command to use to start the JVM.
Expand Down Expand Up @@ -213,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"

# Stop when "xargs" is not available.
Expand Down
9 changes: 7 additions & 2 deletions android/gradlew.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
@REM Copyright (c) Meta Platforms, Inc. and affiliates.
@REM
@REM This source code is licensed under the MIT license found in the
@REM LICENSE file in the root directory of this source tree.

@rem
@rem Copyright 2015 the original author or authors.
@rem
Expand Down Expand Up @@ -70,11 +75,11 @@ goto fail
:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
set CLASSPATH=


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*

:end
@rem End local scope for the variables with windows NT shell
Expand Down
3 changes: 2 additions & 1 deletion app.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"name": "RocketChatRN"
"name": "RocketChatRN",
"plugins": ["expo-web-browser", "react-native-bootsplash"]
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { View, Text } from 'react-native';
import React, { type ReactElement, useEffect, useRef } from 'react';
import { Audio } from 'expo-av';
import { getInfoAsync } from 'expo-file-system';
import { getInfoAsync } from 'expo-file-system/legacy';
import { useKeepAwake } from 'expo-keep-awake';
import { shallowEqual } from 'react-redux';

Expand Down
2 changes: 1 addition & 1 deletion app/lib/encryption/encryption.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { type Model, Q } from '@nozbe/watermelondb';
import EJSON from 'ejson';
import { deleteAsync } from 'expo-file-system';
import { deleteAsync } from 'expo-file-system/legacy';
import {
pbkdf2Hash,
aesEncrypt,
Expand Down
2 changes: 1 addition & 1 deletion app/lib/methods/handleMediaDownload.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as FileSystem from 'expo-file-system';
import * as FileSystem from 'expo-file-system/legacy';
import * as mime from 'react-native-mime-types';
import { isEmpty } from 'lodash';
import { type Model } from '@nozbe/watermelondb';
Expand Down
2 changes: 1 addition & 1 deletion app/lib/methods/helpers/fileDownload.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as FileSystem from 'expo-file-system';
import * as FileSystem from 'expo-file-system/legacy';
import FileViewer from 'react-native-file-viewer';

import { LISTENER } from '../../../containers/Toast';
Expand Down
2 changes: 1 addition & 1 deletion app/lib/methods/helpers/fileUpload/Upload.android.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as FileSystem from 'expo-file-system';
import * as FileSystem from 'expo-file-system/legacy';

import { type TRoomsMediaResponse } from '../../../../definitions/rest/v1/rooms';
import { type IFormData } from './definitions';
Expand Down
4 changes: 2 additions & 2 deletions app/lib/methods/helpers/sslPinning.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Alert, Platform, NativeModules } from 'react-native';
import * as DocumentPicker from 'expo-document-picker';
import * as FileSystem from 'expo-file-system';
import * as FileSystem from 'expo-file-system/legacy';

import UserPreferences from '../userPreferences';
import I18n from '../../../i18n';
Expand Down Expand Up @@ -61,7 +61,7 @@ const RCSSLPinning = Platform.select({
[
{
text: 'OK',
onPress: async password => {
onPress: async (password?: string) => {
try {
const certificatePath = getPath(name);
await FileSystem.copyAsync({ from: uri, to: certificatePath });
Expand Down
2 changes: 1 addition & 1 deletion app/lib/methods/sendFileMessage/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { sanitizedRaw } from '@nozbe/watermelondb/RawRecord';
import isEmpty from 'lodash/isEmpty';
import { Alert } from 'react-native';
import * as FileSystem from 'expo-file-system';
import * as FileSystem from 'expo-file-system/legacy';

import { getUploadByPath } from '../../database/services/Upload';
import { type IUpload, type TUploadModel } from '../../../definitions';
Expand Down
2 changes: 1 addition & 1 deletion app/views/AttachmentView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import React from 'react';
import { PermissionsAndroid, useWindowDimensions, View } from 'react-native';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { shallowEqual } from 'react-redux';
import * as FileSystem from 'expo-file-system';
import * as FileSystem from 'expo-file-system/legacy';

import { isImageBase64 } from '../lib/methods/isImageBase64';
import RCActivityIndicator from '../containers/ActivityIndicator';
Expand Down
6 changes: 4 additions & 2 deletions app/views/ShareListView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { type Dispatch } from 'redux';
import { type NativeStackNavigationProp } from '@react-navigation/native-stack';
import { BackHandler, FlatList, Keyboard, type NativeEventSubscription, Text, View } from 'react-native';
import * as FileSystem from 'expo-file-system';
import * as FileSystem from 'expo-file-system/legacy';
import { connect } from 'react-redux';
import * as mime from 'react-native-mime-types';
import { dequal } from 'dequal';
Expand Down Expand Up @@ -101,7 +101,9 @@ class ShareListView extends React.Component<IShareListViewProps, IState> {
const { mediaUris } = shareExtensionParams;
if (mediaUris) {
try {
const info = await Promise.all(mediaUris.split(',').map((uri: string) => FileSystem.getInfoAsync(uri, { size: true })));
const info = (await Promise.all(
mediaUris.split(',').map((uri: string) => FileSystem.getInfoAsync(uri))
)) as FileSystem.FileInfo[];
const attachments = info.map(file => {
if (!file.exists) {
return null;
Expand Down
6 changes: 4 additions & 2 deletions ios/NotificationService/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
<dict>
<key>AppGroup</key>
<string>group.ios.chat.rocket</string>
<key>IS_OFFICIAL</key>
<false/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
Expand All @@ -24,6 +22,8 @@
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>IS_OFFICIAL</key>
<false/>
<key>KeychainGroup</key>
<string>$(AppIdentifierPrefix)chat.rocket.reactnative</string>
<key>NSExtension</key>
Expand All @@ -33,5 +33,7 @@
<key>NSExtensionPrincipalClass</key>
<string>$(PRODUCT_MODULE_NAME).NotificationService</string>
</dict>
<key>RCTNewArchEnabled</key>
<true/>
</dict>
</plist>
Loading
Loading