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
14 changes: 7 additions & 7 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ if (!sentrySlug.contains('SENTRY_ORGANIZATION')) {
}

android {
ndkVersion rootProject.ext.ndkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
compileSdk rootProject.ext.compileSdkVersion
ndkVersion = rootProject.ext.ndkVersion
buildToolsVersion = rootProject.ext.buildToolsVersion
compileSdk = rootProject.ext.compileSdkVersion

namespace "co.edgesecure.app"
namespace = "co.edgesecure.app"
defaultConfig {
applicationId "co.edgesecure.app"
minSdkVersion rootProject.ext.minSdkVersion
Expand All @@ -99,7 +99,7 @@ android {
versionName "99.99.99"

// Edge addition:
multiDexEnabled true
multiDexEnabled = true
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a' // Exclude Intel
}
Expand All @@ -113,7 +113,7 @@ android {
release {
// Caution! In production, you need to generate your own keystore file.
// see https://reactnative.dev/docs/signed-apk-android.
signingConfig signingConfigs.release
signingConfig = signingConfigs.release
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
Expand All @@ -123,7 +123,7 @@ android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
coreLibraryDesugaringEnabled true
coreLibraryDesugaringEnabled = true
}

// Edge hacks for zcash and piratechain conflicts:
Expand Down
7 changes: 6 additions & 1 deletion android/app/src/main/java/co/edgesecure/app/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import com.facebook.react.ReactActivityDelegate
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
import com.facebook.react.defaults.DefaultReactActivityDelegate
import com.zoontek.rnbootsplash.RNBootSplash
import expo.modules.ReactActivityDelegateWrapper

class MainActivity : ReactActivity() {
/**
Expand All @@ -21,7 +22,11 @@ class MainActivity : ReactActivity() {
* which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
*/
override fun createReactActivityDelegate(): ReactActivityDelegate =
DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
ReactActivityDelegateWrapper(
this,
BuildConfig.IS_NEW_ARCHITECTURE_ENABLED,
DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
)

// Edge addition
override fun onCreate(savedInstanceState: Bundle?) {
Expand Down
18 changes: 10 additions & 8 deletions android/app/src/main/java/co/edgesecure/app/MainApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@ 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.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.ApplicationLifecycleDispatcher
import expo.modules.ReactNativeHostWrapper
import io.sentry.Hint
import io.sentry.SentryEvent
Expand All @@ -24,12 +22,10 @@ import io.sentry.SentryOptions.BeforeSendCallback
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:
Expand All @@ -47,7 +43,7 @@ class MainApplication : Application(), ReactApplication {
)

override val reactHost: ReactHost
get() = getDefaultReactHost(applicationContext, reactNativeHost)
get() = ReactNativeHostWrapper.createReactHost(applicationContext, reactNativeHost)

override fun onCreate() {
super.onCreate()
Expand Down Expand Up @@ -101,17 +97,23 @@ class MainApplication : Application(), ReactApplication {
// Background task:
MessagesWorker.ensureScheduled(context)
// MessagesWorker.testRun(context);

// React Native template code:
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)

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

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

// Expo integration:
ApplicationLifecycleDispatcher.onConfigurationChanged(this, newConfig)
}
}
1 change: 1 addition & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ buildscript {
}

apply plugin: "com.facebook.react.rootproject"
apply plugin: "expo-root-project"
2 changes: 1 addition & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ 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.
Expand Down
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)
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
presets: ['module:@react-native/babel-preset'],
presets: ['babel-preset-expo'],
plugins: ['react-native-reanimated/plugin']
}
2 changes: 1 addition & 1 deletion ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ target 'edge' do
:path => config[:reactNativePath],
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/..",
:fabric_enabled => false,
:fabric_enabled => true,
:hermes_enabled => true
)

Expand Down
12 changes: 6 additions & 6 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2497,7 +2497,7 @@ PODS:
- Yoga
- RNSecureRandom (1.0.1):
- React
- RNSentry (6.14.0):
- RNSentry (6.20.0):
- DoubleConversion
- glog
- hermes-engine
Expand All @@ -2520,7 +2520,7 @@ PODS:
- ReactCodegen
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Sentry/HybridSDK (= 8.50.2)
- Sentry/HybridSDK (= 8.53.2)
- Yoga
- RNShare (12.0.11):
- DoubleConversion
Expand Down Expand Up @@ -2654,7 +2654,7 @@ PODS:
- SDWebImageWebPCoder (0.8.5):
- libwebp (~> 1.0)
- SDWebImage/Core (~> 5.10)
- Sentry/HybridSDK (8.50.2)
- Sentry/HybridSDK (8.53.2)
- SocketRocket (0.7.1)
- SQLite.swift/standalone (0.15.3):
- sqlite3
Expand Down Expand Up @@ -3395,15 +3395,15 @@ SPEC CHECKSUMS:
RNReanimated: 35a5a59798fe9a9a61259146be9fe8b0b602ab39
RNScreens: 90b905d545a5ebbe976985702b8a39e3475727b2
RNSecureRandom: b64d263529492a6897e236a22a2c4249aa1b53dc
RNSentry: 33bc24cea8f87ab26521a9330549a82c703b5db4
RNSentry: b4746c5f642ec37c729206232b79ab8c51255d76
RNShare: 6300b941668273d502ecee9122cade0d5ea966bd
RNSound: 436aa4de81ae87b90e1781b5dd9247df3aa4622a
RNStoreReview: 8b47d208282c23296d2466a488a8d9ca1979d79b
RNSVG: 45e3c3210465e75ab6374c9f746179e75d76ce48
RNVectorIcons: f1bc9e04b6f67ec09ea54e6f092e75a9e205c1d7
SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d
SDWebImageWebPCoder: 908b83b6adda48effe7667cd2b7f78c897e5111d
Sentry: d95f5f3b32d01324b3e27d3c52747005302cc026
Sentry: 59993bffde4a1ac297ba6d268dc4bbce068d7c1b
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
SQLite.swift: 8d054987f02728cc912b0eb5a9659650573a65a2
sqlite3: 292c3e1bfe89f64e51ea7fc7dab9182a017c8630
Expand All @@ -3426,6 +3426,6 @@ SPEC CHECKSUMS:
ZIPFoundation: b1f0de4eed33e74a676f76e12559ab6b75990197
ZXingObjC: 8898711ab495761b2dbbdec76d90164a6d7e14c5

PODFILE CHECKSUM: 2ab3d4f06447f2252ef672833166c9c33f3e8475
PODFILE CHECKSUM: 8c119d1d2fda8d2ceda1c186a5415d0c7473469a

COCOAPODS: 1.16.2
24 changes: 13 additions & 11 deletions ios/edge/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Expo
import Firebase
import FirebaseMessaging
import RNBootSplash
Expand All @@ -8,7 +9,7 @@ import UIKit
import UserNotifications

@main
class AppDelegate: UIResponder, UIApplicationDelegate {
class AppDelegate: ExpoAppDelegate {
var window: UIWindow?
var securityView: UIView?

Expand All @@ -19,7 +20,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
* Handles deep links.
* From https://reactnative.dev/docs/0.79/linking?ios-language=swift#enabling-deep-links
*/
func application(
override func application(
_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]
) -> Bool {
return RCTLinkingManager.application(app, open: url, options: options)
Expand All @@ -29,7 +30,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
* Handles deep links.
* From https://reactnative.dev/docs/0.79/linking?ios-language=swift#enabling-deep-links
*/
func application(
override func application(
_ application: UIApplication,
continue userActivity: NSUserActivity,
restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void
Expand All @@ -45,7 +46,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
* Handles app start-up.
* React Native template code.
*/
func application(
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
) -> Bool {
Expand All @@ -58,11 +59,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

// React Native template code:
let delegate = ReactNativeDelegate()
let factory = RCTReactNativeFactory(delegate: delegate)
let factory = ExpoReactNativeFactory(delegate: delegate)
delegate.dependencyProvider = RCTAppDependencyProvider()

reactNativeDelegate = delegate
reactNativeFactory = factory
bindReactNativeFactory(factory)

window = UIWindow(frame: UIScreen.main.bounds)

Expand All @@ -72,14 +74,14 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
launchOptions: launchOptions
)

return true
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}

/**
* Periodic background fetch logic.
* Edge addition.
*/
func application(
override func application(
_ application: UIApplication,
performFetchWithCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void
) {
Expand Down Expand Up @@ -128,7 +130,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
* Hides the app when we go into the background.
* Edge addition.
*/
func applicationDidEnterBackground(_ application: UIApplication) {
override func applicationDidEnterBackground(_ application: UIApplication) {
guard
let storyboard = UIStoryboard(name: "LaunchScreen", bundle: nil) as UIStoryboard?,
let launchScreen = storyboard.instantiateInitialViewController(),
Expand All @@ -148,7 +150,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
* Shows the app when we come into the foreground.
* Edge addition.
*/
func applicationWillEnterForeground(_ application: UIApplication) {
override func applicationWillEnterForeground(_ application: UIApplication) {
if let view = securityView {
view.removeFromSuperview()
securityView = nil
Expand All @@ -158,13 +160,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

/// Configures the React Native instance.
/// React Native template code.
class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate {
class ReactNativeDelegate: ExpoReactNativeFactoryDelegate {
override func sourceURL(for bridge: RCTBridge) -> URL? {
self.bundleURL()
}

// react-native-bootsplash integration:
override func customize(_ rootView: RCTRootView) {
override func customize(_ rootView: UIView) {
super.customize(rootView)
RNBootSplash.initWithStoryboard("LaunchScreen", rootView: rootView)
}
Expand Down
3 changes: 2 additions & 1 deletion metro.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config')
const { getDefaultConfig } = require('expo/metro-config')
const { mergeConfig } = require('@react-native/metro-config')
const {
wrapWithReanimatedMetroConfig
} = require('react-native-reanimated/metro-config')
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"@react-navigation/elements": "^1.3.14",
"@react-navigation/native": "^6.1.3",
"@react-navigation/stack": "^6.3.12",
"@sentry/react-native": "^6.14.0",
"@sentry/react-native": "^6.20.0",
"@types/jsrsasign": "^10.5.13",
"@unstoppabledomains/resolution": "^9.3.0",
"@walletconnect/react-native-compat": "^2.21.6",
Expand Down
35 changes: 35 additions & 0 deletions patches/react-native-contacts+8.0.5.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
diff --git a/node_modules/react-native-contacts/src/NativeContacts.ts b/node_modules/react-native-contacts/src/NativeContacts.ts
index fc5f61a..9fa1903 100644
--- a/node_modules/react-native-contacts/src/NativeContacts.ts
+++ b/node_modules/react-native-contacts/src/NativeContacts.ts
@@ -22,20 +22,20 @@ export interface Spec extends TurboModule {
requestPermission: () => Promise<PermissionType>;
writePhotoToPath: (contactId: string, file: string) => Promise<boolean>;
iosEnableNotesUsage: (enabled: boolean) => void;
- getGroups(): Promise<Group[]>;
- getGroup: (identifier: string) => Promise<Group | null>;
- deleteGroup(identifier: string): Promise<boolean>;
- updateGroup(identifier: string, groupData: Object): Promise<Group>;
- addGroup(group: Object): Promise<Group>;
- contactsInGroup(identifier: string): Promise<Contact[]>;
- addContactsToGroup(
+ getGroups?: () => Promise<Group[]>;
+ getGroup?: (identifier: string) => Promise<Group | null>;
+ deleteGroup?: (identifier: string) => Promise<boolean>;
+ updateGroup?: (identifier: string, groupData: Object) => Promise<Group>;
+ addGroup?: (group: Object) => Promise<Group>;
+ contactsInGroup?: (identifier: string) => Promise<Contact[]>;
+ addContactsToGroup?: (
groupIdentifier: string,
contactIdentifiers: string[]
- ): Promise<boolean>;
- removeContactsFromGroup(
+ ) => Promise<boolean>;
+ removeContactsFromGroup?: (
groupIdentifier: string,
contactIdentifiers: string[]
- ): Promise<boolean>;
+ ) => Promise<boolean>;
}

export default TurboModuleRegistry.get<Spec>("RCTContacts");
Loading
Loading