diff --git a/native/android/app/build.gradle b/native/android/app/build.gradle index a1786d9db..123129f33 100644 --- a/native/android/app/build.gradle +++ b/native/android/app/build.gradle @@ -1,747 +1,747 @@ apply plugin: "com.android.application" import com.android.build.OutputFile import de.undercouch.gradle.tasks.download.Download import app.comm.gradle.tasks.GitModules /** * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets * and bundleReleaseJsAndAssets). * These basically call `react-native bundle` with the correct arguments during the Android build * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the * bundle directly from the development server. Below you can see all the possible configurations * and their defaults. If you decide to add a configuration block, make sure to add it before the * `apply from: "../../node_modules/react-native/react.gradle"` line. * * project.ext.react = [ * // the name of the generated asset file containing your JS bundle * bundleAssetName: "index.android.bundle", * * // the entry file for bundle generation. If none specified and * // "index.android.js" exists, it will be used. Otherwise "index.js" is * // default. Can be overridden with ENTRY_FILE environment variable. * entryFile: "index.android.js", * * // https://reactnative.dev/docs/performance#enable-the-ram-format * bundleCommand: "ram-bundle", * * // whether to bundle JS and assets in debug mode * bundleInDebug: false, * * // whether to bundle JS and assets in release mode * bundleInRelease: true, * * // whether to bundle JS and assets in another build variant (if configured). * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants * // The configuration property can be in the following formats * // 'bundleIn${productFlavor}${buildType}' * // 'bundleIn${buildType}' * // bundleInFreeDebug: true, * // bundleInPaidRelease: true, * // bundleInBeta: true, * * // whether to disable dev mode in custom build variants (by default only disabled in release) * // for example: to disable dev mode in the staging build type (if configured) * devDisabledInStaging: true, * // The configuration property can be in the following formats * // 'devDisabledIn${productFlavor}${buildType}' * // 'devDisabledIn${buildType}' * * // the root of your project, i.e. where "package.json" lives * root: "../../", * * // where to put the JS bundle asset in debug mode * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", * * // where to put the JS bundle asset in release mode * jsBundleDirRelease: "$buildDir/intermediates/assets/release", * * // where to put drawable resources / React Native assets, e.g. the ones you use via * // require('./image.png')), in debug mode * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", * * // where to put drawable resources / React Native assets, e.g. the ones you use via * // require('./image.png')), in release mode * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", * * // by default the gradle tasks are skipped if none of the JS files or assets change; this means * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to * // date; if you have any other folders that you want to ignore for performance reasons (gradle * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ * // for example, you might want to remove it from here. * inputExcludes: ["android/**", "ios/**"], * * // override which node gets called and with what additional arguments * nodeExecutableAndArgs: ["node"], * * // supply additional arguments to the packager * extraPackagerArgs: [] * ] */ project.ext.react = [ enableHermes: true, // clean and rebuild if changing cliPath: ["node", "-e", "console.log(require('react-native/cli').bin);"].execute([], projectDir).text.trim(), ] apply from: new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim(), "../react.gradle") /** * Set this to true to create two separate APKs instead of one: * - An APK that only works on ARM devices * - An APK that only works on x86 devices * The advantage is the size of the APK is reduced by about 4MB. * Upload all the APKs to the Play Store and people will download * the correct one based on the CPU architecture of their device. */ def enableSeparateBuildPerCPUArchitecture = false /** * Run Proguard to shrink the Java bytecode in release builds. */ def enableProguardInReleaseBuilds = false /** * The preferred build flavor of JavaScriptCore. * * For example, to use the international variant, you can use: * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` * * The international variant includes ICU i18n library and necessary data * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that * 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:+' /** * Whether to enable the Hermes VM. * * This should be set on project.ext.react and that value will be read here. If it is not set * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode * and the benefits of using Hermes will therefore be sharply reduced. */ def enableHermes = project.ext.react.get("enableHermes", false) /** * Architectures to build native code for. */ def reactNativeArchitectures() { def value = project.getProperties().get("reactNativeArchitectures") return value ? value.split(",") : ["armeabi-v7a", "x86_64", "arm64-v8a"] } def customDownloadsDir = System.getenv("REACT_NATIVE_DOWNLOADS_DIR") def dependenciesPath = System.getenv("REACT_NATIVE_DEPENDENCIES") def downloadsDir = customDownloadsDir ? new File(customDownloadsDir) : new File("$buildDir/downloads") def thirdPartyNdkDir = new File("$buildDir/third-party-ndk") task createNativeDepsDirectories { downloadsDir.mkdirs() thirdPartyNdkDir.mkdirs() } def REACT_NATIVE_DIR = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).parent def reactNativeThirdParty = new File("$REACT_NATIVE_DIR/ReactAndroid/src/main/jni/third-party") def reactProperties = new Properties() file("$REACT_NATIVE_DIR/ReactAndroid/gradle.properties").withInputStream { reactProperties.load(it) } def FOLLY_VERSION = reactProperties.getProperty("FOLLY_VERSION") def BOOST_VERSION = reactProperties.getProperty("BOOST_VERSION") def DOUBLE_CONVERSION_VERSION = reactProperties.getProperty("DOUBLE_CONVERSION_VERSION") // FOLLY task downloadFolly(dependsOn: createNativeDepsDirectories, type: Download) { src("https://github.com/facebook/folly/archive/v${FOLLY_VERSION}.tar.gz") onlyIfNewer(true) overwrite(false) dest(new File(downloadsDir, "folly-${FOLLY_VERSION}.tar.gz")) } task prepareFolly(dependsOn: [downloadFolly], type: Copy) { from(tarTree(downloadFolly.dest)) from("$reactNativeThirdParty/folly/Android.mk") include("folly-${FOLLY_VERSION}/folly/**/*", "Android.mk") eachFile { fname -> fname.path = (fname.path - "folly-${FOLLY_VERSION}/") } includeEmptyDirs = false into("$thirdPartyNdkDir/folly") } // GLOG task downloadGlog(dependsOn: createNativeDepsDirectories, type: Download) { src("https://github.com/google/glog/archive/v${GLOG_VERSION}.tar.gz") onlyIfNewer(true) overwrite(false) dest(new File(downloadsDir, "glog-${GLOG_VERSION}.tar.gz")) } task prepareGlog(dependsOn: dependenciesPath ? [] : [downloadGlog], type: Copy) { from(dependenciesPath ?: tarTree(downloadGlog.dest)) include("glog-${GLOG_VERSION}/**/*") includeEmptyDirs = false into("$thirdPartyNdkDir/glog") } // BOOST // The Boost library is a very large download (>100MB). // If Boost is already present on your system, define the REACT_NATIVE_BOOST_PATH env variable // and the build will use that. def boostPath = dependenciesPath ?: System.getenv("REACT_NATIVE_BOOST_PATH") task downloadBoost(dependsOn: createNativeDepsDirectories, type: Download) { - src("https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION.replace("_", ".")}/source/boost_${BOOST_VERSION}.tar.gz") + src("https://archives.boost.io/release/${BOOST_VERSION.replace("_", ".")}/source/boost_${BOOST_VERSION}.tar.gz") onlyIfNewer(true) overwrite(false) dest(new File(downloadsDir, "boost_${BOOST_VERSION}.tar.gz")) } task prepareBoost(dependsOn: [downloadBoost], type: Copy) { from(tarTree(resources.gzip(downloadBoost.dest))) from("$reactNativeThirdParty/boost/Android.mk") include("Android.mk", "boost_${BOOST_VERSION}/boost/**/*.hpp", "boost/boost/**/*.hpp") includeEmptyDirs = false into("$thirdPartyNdkDir/boost") doLast { file("$thirdPartyNdkDir/boost/boost").renameTo("$thirdPartyNdkDir/boost/boost_${BOOST_VERSION}") } } // DOUBLE-CONVERSION task downloadDoubleConversion(dependsOn: createNativeDepsDirectories, type: Download) { src("https://github.com/google/double-conversion/archive/v${DOUBLE_CONVERSION_VERSION}.tar.gz") onlyIfNewer(true) overwrite(false) dest(new File(downloadsDir, "double-conversion-${DOUBLE_CONVERSION_VERSION}.tar.gz")) } task prepareDoubleConversion(dependsOn: [downloadDoubleConversion], type: Copy) { from(tarTree(downloadDoubleConversion.dest)) from("$reactNativeThirdParty/double-conversion/Android.mk") include("double-conversion-${DOUBLE_CONVERSION_VERSION}/src/**/*", "Android.mk") filesMatching("*/src/**/*", { fname -> fname.path = "double-conversion/${fname.name}" }) includeEmptyDirs = false into("$thirdPartyNdkDir/double-conversion") } // OPENSSL def hostSystem = System.getProperty('os.name').toLowerCase(Locale.ROOT) def hostTag = hostSystem.contains('mac') ? 'darwin-x86_64' : 'linux-x86_64' task downloadOpenSSL(dependsOn: createNativeDepsDirectories, type: Download) { src("https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz") onlyIfNewer(true) overwrite(false) dest(new File(downloadsDir, "openssl-${OPENSSL_VERSION}.tar.gz")) } task prepareOpenSSL( dependsOn: dependenciesPath ? [] : [downloadOpenSSL], type: Copy ) { from(dependenciesPath ?: tarTree(downloadOpenSSL.dest)) include("openssl-${OPENSSL_VERSION}/**/*") includeEmptyDirs = false into("${thirdPartyNdkDir}/openssl") } task prebuildOpenSSL(dependsOn: dependenciesPath ? [] : [prepareOpenSSL]) { inputs.properties([ 'openssl.version': OPENSSL_VERSION, 'openssl.abis': getBuildTypeABIs(reactNativeArchitectures()) ]) outputs.dir("${thirdPartyNdkDir}/openssl/openssl-${OPENSSL_VERSION}/build/") .withPropertyName('openssl.output') doFirst { getBuildTypeABIs(reactNativeArchitectures()).each { buildABI -> logger.info("Building OpenSSL library for the ${buildABI}") exec { commandLine './bash/build_openssl.sh', // OPENSSL_SUBMODULE_PATH "${thirdPartyNdkDir}/openssl/openssl-${OPENSSL_VERSION}/", // HOST_TAG hostTag, // ANDROID_ARCH_ABI "${buildABI}", // MIN_SDK_VERSION rootProject.ext.minSdkVersion, // ANDROID_NDK_HOME android.ndkDirectory.absolutePath, // PARALLEL_THREADS Runtime.getRuntime().availableProcessors() } } } } // JNI def REACT_NATIVE_AAR = "${buildDir}/react-native.aar" def extractReactNativeAAR = { buildType -> def suffix = buildType == 'Debug' ? '-debug' : '-release' def rnAARs = fileTree(REACT_NATIVE_DIR).matching { include "**/react-native/**/*${suffix}.aar" } if (rnAARs.isEmpty()) { rnAARs = fileTree(REACT_NATIVE_DIR).matching { include "**/react-native/**/*.aar" } } if (rnAARs.any() && rnAARs.size() > 1) { logger.error("More than one React Native AAR file has been found:") rnAARs.each { println(it) } throw new GradleException( "Multiple React Native AARs found:\n${rnAARs.join("\n")}" + "\nRemove the old ones and try again" ) } def rnAAR = rnAARs.singleFile def file = rnAAR.absoluteFile def packageName = file.name.tokenize('-')[0] copy { from zipTree(file) into REACT_NATIVE_AAR include "jni/**/*" } } task extractReactNativeAARRelease { doLast { extractReactNativeAAR('Release') } } task extractReactNativeAARDebug { doLast { extractReactNativeAAR('Debug') } } task extractAARHeaders { doLast { configurations.extractHeaders.files.each { def file = it.absoluteFile copy { from zipTree(file) into "$buildDir/$file.name" include "**/*.h" } } } } task extractJNIFiles { doLast { configurations.extractJNI.files.each { def file = it.absoluteFile copy { from zipTree(file) into "$buildDir/$file.name" include "jni/**/*" } } } } tasks.whenTaskAdded { task -> if ( !task.name.contains("Clean") && (task.name.contains('externalNativeBuild') || task.name.startsWith('configureCMake') || task.name.startsWith('buildCMake')) ) { def buildType = task.name.endsWith('Debug') ? 'Debug' : 'Release' task.dependsOn(extractAARHeaders) task.dependsOn(extractJNIFiles) task.dependsOn("extractReactNativeAAR${buildType}") } } // EXTERNAL LIBS task prepareExternalLibs { dependsOn prepareFolly dependsOn prepareGlog dependsOn prepareBoost dependsOn prepareDoubleConversion dependsOn prebuildOpenSSL } // Removes the '.cxx' directory to prevent running // ninja clean when the 'clean' command is executed task removeCXX(type: Exec) { commandLine 'rm', '-rf', '.cxx' } // Add cross-compilation targets to Rust toolchain task updateRustToolchain(type: Exec) { commandLine "rustup", "target", "add", "aarch64-linux-android", "armv7-linux-androideabi", "x86_64-linux-android" } def nativeRustLibraryDir = "../../native_rust_library" def nativeRustLibraryManifestPath = "${nativeRustLibraryDir}/Cargo.toml" def cxxBridgeBindingDir = "${nativeRustLibraryDir}/target/cxxbridge/native_rust_library/src" def cxxBridgeCommonDir = "${nativeRustLibraryDir}/target/cxxbridge/rust" task buildNativeRustLibrary(type: Exec) { commandLine "cargo", "build", "--manifest-path", nativeRustLibraryManifestPath } task copyNativeRustLibraryFiles(dependsOn: buildNativeRustLibrary, type: Copy) { from(cxxBridgeBindingDir) { include 'lib.rs.h' include 'lib.rs.cc' } from(cxxBridgeCommonDir) { include 'cxx.h' } into nativeRustLibraryDir } // Bind preBuild dependencies only if not 'clean' running if (!isCleanRunning()) { afterEvaluate { preBuild.dependsOn(prepareExternalLibs, updateRustToolchain, copyNativeRustLibraryFiles) } } // Run removing CXX task before the clean execution beforeEvaluate { clean.dependsOn(removeCXX) } // Detects are we running the 'clean' commands def isCleanRunning() { gradle.startParameter.taskRequests.any { !it.args.isEmpty() && it.args.first().startsWith('clean') } } // Release keystore via macOS Keychain Access def getPassword(String keyLabel) { if (System.getenv('ANDROID_SIGNING_PASSWORD')) { return System.getenv('ANDROID_SIGNING_PASSWORD') } def stdout = new ByteArrayOutputStream() exec { commandLine 'security', 'find-generic-password', '-wl', keyLabel, '-a', System.properties['user.name'] standardOutput = stdout ignoreExitValue true } return stdout.toString().strip() } // Returns all ABIs architectures for the 'bundleRelease' // or only from 'adb devices' if running debug release. def getBuildTypeABIs(nativeArchitectures) { if (System.getenv("BUILDKITE") == "true") { return ["arm64-v8a"] } def isBundleRelease = gradle.startParameter.taskRequests.any { !it.args.isEmpty() && it.args.first().contains("bundleRelease") } if (isBundleRelease) { // All of the supported ABIs // https://developer.android.com/ndk/guides/abis.html#sa final allAbis = ["armeabi-v7a", "arm64-v8a", "x86_64"] logger.info("Using all architectures to build: ${allAbis}") return allAbis } if (nativeArchitectures) { return nativeArchitectures } // Get current 'adb devices' architectures def commandOutput = new ByteArrayOutputStream() exec { commandLine "./bash/detect_abis.sh" standardOutput = commandOutput } final detectedAbis = commandOutput.toString("UTF-8").trim().tokenize() logger.info("Detected architectures to build: ${detectedAbis}") return detectedAbis } def REACT_NATIVE_SO_DIR = "${REACT_NATIVE_AAR}/jni" android { buildFeatures { prefab true } configurations { all*.exclude module: 'fbjni-java-only' extractHeaders extractJNI } dependencies { implementation 'com.facebook.fbjni:fbjni:0.2.2' compileOnly 'com.facebook.fbjni:fbjni:0.2.2' extractHeaders 'com.facebook.fbjni:fbjni:0.2.2:headers' extractJNI 'com.facebook.fbjni:fbjni:0.2.2' } ndkVersion rootProject.ext.ndkVersion compileSdkVersion rootProject.ext.compileSdkVersion defaultConfig { applicationId 'app.comm.android' minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode 308 versionName '1.0.308' buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString() if (isNewArchitectureEnabled()) { // We configure the CMake build only if you decide to opt-in for the New Architecture. externalNativeBuild { cmake { arguments "-DPROJECT_BUILD_DIR=$buildDir", "-DREACT_ANDROID_DIR=$rootDir/../node_modules/react-native/ReactAndroid", "-DREACT_ANDROID_BUILD_DIR=$rootDir/../node_modules/react-native/ReactAndroid/build", "-DNODE_MODULES_DIR=$rootDir/../node_modules", "-DANDROID_STL=c++_shared" } } if (!enableSeparateBuildPerCPUArchitecture) { ndk { abiFilters (*reactNativeArchitectures()) } } } missingDimensionStrategy 'react-native-camera', 'general' multiDexEnabled true } if (isNewArchitectureEnabled()) { // We configure the NDK build only if you decide to opt-in for the New Architecture. externalNativeBuild { cmake { path "$projectDir/src/main/jni/CMakeLists.txt" } } def reactAndroidProjectDir = project(':ReactAndroid').projectDir def packageReactNdkDebugLibs = tasks.register("packageReactNdkDebugLibs", Copy) { dependsOn(":ReactAndroid:packageReactNdkDebugLibsForBuck") from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib") into("$buildDir/react-ndk/exported") } def packageReactNdkReleaseLibs = tasks.register("packageReactNdkReleaseLibs", Copy) { dependsOn(":ReactAndroid:packageReactNdkReleaseLibsForBuck") from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib") into("$buildDir/react-ndk/exported") } afterEvaluate { // If you wish to add a custom TurboModule or component locally, // you should uncomment this line. // preBuild.dependsOn("generateCodegenArtifactsFromSchema") preDebugBuild.dependsOn(packageReactNdkDebugLibs) preReleaseBuild.dependsOn(packageReactNdkReleaseLibs) // Due to a bug inside AGP, we have to explicitly set a dependency // between configureCMakeDebug* tasks and the preBuild tasks. // This can be removed once this is solved: https://issuetracker.google.com/issues/207403732 configureCMakeRelWithDebInfo.dependsOn(preReleaseBuild) configureCMakeDebug.dependsOn(preDebugBuild) reactNativeArchitectures().each { architecture -> tasks.findByName("configureCMakeDebug[${architecture}]")?.configure { dependsOn("preDebugBuild") } tasks.findByName("configureCMakeRelWithDebInfo[${architecture}]")?.configure { dependsOn("preReleaseBuild") } } } } splits { abi { reset() enable enableSeparateBuildPerCPUArchitecture universalApk false // If true, also generate a universal APK include (*reactNativeArchitectures()) } } signingConfigs { debug { storeFile file('debug.keystore') storePassword 'android' keyAlias 'androiddebugkey' keyPassword 'android' } release { if (project.hasProperty('COMM_UPLOAD_STORE_FILE')) { def password = getPassword('CommAndroidKeyPassword') storeFile file(COMM_UPLOAD_STORE_FILE) storePassword password keyAlias COMM_UPLOAD_KEY_ALIAS keyPassword password } } } buildTypes { final buildABIs = getBuildTypeABIs(reactNativeArchitectures()) release { if (project.hasProperty('COMM_UPLOAD_STORE_FILE')) { signingConfig signingConfigs.release } else { signingConfig signingConfigs.debug } minifyEnabled enableProguardInReleaseBuilds proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" ndk { abiFilters = [] abiFilters.addAll(buildABIs) } } debug { signingConfig signingConfigs.debug ndk { abiFilters = [] abiFilters.addAll(buildABIs) } } } packagingOptions { pickFirst "**/libc++_shared.so" pickFirst "**/libfbjni.so" } defaultConfig { externalNativeBuild { cmake { arguments "-DANDROID_STL=c++_shared", "-DGLOG_VERSION=" + GLOG_VERSION, "-DOPENSSL_VERSION=" + OPENSSL_VERSION, "-DNDK_VERSION=" + rootProject.ext.ndkVersion, "-DREACT_NATIVE_SO_DIR=${REACT_NATIVE_SO_DIR}", "-DBOOST_VERSION=${BOOST_VERSION}", "-DCI=${System.getenv('CI')}" targets "comm_jni_module", "turbomodulejsijni" } } } externalNativeBuild { cmake { path "CMakeLists.txt" version "3.18.1" } } // applicationVariants are e.g. debug, release applicationVariants.all { variant -> variant.outputs.each { output -> // For each separate APK per architecture, set a unique version code as described here: // https://developer.android.com/studio/build/configure-apk-splits.html // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc. def versionCodes = ["armeabi-v7a": 1, "arm64-v8a": 3, "x86_64": 4] def abi = output.getFilter(OutputFile.ABI) if (abi != null) { // null for the universal-debug, universal-release variants output.versionCodeOverride = defaultConfig.versionCode * 1000 + versionCodes.get(abi) } } } afterEvaluate { extractAARHeaders.dependsOn(prepareExternalLibs) extractJNIFiles.dependsOn(prepareExternalLibs) } } dependencies { implementation fileTree(dir: "libs", include: ["*.jar"]) implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.10" //noinspection GradleDynamicVersion implementation("com.facebook.react:react-native:+") def isGifEnabled = (findProperty('expo.gif.enabled') ?: "") == "true"; def isWebpEnabled = (findProperty('expo.webp.enabled') ?: "") == "true"; def isWebpAnimatedEnabled = (findProperty('expo.webp.animated') ?: "") == "true"; // If your app supports Android versions before Ice Cream Sandwich (API level 14) // All fresco packages should use the same version if (isGifEnabled || isWebpEnabled) { implementation 'com.facebook.fresco:fresco:2.5.0' implementation 'com.facebook.fresco:imagepipeline-okhttp3:2.5.0' } if (isGifEnabled) { // For animated gif support implementation 'com.facebook.fresco:animated-gif:2.5.0' } if (isWebpEnabled) { // For webp support implementation 'com.facebook.fresco:webpsupport:2.5.0' if (isWebpAnimatedEnabled) { // Animated webp support implementation 'com.facebook.fresco:animated-webp:2.5.0' } } implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" implementation "com.google.android.gms:play-services-base:16.1.0" implementation "com.google.firebase:firebase-core:21.1.0" implementation "com.google.firebase:firebase-messaging:21.1.0" implementation "me.leolin:ShortcutBadger:1.1.21@aar" implementation project(':reactnativekeyboardinput') implementation "androidx.multidex:multidex:2.0.1" implementation "androidx.lifecycle:lifecycle-process:2.5.1" implementation 'com.facebook.fresco:fresco:2.5.0' implementation 'com.facebook.fresco:animated-gif:2.5.0' implementation 'com.facebook.fresco:animated-webp:2.5.0' implementation 'com.facebook.fresco:webpsupport:2.5.0' implementation 'org.conscrypt:conscrypt-android:2.0.0' if (enableHermes) { //noinspection GradleDynamicVersion implementation("com.facebook.react:hermes-engine:+") { // From node_modules exclude group:'com.facebook.fbjni' } } else { implementation jscFlavor } } if (isNewArchitectureEnabled()) { // If new architecture is enabled, we let you build RN from source // Otherwise we fallback to a prebuilt .aar bundled in the NPM package. // This will be applied to all the imported transtitive dependency. configurations.all { resolutionStrategy.dependencySubstitution { substitute(module("com.facebook.react:react-native")) .using(project(":ReactAndroid")) .because("On New Architecture we're building React Native from source") substitute(module("com.facebook.react:hermes-engine")) .using(project(":ReactAndroid:hermes-engine")) .because("On New Architecture we're building Hermes from source") } } } // Run this once to be able to run the application with BUCK // puts all compile dependencies into folder libs for BUCK to use task copyDownloadableDepsToLibs(type: Copy) { from configurations.implementation into 'libs' } apply from: new File(["node", "--print", "require.resolve('@react-native-community/cli-platform-android/package.json')"].execute(null, rootDir).text.trim(), "../native_modules.gradle"); applyNativeModulesAppBuildGradle(project) def isNewArchitectureEnabled() { // To opt-in for the New Architecture, you can either: // - Set `newArchEnabled` to true inside the `gradle.properties` file // - Invoke gradle with `-newArchEnabled=true` // - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true` return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true" } apply plugin: 'com.google.gms.google-services' diff --git a/native/ios/Podfile.lock b/native/ios/Podfile.lock index 3ea2e26bd..ce6364891 100644 --- a/native/ios/Podfile.lock +++ b/native/ios/Podfile.lock @@ -1,951 +1,951 @@ PODS: - boost (1.76.0) - CommExpoPackage (0.0.1): - ExpoModulesCore - DoubleConversion (1.1.6) - DVAssetLoaderDelegate (0.3.3) - EXApplication (5.1.1): - ExpoModulesCore - EXBarCodeScanner (12.1.0): - EXImageLoader - ExpoModulesCore - ZXingObjC/OneD - ZXingObjC/PDF417 - EXConstants (14.0.2): - ExpoModulesCore - EXFileSystem (15.1.1): - ExpoModulesCore - EXFont (11.0.1): - ExpoModulesCore - EXImageLoader (4.0.0): - ExpoModulesCore - React-Core - EXJSONUtils (0.4.0) - EXManifests (0.4.0): - EXJSONUtils - EXMediaLibrary (15.0.0): - ExpoModulesCore - React-Core - Expo (47.0.14): - ExpoModulesCore - expo-dev-client (2.0.1): - EXManifests - expo-dev-launcher - expo-dev-menu - expo-dev-menu-interface - EXUpdatesInterface - expo-dev-launcher (2.0.2): - EXManifests - expo-dev-launcher/Main (= 2.0.2) - expo-dev-menu - expo-dev-menu-interface - ExpoModulesCore - EXUpdatesInterface - React-Core - expo-dev-launcher/Main (2.0.2): - EXManifests - expo-dev-launcher/Unsafe - expo-dev-menu - expo-dev-menu-interface - ExpoModulesCore - EXUpdatesInterface - React-Core - expo-dev-launcher/Unsafe (2.0.2): - EXManifests - expo-dev-menu - expo-dev-menu-interface - ExpoModulesCore - EXUpdatesInterface - React-Core - expo-dev-menu (2.0.2): - expo-dev-menu/Main (= 2.0.2) - expo-dev-menu-interface (1.0.0) - expo-dev-menu/GestureHandler (2.0.2) - expo-dev-menu/Main (2.0.2): - EXManifests - expo-dev-menu-interface - expo-dev-menu/Vendored - ExpoModulesCore - React-Core - expo-dev-menu/Reanimated (2.0.2): - DoubleConversion - FBLazyVector - FBReactNativeSpec - glog - RCT-Folly - RCTRequired - RCTTypeSafety - React-callinvoker - React-Core - React-Core/DevSupport - React-Core/RCTWebSocket - React-CoreModules - React-cxxreact - React-jsi - React-jsiexecutor - React-jsinspector - React-RCTActionSheet - React-RCTAnimation - React-RCTBlob - React-RCTImage - React-RCTLinking - React-RCTNetwork - React-RCTSettings - React-RCTText - React-RCTVibration - ReactCommon/turbomodule/core - Yoga - expo-dev-menu/SafeAreaView (2.0.2) - expo-dev-menu/Vendored (2.0.2): - expo-dev-menu/GestureHandler - expo-dev-menu/Reanimated - expo-dev-menu/SafeAreaView - ExpoHaptics (12.0.1): - ExpoModulesCore - ExpoImage (1.2.2): - ExpoModulesCore - SDWebImage (~> 5.15.0) - SDWebImageAVIFCoder (~> 0.9.4) - SDWebImageSVGCoder (~> 1.6.1) - SDWebImageWebPCoder (~> 0.9.1) - ExpoImageManipulator (11.0.0): - EXImageLoader - ExpoModulesCore - ExpoImagePicker (14.0.2): - ExpoModulesCore - ExpoKeepAwake (11.0.1): - ExpoModulesCore - ExpoModulesCore (1.1.1): - React-Core - ReactCommon/turbomodule/core - EXSecureStore (12.0.0): - ExpoModulesCore - EXSplashScreen (0.17.5): - ExpoModulesCore - React-Core - EXUpdatesInterface (0.8.1) - FBLazyVector (0.70.9) - FBReactNativeSpec (0.70.9): - RCT-Folly (= 2021.07.22.00) - RCTRequired (= 0.70.9) - RCTTypeSafety (= 0.70.9) - React-Core (= 0.70.9) - React-jsi (= 0.70.9) - ReactCommon/turbomodule/core (= 0.70.9) - fmt (6.2.1) - glog (0.3.5) - hermes-engine (0.70.9) - libaom (2.0.2): - libvmaf - libavif (0.10.1): - libavif/libaom (= 0.10.1) - libavif/core (0.10.1) - libavif/libaom (0.10.1): - libaom (>= 2.0.0) - libavif/core - libevent (2.1.12) - libvmaf (2.2.0) - libwebp (1.2.4): - libwebp/demux (= 1.2.4) - libwebp/mux (= 1.2.4) - libwebp/webp (= 1.2.4) - libwebp/demux (1.2.4): - libwebp/webp - libwebp/mux (1.2.4): - libwebp/demux - libwebp/webp (1.2.4) - lottie-ios (3.4.4) - lottie-react-native (5.1.4): - lottie-ios (~> 3.4.0) - React-Core - mobile-ffmpeg-min (4.3.1.LTS) - OLMKit (3.2.14): - OLMKit/olmc (= 3.2.14) - OLMKit/olmcpp (= 3.2.14) - OLMKit/olmc (3.2.14) - OLMKit/olmcpp (3.2.14) - OpenSSL-Universal (1.1.1900) - RCT-Folly (2021.07.22.00): - boost - DoubleConversion - fmt (~> 6.2.1) - glog - RCT-Folly/Default (= 2021.07.22.00) - RCT-Folly/Default (2021.07.22.00): - boost - DoubleConversion - fmt (~> 6.2.1) - glog - RCT-Folly/Futures (2021.07.22.00): - boost - DoubleConversion - fmt (~> 6.2.1) - glog - libevent - RCTRequired (0.70.9) - RCTTypeSafety (0.70.9): - FBLazyVector (= 0.70.9) - RCTRequired (= 0.70.9) - React-Core (= 0.70.9) - React (0.70.9): - React-Core (= 0.70.9) - React-Core/DevSupport (= 0.70.9) - React-Core/RCTWebSocket (= 0.70.9) - React-RCTActionSheet (= 0.70.9) - React-RCTAnimation (= 0.70.9) - React-RCTBlob (= 0.70.9) - React-RCTImage (= 0.70.9) - React-RCTLinking (= 0.70.9) - React-RCTNetwork (= 0.70.9) - React-RCTSettings (= 0.70.9) - React-RCTText (= 0.70.9) - React-RCTVibration (= 0.70.9) - React-bridging (0.70.9): - RCT-Folly (= 2021.07.22.00) - React-jsi (= 0.70.9) - React-callinvoker (0.70.9) - React-Codegen (0.70.9): - FBReactNativeSpec (= 0.70.9) - RCT-Folly (= 2021.07.22.00) - RCTRequired (= 0.70.9) - RCTTypeSafety (= 0.70.9) - React-Core (= 0.70.9) - React-jsi (= 0.70.9) - React-jsiexecutor (= 0.70.9) - ReactCommon/turbomodule/core (= 0.70.9) - React-Core (0.70.9): - glog - RCT-Folly (= 2021.07.22.00) - React-Core/Default (= 0.70.9) - React-cxxreact (= 0.70.9) - React-jsi (= 0.70.9) - React-jsiexecutor (= 0.70.9) - React-perflogger (= 0.70.9) - Yoga - React-Core/CoreModulesHeaders (0.70.9): - glog - RCT-Folly (= 2021.07.22.00) - React-Core/Default - React-cxxreact (= 0.70.9) - React-jsi (= 0.70.9) - React-jsiexecutor (= 0.70.9) - React-perflogger (= 0.70.9) - Yoga - React-Core/Default (0.70.9): - glog - RCT-Folly (= 2021.07.22.00) - React-cxxreact (= 0.70.9) - React-jsi (= 0.70.9) - React-jsiexecutor (= 0.70.9) - React-perflogger (= 0.70.9) - Yoga - React-Core/DevSupport (0.70.9): - glog - RCT-Folly (= 2021.07.22.00) - React-Core/Default (= 0.70.9) - React-Core/RCTWebSocket (= 0.70.9) - React-cxxreact (= 0.70.9) - React-jsi (= 0.70.9) - React-jsiexecutor (= 0.70.9) - React-jsinspector (= 0.70.9) - React-perflogger (= 0.70.9) - Yoga - React-Core/RCTActionSheetHeaders (0.70.9): - glog - RCT-Folly (= 2021.07.22.00) - React-Core/Default - React-cxxreact (= 0.70.9) - React-jsi (= 0.70.9) - React-jsiexecutor (= 0.70.9) - React-perflogger (= 0.70.9) - Yoga - React-Core/RCTAnimationHeaders (0.70.9): - glog - RCT-Folly (= 2021.07.22.00) - React-Core/Default - React-cxxreact (= 0.70.9) - React-jsi (= 0.70.9) - React-jsiexecutor (= 0.70.9) - React-perflogger (= 0.70.9) - Yoga - React-Core/RCTBlobHeaders (0.70.9): - glog - RCT-Folly (= 2021.07.22.00) - React-Core/Default - React-cxxreact (= 0.70.9) - React-jsi (= 0.70.9) - React-jsiexecutor (= 0.70.9) - React-perflogger (= 0.70.9) - Yoga - React-Core/RCTImageHeaders (0.70.9): - glog - RCT-Folly (= 2021.07.22.00) - React-Core/Default - React-cxxreact (= 0.70.9) - React-jsi (= 0.70.9) - React-jsiexecutor (= 0.70.9) - React-perflogger (= 0.70.9) - Yoga - React-Core/RCTLinkingHeaders (0.70.9): - glog - RCT-Folly (= 2021.07.22.00) - React-Core/Default - React-cxxreact (= 0.70.9) - React-jsi (= 0.70.9) - React-jsiexecutor (= 0.70.9) - React-perflogger (= 0.70.9) - Yoga - React-Core/RCTNetworkHeaders (0.70.9): - glog - RCT-Folly (= 2021.07.22.00) - React-Core/Default - React-cxxreact (= 0.70.9) - React-jsi (= 0.70.9) - React-jsiexecutor (= 0.70.9) - React-perflogger (= 0.70.9) - Yoga - React-Core/RCTSettingsHeaders (0.70.9): - glog - RCT-Folly (= 2021.07.22.00) - React-Core/Default - React-cxxreact (= 0.70.9) - React-jsi (= 0.70.9) - React-jsiexecutor (= 0.70.9) - React-perflogger (= 0.70.9) - Yoga - React-Core/RCTTextHeaders (0.70.9): - glog - RCT-Folly (= 2021.07.22.00) - React-Core/Default - React-cxxreact (= 0.70.9) - React-jsi (= 0.70.9) - React-jsiexecutor (= 0.70.9) - React-perflogger (= 0.70.9) - Yoga - React-Core/RCTVibrationHeaders (0.70.9): - glog - RCT-Folly (= 2021.07.22.00) - React-Core/Default - React-cxxreact (= 0.70.9) - React-jsi (= 0.70.9) - React-jsiexecutor (= 0.70.9) - React-perflogger (= 0.70.9) - Yoga - React-Core/RCTWebSocket (0.70.9): - glog - RCT-Folly (= 2021.07.22.00) - React-Core/Default (= 0.70.9) - React-cxxreact (= 0.70.9) - React-jsi (= 0.70.9) - React-jsiexecutor (= 0.70.9) - React-perflogger (= 0.70.9) - Yoga - React-CoreModules (0.70.9): - RCT-Folly (= 2021.07.22.00) - RCTTypeSafety (= 0.70.9) - React-Codegen (= 0.70.9) - React-Core/CoreModulesHeaders (= 0.70.9) - React-jsi (= 0.70.9) - React-RCTImage (= 0.70.9) - ReactCommon/turbomodule/core (= 0.70.9) - React-cxxreact (0.70.9): - boost (= 1.76.0) - DoubleConversion - glog - RCT-Folly (= 2021.07.22.00) - React-callinvoker (= 0.70.9) - React-jsi (= 0.70.9) - React-jsinspector (= 0.70.9) - React-logger (= 0.70.9) - React-perflogger (= 0.70.9) - React-runtimeexecutor (= 0.70.9) - React-hermes (0.70.9): - DoubleConversion - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - RCT-Folly/Futures (= 2021.07.22.00) - React-cxxreact (= 0.70.9) - React-jsi (= 0.70.9) - React-jsiexecutor (= 0.70.9) - React-jsinspector (= 0.70.9) - React-perflogger (= 0.70.9) - React-jsi (0.70.9): - boost (= 1.76.0) - DoubleConversion - glog - RCT-Folly (= 2021.07.22.00) - React-jsi/Default (= 0.70.9) - React-jsi/Default (0.70.9): - boost (= 1.76.0) - DoubleConversion - glog - RCT-Folly (= 2021.07.22.00) - React-jsiexecutor (0.70.9): - DoubleConversion - glog - RCT-Folly (= 2021.07.22.00) - React-cxxreact (= 0.70.9) - React-jsi (= 0.70.9) - React-perflogger (= 0.70.9) - React-jsinspector (0.70.9) - React-logger (0.70.9): - glog - react-native-camera (3.31.0): - React - react-native-camera/RCT (= 3.31.0) - react-native-camera/RN (= 3.31.0) - react-native-camera/RCT (3.31.0): - React - react-native-camera/RN (3.31.0): - React - react-native-ffmpeg/min-lts (0.4.4): - mobile-ffmpeg-min (= 4.3.1.LTS) - React - react-native-in-app-message (1.0.2): - React - react-native-netinfo (9.3.7): - React-Core - react-native-orientation-locker (1.5.0): - React-Core - react-native-pager-view (6.0.1): - React-Core - react-native-safe-area-context (4.4.1): - RCT-Folly - RCTRequired - RCTTypeSafety - React-Core - ReactCommon/turbomodule/core - react-native-video/Video (5.2.1): - React-Core - react-native-video/VideoCaching (5.2.1): - DVAssetLoaderDelegate (~> 0.3.1) - React-Core - react-native-video/Video - SPTPersistentCache (~> 1.1.0) - react-native-webview (11.23.0): - React-Core - React-perflogger (0.70.9) - React-RCTActionSheet (0.70.9): - React-Core/RCTActionSheetHeaders (= 0.70.9) - React-RCTAnimation (0.70.9): - RCT-Folly (= 2021.07.22.00) - RCTTypeSafety (= 0.70.9) - React-Codegen (= 0.70.9) - React-Core/RCTAnimationHeaders (= 0.70.9) - React-jsi (= 0.70.9) - ReactCommon/turbomodule/core (= 0.70.9) - React-RCTBlob (0.70.9): - RCT-Folly (= 2021.07.22.00) - React-Codegen (= 0.70.9) - React-Core/RCTBlobHeaders (= 0.70.9) - React-Core/RCTWebSocket (= 0.70.9) - React-jsi (= 0.70.9) - React-RCTNetwork (= 0.70.9) - ReactCommon/turbomodule/core (= 0.70.9) - React-RCTImage (0.70.9): - RCT-Folly (= 2021.07.22.00) - RCTTypeSafety (= 0.70.9) - React-Codegen (= 0.70.9) - React-Core/RCTImageHeaders (= 0.70.9) - React-jsi (= 0.70.9) - React-RCTNetwork (= 0.70.9) - ReactCommon/turbomodule/core (= 0.70.9) - React-RCTLinking (0.70.9): - React-Codegen (= 0.70.9) - React-Core/RCTLinkingHeaders (= 0.70.9) - React-jsi (= 0.70.9) - ReactCommon/turbomodule/core (= 0.70.9) - React-RCTNetwork (0.70.9): - RCT-Folly (= 2021.07.22.00) - RCTTypeSafety (= 0.70.9) - React-Codegen (= 0.70.9) - React-Core/RCTNetworkHeaders (= 0.70.9) - React-jsi (= 0.70.9) - ReactCommon/turbomodule/core (= 0.70.9) - React-RCTSettings (0.70.9): - RCT-Folly (= 2021.07.22.00) - RCTTypeSafety (= 0.70.9) - React-Codegen (= 0.70.9) - React-Core/RCTSettingsHeaders (= 0.70.9) - React-jsi (= 0.70.9) - ReactCommon/turbomodule/core (= 0.70.9) - React-RCTText (0.70.9): - React-Core/RCTTextHeaders (= 0.70.9) - React-RCTVibration (0.70.9): - RCT-Folly (= 2021.07.22.00) - React-Codegen (= 0.70.9) - React-Core/RCTVibrationHeaders (= 0.70.9) - React-jsi (= 0.70.9) - ReactCommon/turbomodule/core (= 0.70.9) - React-runtimeexecutor (0.70.9): - React-jsi (= 0.70.9) - ReactCommon/turbomodule/core (0.70.9): - DoubleConversion - glog - RCT-Folly (= 2021.07.22.00) - React-bridging (= 0.70.9) - React-callinvoker (= 0.70.9) - React-Core (= 0.70.9) - React-cxxreact (= 0.70.9) - React-jsi (= 0.70.9) - React-logger (= 0.70.9) - React-perflogger (= 0.70.9) - ReactNativeART (1.2.0): - React - ReactNativeKeyboardInput (6.0.1): - React - ReactNativeKeyboardTrackingView (5.7.0): - React - RNCAsyncStorage (1.17.10): - React-Core - RNCClipboard (1.11.1): - React-Core - SDWebImage (~> 5.8) - RNCMaskedView (0.2.8): - React-Core - RNDeviceInfo (10.3.0): - React-Core - RNFS (2.20.0): - React-Core - RNGestureHandler (2.8.0): - React-Core - RNKeychain (8.0.0): - React-Core - RNReanimated (2.12.0): - DoubleConversion - FBLazyVector - FBReactNativeSpec - glog - RCT-Folly - RCTRequired - RCTTypeSafety - React-callinvoker - React-Core - React-Core/DevSupport - React-Core/RCTWebSocket - React-CoreModules - React-cxxreact - React-jsi - React-jsiexecutor - React-jsinspector - React-RCTActionSheet - React-RCTAnimation - React-RCTBlob - React-RCTImage - React-RCTLinking - React-RCTNetwork - React-RCTSettings - React-RCTText - ReactCommon/turbomodule/core - Yoga - RNScreens (3.18.2): - React-Core - React-RCTImage - RNSVG (12.3.0): - React-Core - SDWebImage (5.15.5): - SDWebImage/Core (= 5.15.5) - SDWebImage/Core (5.15.5) - SDWebImageAVIFCoder (0.9.5): - libavif (>= 0.9.1) - SDWebImage (~> 5.10) - SDWebImageSVGCoder (1.6.1): - SDWebImage/Core (~> 5.6) - SDWebImageWebPCoder (0.9.1): - libwebp (~> 1.0) - SDWebImage/Core (~> 5.13) - SPTPersistentCache (1.1.0) - SQLCipher-Amalgamation (4.5.5b): - OpenSSL-Universal - SQLCipher-Amalgamation/standard (= 4.5.5b) - SQLCipher-Amalgamation/common (4.5.5b): - OpenSSL-Universal - SQLCipher-Amalgamation/standard (4.5.5b): - OpenSSL-Universal - SQLCipher-Amalgamation/common - Yoga (1.14.0) - ZXingObjC/Core (3.6.5) - ZXingObjC/OneD (3.6.5): - ZXingObjC/Core - ZXingObjC/PDF417 (3.6.5): - ZXingObjC/Core DEPENDENCIES: - boost (from `../../node_modules/react-native/third-party-podspecs/boost.podspec`) - CommExpoPackage (from `../expo-modules/comm-expo-package/ios`) - DoubleConversion (from `../../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - EXApplication (from `../../node_modules/expo-application/ios`) - EXBarCodeScanner (from `../../node_modules/expo-barcode-scanner/ios`) - EXConstants (from `../../node_modules/expo-constants/ios`) - EXFileSystem (from `../../node_modules/expo-file-system/ios`) - EXFont (from `../../node_modules/expo-font/ios`) - EXImageLoader (from `../../node_modules/expo-image-loader/ios`) - EXJSONUtils (from `../../node_modules/expo-json-utils/ios`) - EXManifests (from `../../node_modules/expo-manifests/ios`) - EXMediaLibrary (from `../../node_modules/expo-media-library/ios`) - Expo (from `../../node_modules/expo`) - expo-dev-client (from `../../node_modules/expo-dev-client/ios`) - expo-dev-launcher (from `../../node_modules/expo-dev-launcher`) - expo-dev-menu (from `../../node_modules/expo-dev-menu`) - expo-dev-menu-interface (from `../../node_modules/expo-dev-menu-interface/ios`) - ExpoHaptics (from `../../node_modules/expo-haptics/ios`) - ExpoImage (from `../../node_modules/expo-image/ios`) - ExpoImageManipulator (from `../../node_modules/expo-image-manipulator/ios`) - ExpoImagePicker (from `../../node_modules/expo-image-picker/ios`) - ExpoKeepAwake (from `../../node_modules/expo-keep-awake/ios`) - ExpoModulesCore (from `../../node_modules/expo-modules-core`) - EXSecureStore (from `../../node_modules/expo-secure-store/ios`) - EXSplashScreen (from `../../node_modules/expo-splash-screen/ios`) - EXUpdatesInterface (from `../../node_modules/expo-updates-interface/ios`) - FBLazyVector (from `../../node_modules/react-native/Libraries/FBLazyVector`) - FBReactNativeSpec (from `../../node_modules/react-native/React/FBReactNativeSpec`) - glog (from `../../node_modules/react-native/third-party-podspecs/glog.podspec`) - hermes-engine (from `../../node_modules/react-native/sdks/hermes/hermes-engine.podspec`) - libevent (~> 2.1.12) - lottie-react-native (from `../node_modules/lottie-react-native`) - OLMKit (from `../node_modules/olm`) - RCT-Folly (from `../../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) - RCTRequired (from `../../node_modules/react-native/Libraries/RCTRequired`) - RCTTypeSafety (from `../../node_modules/react-native/Libraries/TypeSafety`) - React (from `../../node_modules/react-native/`) - React-bridging (from `../../node_modules/react-native/ReactCommon`) - React-callinvoker (from `../../node_modules/react-native/ReactCommon/callinvoker`) - React-Codegen (from `build/generated/ios`) - React-Core (from `../../node_modules/react-native/`) - React-Core/RCTWebSocket (from `../../node_modules/react-native/`) - React-CoreModules (from `../../node_modules/react-native/React/CoreModules`) - React-cxxreact (from `../../node_modules/react-native/ReactCommon/cxxreact`) - React-hermes (from `../../node_modules/react-native/ReactCommon/hermes`) - React-jsi (from `../../node_modules/react-native/ReactCommon/jsi`) - React-jsiexecutor (from `../../node_modules/react-native/ReactCommon/jsiexecutor`) - React-jsinspector (from `../../node_modules/react-native/ReactCommon/jsinspector`) - React-logger (from `../../node_modules/react-native/ReactCommon/logger`) - react-native-camera (from `../node_modules/react-native-camera`) - react-native-ffmpeg/min-lts (from `../node_modules/react-native-ffmpeg`) - react-native-in-app-message (from `../node_modules/react-native-in-app-message`) - "react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)" - react-native-orientation-locker (from `../node_modules/react-native-orientation-locker`) - react-native-pager-view (from `../node_modules/react-native-pager-view`) - react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`) - react-native-video/VideoCaching (from `../node_modules/react-native-video`) - react-native-webview (from `../node_modules/react-native-webview`) - React-perflogger (from `../../node_modules/react-native/ReactCommon/reactperflogger`) - React-RCTActionSheet (from `../../node_modules/react-native/Libraries/ActionSheetIOS`) - React-RCTAnimation (from `../../node_modules/react-native/Libraries/NativeAnimation`) - React-RCTBlob (from `../../node_modules/react-native/Libraries/Blob`) - React-RCTImage (from `../../node_modules/react-native/Libraries/Image`) - React-RCTLinking (from `../../node_modules/react-native/Libraries/LinkingIOS`) - React-RCTNetwork (from `../../node_modules/react-native/Libraries/Network`) - React-RCTSettings (from `../../node_modules/react-native/Libraries/Settings`) - React-RCTText (from `../../node_modules/react-native/Libraries/Text`) - React-RCTVibration (from `../../node_modules/react-native/Libraries/Vibration`) - React-runtimeexecutor (from `../../node_modules/react-native/ReactCommon/runtimeexecutor`) - ReactCommon/turbomodule/core (from `../../node_modules/react-native/ReactCommon`) - "ReactNativeART (from `../node_modules/@react-native-community/art`)" - ReactNativeKeyboardInput (from `../node_modules/react-native-keyboard-input`) - ReactNativeKeyboardTrackingView (from `../../node_modules/react-native-keyboard-tracking-view`) - "RNCAsyncStorage (from `../node_modules/@react-native-async-storage/async-storage`)" - "RNCClipboard (from `../node_modules/@react-native-clipboard/clipboard`)" - "RNCMaskedView (from `../node_modules/@react-native-masked-view/masked-view`)" - RNDeviceInfo (from `../node_modules/react-native-device-info`) - RNFS (from `../node_modules/react-native-fs`) - RNGestureHandler (from `../node_modules/react-native-gesture-handler`) - RNKeychain (from `../node_modules/react-native-keychain`) - RNReanimated (from `../node_modules/react-native-reanimated`) - RNScreens (from `../node_modules/react-native-screens`) - RNSVG (from `../node_modules/react-native-svg`) - "SQLCipher-Amalgamation (from `../../node_modules/@commapp/sqlcipher-amalgamation`)" - Yoga (from `../../node_modules/react-native/ReactCommon/yoga`) SPEC REPOS: trunk: - DVAssetLoaderDelegate - fmt - libaom - libavif - libevent - libvmaf - libwebp - lottie-ios - mobile-ffmpeg-min - OpenSSL-Universal - SDWebImage - SDWebImageAVIFCoder - SDWebImageSVGCoder - SDWebImageWebPCoder - SPTPersistentCache - ZXingObjC EXTERNAL SOURCES: boost: :podspec: "../../node_modules/react-native/third-party-podspecs/boost.podspec" CommExpoPackage: :path: "../expo-modules/comm-expo-package/ios" DoubleConversion: :podspec: "../../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" EXApplication: :path: "../../node_modules/expo-application/ios" EXBarCodeScanner: :path: "../../node_modules/expo-barcode-scanner/ios" EXConstants: :path: "../../node_modules/expo-constants/ios" EXFileSystem: :path: "../../node_modules/expo-file-system/ios" EXFont: :path: "../../node_modules/expo-font/ios" EXImageLoader: :path: "../../node_modules/expo-image-loader/ios" EXJSONUtils: :path: "../../node_modules/expo-json-utils/ios" EXManifests: :path: "../../node_modules/expo-manifests/ios" EXMediaLibrary: :path: "../../node_modules/expo-media-library/ios" Expo: :path: "../../node_modules/expo" expo-dev-client: :path: "../../node_modules/expo-dev-client/ios" expo-dev-launcher: :path: "../../node_modules/expo-dev-launcher" expo-dev-menu: :path: "../../node_modules/expo-dev-menu" expo-dev-menu-interface: :path: "../../node_modules/expo-dev-menu-interface/ios" ExpoHaptics: :path: "../../node_modules/expo-haptics/ios" ExpoImage: :path: "../../node_modules/expo-image/ios" ExpoImageManipulator: :path: "../../node_modules/expo-image-manipulator/ios" ExpoImagePicker: :path: "../../node_modules/expo-image-picker/ios" ExpoKeepAwake: :path: "../../node_modules/expo-keep-awake/ios" ExpoModulesCore: :path: "../../node_modules/expo-modules-core" EXSecureStore: :path: "../../node_modules/expo-secure-store/ios" EXSplashScreen: :path: "../../node_modules/expo-splash-screen/ios" EXUpdatesInterface: :path: "../../node_modules/expo-updates-interface/ios" FBLazyVector: :path: "../../node_modules/react-native/Libraries/FBLazyVector" FBReactNativeSpec: :path: "../../node_modules/react-native/React/FBReactNativeSpec" glog: :podspec: "../../node_modules/react-native/third-party-podspecs/glog.podspec" hermes-engine: :podspec: "../../node_modules/react-native/sdks/hermes/hermes-engine.podspec" lottie-react-native: :path: "../node_modules/lottie-react-native" OLMKit: :path: "../node_modules/olm" RCT-Folly: :podspec: "../../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec" RCTRequired: :path: "../../node_modules/react-native/Libraries/RCTRequired" RCTTypeSafety: :path: "../../node_modules/react-native/Libraries/TypeSafety" React: :path: "../../node_modules/react-native/" React-bridging: :path: "../../node_modules/react-native/ReactCommon" React-callinvoker: :path: "../../node_modules/react-native/ReactCommon/callinvoker" React-Codegen: :path: build/generated/ios React-Core: :path: "../../node_modules/react-native/" React-CoreModules: :path: "../../node_modules/react-native/React/CoreModules" React-cxxreact: :path: "../../node_modules/react-native/ReactCommon/cxxreact" React-hermes: :path: "../../node_modules/react-native/ReactCommon/hermes" React-jsi: :path: "../../node_modules/react-native/ReactCommon/jsi" React-jsiexecutor: :path: "../../node_modules/react-native/ReactCommon/jsiexecutor" React-jsinspector: :path: "../../node_modules/react-native/ReactCommon/jsinspector" React-logger: :path: "../../node_modules/react-native/ReactCommon/logger" react-native-camera: :path: "../node_modules/react-native-camera" react-native-ffmpeg: :podspec: "../node_modules/react-native-ffmpeg" react-native-in-app-message: :path: "../node_modules/react-native-in-app-message" react-native-netinfo: :path: "../node_modules/@react-native-community/netinfo" react-native-orientation-locker: :path: "../node_modules/react-native-orientation-locker" react-native-pager-view: :path: "../node_modules/react-native-pager-view" react-native-safe-area-context: :path: "../node_modules/react-native-safe-area-context" react-native-video: :podspec: "../node_modules/react-native-video" react-native-webview: :path: "../node_modules/react-native-webview" React-perflogger: :path: "../../node_modules/react-native/ReactCommon/reactperflogger" React-RCTActionSheet: :path: "../../node_modules/react-native/Libraries/ActionSheetIOS" React-RCTAnimation: :path: "../../node_modules/react-native/Libraries/NativeAnimation" React-RCTBlob: :path: "../../node_modules/react-native/Libraries/Blob" React-RCTImage: :path: "../../node_modules/react-native/Libraries/Image" React-RCTLinking: :path: "../../node_modules/react-native/Libraries/LinkingIOS" React-RCTNetwork: :path: "../../node_modules/react-native/Libraries/Network" React-RCTSettings: :path: "../../node_modules/react-native/Libraries/Settings" React-RCTText: :path: "../../node_modules/react-native/Libraries/Text" React-RCTVibration: :path: "../../node_modules/react-native/Libraries/Vibration" React-runtimeexecutor: :path: "../../node_modules/react-native/ReactCommon/runtimeexecutor" ReactCommon: :path: "../../node_modules/react-native/ReactCommon" ReactNativeART: :path: "../node_modules/@react-native-community/art" ReactNativeKeyboardInput: :path: "../node_modules/react-native-keyboard-input" ReactNativeKeyboardTrackingView: :path: "../../node_modules/react-native-keyboard-tracking-view" RNCAsyncStorage: :path: "../node_modules/@react-native-async-storage/async-storage" RNCClipboard: :path: "../node_modules/@react-native-clipboard/clipboard" RNCMaskedView: :path: "../node_modules/@react-native-masked-view/masked-view" RNDeviceInfo: :path: "../node_modules/react-native-device-info" RNFS: :path: "../node_modules/react-native-fs" RNGestureHandler: :path: "../node_modules/react-native-gesture-handler" RNKeychain: :path: "../node_modules/react-native-keychain" RNReanimated: :path: "../node_modules/react-native-reanimated" RNScreens: :path: "../node_modules/react-native-screens" RNSVG: :path: "../node_modules/react-native-svg" SQLCipher-Amalgamation: :path: "../../node_modules/@commapp/sqlcipher-amalgamation" Yoga: :path: "../../node_modules/react-native/ReactCommon/yoga" SPEC CHECKSUMS: - boost: a7c83b31436843459a1961bfd74b96033dc77234 + boost: 9fa78656d705f55b1220151d997e57e2a3f2cde0 CommExpoPackage: 3f9d8a25537fb9d80f79a63fd1e73c51f55b87e9 DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 DVAssetLoaderDelegate: 0caec20e4e08b8560b691131539e9180024d4bce EXApplication: d8f53a7eee90a870a75656280e8d4b85726ea903 EXBarCodeScanner: cb4deb49e59b6c7ed6bbf38d187802359908d2a8 EXConstants: 3c86653c422dd77e40d10cbbabb3025003977415 EXFileSystem: 60602b6eefa6873f97172c684b7537c9760b50d6 EXFont: 319606bfe48c33b5b5063fb0994afdc496befe80 EXImageLoader: 84b65e6bd9d3345d6fbb3ab936a546c54496a64d EXJSONUtils: 09aef2c1fba1a116ca8c73a2c8299aac00d96b43 EXManifests: 347f49430b63444579aa013f0ad057d16b8d1cc8 EXMediaLibrary: b1c4f78878e45f6a359aff3a059e1660c41b73ab Expo: 5f4240506a147162542178989696e56e3dd72924 expo-dev-client: d723d52ccfbe2eb47ee24d1ac0cf5b39001589c2 expo-dev-launcher: 953f564f7d006f1af50b119cacb48cafcad40c73 expo-dev-menu: 7b8fa3792977ba4bfc231cfe0f43cdbf1a894faa expo-dev-menu-interface: 45581093393dacd51ce5e7f641cf9ed5064a2e3f ExpoHaptics: 5a56d30a87ea213dd00b09566dc4b441a4dff97f ExpoImage: 5129495e9981da259c652e23bd87615980864818 ExpoImageManipulator: 5f3c1ab8dd81de11491b5051bb925abc91fe57e4 ExpoImagePicker: d2a1cea4023008ae2fb0d95f33422b80772cc76e ExpoKeepAwake: 69b59d0a8d2b24de9f82759c39b3821fec030318 ExpoModulesCore: 485dff3a59b036a33b6050c0a5aea3cf1037fdd1 EXSecureStore: daec0117c922a67c658cb229152a9e252e5c1750 EXSplashScreen: 3e989924f61a8dd07ee4ea584c6ba14be9b51949 EXUpdatesInterface: bffd1ead18f0bab04fa784ca159c115607b8a23c FBLazyVector: bc76253beb7463b688aa6af913b822ed631de31a FBReactNativeSpec: 2dfdfdc025c136effd657e62879c66122718030b fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b hermes-engine: 918ec5addfbc430c9f443376d739f088b6dc96c3 libaom: 9bb51e0f8f9192245e3ca2a1c9e4375d9cbccc52 libavif: e242998ccec1c83bcba0bbdc256f460ad5077348 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 libvmaf: 8d61aabc2f4ed3e6591cf7406fa00a223ec11289 libwebp: f62cb61d0a484ba548448a4bd52aabf150ff6eef lottie-ios: 8f97d3271e155c2d688875c29cd3c74908aef5f8 lottie-react-native: b702fab740cdb952a8e2354713d3beda63ff97b0 mobile-ffmpeg-min: d5d22dcef5c8ec56f771258f1f5be245d914f193 OLMKit: a13e1a20579e88d03971c5821360be24949a1a09 OpenSSL-Universal: 84efb8a29841f2764ac5403e0c4119a28b713346 RCT-Folly: 0080d0a6ebf2577475bda044aa59e2ca1f909cda RCTRequired: db184d894eed9e15f1fa80c3372595b7ec360580 RCTTypeSafety: c9bf4c53ad246e4c94a49d91353ed19a8df5952f React: 3ccb97e5c4672199746cefa622fd595d4cc9319d React-bridging: 60a99ddb74281e2047f1a85912c7075a75269285 React-callinvoker: aea0b555a18d03e91d1d10b1c4eacc9d9dfb581a React-Codegen: 3d757143a6f27a84958f49466a3b18716845d192 React-Core: b1e6334eedacb3dc3adae163ccdde5e6ca26d18b React-CoreModules: 74122da11de87771f2461c757ab0c29defddd4ea React-cxxreact: bbca1cdf5165761529edff94ed117b95ccbc877a React-hermes: ee7245fc80f61eee8918a5046ed84b0b740a15f4 React-jsi: a015cacfe56047914e425d0177133c35409e2462 React-jsiexecutor: d3f6d9242d4c93e7f0bdb27cb5510003bc98445c React-jsinspector: d76d32327f21d4f40dcf696231fdbbca60de4711 React-logger: 1b3522f1e05c6360e93df3607a016c39e30a7351 react-native-camera: b5c8c7a71feecfdd5b39f0dbbf6b64b957ed55f2 react-native-ffmpeg: f9a60452aaa5d478aac205b248224994f3bde416 react-native-in-app-message: f91de5009620af01456531118264c93e249b83ec react-native-netinfo: 2517ad504b3d303e90d7a431b0fcaef76d207983 react-native-orientation-locker: 851f6510d8046ea2f14aa169b1e01fcd309a94ba react-native-pager-view: 3051346698a0ba0c4e13e40097cc11b00ee03cca react-native-safe-area-context: 99b24a0c5acd0d5dcac2b1a7f18c49ea317be99a react-native-video: 10f689069cb894d75030190a9bc62d9393e1f997 react-native-webview: e771bc375f789ebfa02a26939a57dbc6fa897336 React-perflogger: cce000b5caa4bcecbb29ee9cfdb47f26202d2599 React-RCTActionSheet: ba29f52a82d970e2aba5804490ecaea587c7a751 React-RCTAnimation: 36efe35933875c9aeea612f7d2c0394fa22552c1 React-RCTBlob: 8dd4dd76ab8384ceae2bd78141880cb0fdd6640a React-RCTImage: 3e779bb3f8e5184b5af19134c7d866f22d60d966 React-RCTLinking: 5051e59b8a625a82a7bc613687855193a567765c React-RCTNetwork: e160ffdb54f0f054911341c2889fd2c541ce0ba7 React-RCTSettings: 2fc3aaaad0bea7adc1596ff2c54b97a1febe2f7b React-RCTText: eb1c72e61dd7dbe2c291c1d6f342cc5da351545b React-RCTVibration: 7fee53a28038a1b3c5c66dfd7656e29ac6d5c04d React-runtimeexecutor: ed23be8c1e02b73e7e2f88ac7eaab8faf6961a38 ReactCommon: 153bd73ed963731a8e3e7f03a747b353fed7363e ReactNativeART: 78edc68dd4a1e675338cd0cd113319cf3a65f2ab ReactNativeKeyboardInput: 266ba27a2e9921f5bdc0b4cc30289b2a2f46b157 ReactNativeKeyboardTrackingView: 02137fac3b2ebd330d74fa54ead48b14750a2306 RNCAsyncStorage: 0c357f3156fcb16c8589ede67cc036330b6698ca RNCClipboard: f66930407a30948ffdecf43a2459bcf05aa59804 RNCMaskedView: bc0170f389056201c82a55e242e5d90070e18e5a RNDeviceInfo: 4701f0bf2a06b34654745053db0ce4cb0c53ada7 RNFS: 4ac0f0ea233904cb798630b3c077808c06931688 RNGestureHandler: 62232ba8f562f7dea5ba1b3383494eb5bf97a4d3 RNKeychain: 4f63aada75ebafd26f4bc2c670199461eab85d94 RNReanimated: f586bc5fd8ce1b6efadffb875319705939843c3b RNScreens: 34cc502acf1b916c582c60003dc3089fa01dc66d RNSVG: 302bfc9905bd8122f08966dc2ce2d07b7b52b9f8 SDWebImage: fd7e1a22f00303e058058278639bf6196ee431fe SDWebImageAVIFCoder: d759e21cf4efb640cc97250566aa556ad8bb877c SDWebImageSVGCoder: 6fc109f9c2a82ab44510fff410b88b1a6c271ee8 SDWebImageWebPCoder: 18503de6621dd2c420d680e33d46bf8e1d5169b0 SPTPersistentCache: df36ea46762d7cf026502bbb86a8b79d0080dff4 SQLCipher-Amalgamation: 69d60dc6e030cbc9ac2372c772a52c1793c863f7 Yoga: dc109b79db907f0f589fc423e991b09ec42d2295 ZXingObjC: fdbb269f25dd2032da343e06f10224d62f537bdb PODFILE CHECKSUM: 8b75c667b4679ba1a92a975823401ba7614ea7a1 COCOAPODS: 1.12.1 diff --git a/patches/expo-modules-core+1.1.1.patch b/patches/expo-modules-core+1.1.1.patch index c520236af..0fa82afc8 100644 --- a/patches/expo-modules-core+1.1.1.patch +++ b/patches/expo-modules-core+1.1.1.patch @@ -1,21 +1,34 @@ +diff --git a/node_modules/expo-modules-core/android/build.gradle b/node_modules/expo-modules-core/android/build.gradle +index e0dfb67..c71eec1 100644 +--- a/node_modules/expo-modules-core/android/build.gradle ++++ b/node_modules/expo-modules-core/android/build.gradle +@@ -384,7 +384,7 @@ task prepareHermes() { + def downloadBoost = tasks.create('downloadBoost', Download) { + dependsOn(createNativeDepsDirectories) + def srcUrl = REACT_NATIVE_TARGET_VERSION >= 69 +- ? "https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION.replace("_", ".")}/source/boost_${BOOST_VERSION}.tar.gz" ++ ? "https://archives.boost.io/release/${BOOST_VERSION.replace("_", ".")}/source/boost_${BOOST_VERSION}.tar.gz" + : "https://github.com/react-native-community/boost-for-react-native/releases/download/v${BOOST_VERSION.replace("_", ".")}-0/boost_${BOOST_VERSION}.tar.gz" + src(srcUrl) + onlyIfNewer(true) diff --git a/node_modules/expo-modules-core/ios/EXDefines.h b/node_modules/expo-modules-core/ios/EXDefines.h index 33b4d72..91b639f 100644 --- a/node_modules/expo-modules-core/ios/EXDefines.h +++ b/node_modules/expo-modules-core/ios/EXDefines.h @@ -10,6 +10,8 @@ #define EX_EXTERN_C_END #endif +#import + EX_EXTERN_C_BEGIN #define EX_EXPORTED_METHODS_PREFIX __ex_export__ @@ -79,7 +81,6 @@ if (var == nil) { return; } #define EXNullIfNil(value) (value ?: [NSNull null]) #import -#import typedef struct EXMethodInfo { const char *const jsName; diff --git a/patches/react-native+0.70.9.patch b/patches/react-native+0.70.9.patch index fda8df1f7..1a15cf602 100644 --- a/patches/react-native+0.70.9.patch +++ b/patches/react-native+0.70.9.patch @@ -1,172 +1,198 @@ diff --git a/node_modules/react-native/Libraries/Components/TextInput/TextInput.js b/node_modules/react-native/Libraries/Components/TextInput/TextInput.js index 8fa1171..316b482 100644 --- a/node_modules/react-native/Libraries/Components/TextInput/TextInput.js +++ b/node_modules/react-native/Libraries/Components/TextInput/TextInput.js @@ -208,6 +208,13 @@ export type TextContentType = type PasswordRules = string; type IOSProps = $ReadOnly<{| + /** + * If set, allows pasting of images for given threadID. + * The default value is NULL. + * @platform ios + */ + allowImagePasteForThreadID?: ?string, + /** * When the clear button should appear on the right side of the text view. * This property is supported only for single-line TextInput component. diff --git a/node_modules/react-native/Libraries/Lists/VirtualizedList.js b/node_modules/react-native/Libraries/Lists/VirtualizedList.js index 69e6309..5343e6a 100644 --- a/node_modules/react-native/Libraries/Lists/VirtualizedList.js +++ b/node_modules/react-native/Libraries/Lists/VirtualizedList.js @@ -34,6 +34,7 @@ const RefreshControl = require('../Components/RefreshControl/RefreshControl'); const ScrollView = require('../Components/ScrollView/ScrollView'); const View = require('../Components/View/View'); const Batchinator = require('../Interaction/Batchinator'); +const Platform = require('../Utilities/Platform'); const ReactNative = require('../Renderer/shims/ReactNative'); const flattenStyle = require('../StyleSheet/flattenStyle'); const StyleSheet = require('../StyleSheet/StyleSheet'); @@ -2170,9 +2171,10 @@ function describeNestedLists(childList: { } const styles = StyleSheet.create({ - verticallyInverted: { - transform: [{scaleY: -1}], - }, + verticallyInverted: + Platform.OS === 'android' + ? { scaleY: -1 } + : { transform: [{scaleY: -1}] }, horizontallyInverted: { transform: [{scaleX: -1}], }, diff --git a/node_modules/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.h b/node_modules/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.h index 5ccb6b6..1f326d4 100644 --- a/node_modules/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.h +++ b/node_modules/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.h @@ -35,6 +35,8 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, assign) BOOL caretHidden; +@property (nonatomic, copy, nullable) NSString *allowImagePasteForThreadID; + @property (nonatomic, strong, nullable) NSString *inputAccessoryViewID; @end diff --git a/node_modules/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.m b/node_modules/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.m index 92371bc..e991835 100644 --- a/node_modules/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.m +++ b/node_modules/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.m @@ -164,8 +164,12 @@ - (void)setSelectedTextRange:(UITextRange *)selectedTextRange notifyDelegate:(BO - (void)paste:(id)sender { - [super paste:sender]; - _textWasPasted = YES; + if ([UIPasteboard generalPasteboard].hasImages && _allowImagePasteForThreadID) { + [_textInputDelegate textInputImagePasted:_allowImagePasteForThreadID]; + } else { + [super paste:sender]; + _textWasPasted = YES; + } } // Turn off scroll animation to fix flaky scrolling. @@ -254,6 +258,10 @@ - (BOOL)canPerformAction:(SEL)action withSender:(id)sender return NO; } + if (action == @selector(paste:) && [UIPasteboard generalPasteboard].hasImages) { + return (_allowImagePasteForThreadID != NULL); + } + return [super canPerformAction:action withSender:sender]; } diff --git a/node_modules/react-native/Libraries/Text/TextInput/RCTBackedTextInputDelegate.h b/node_modules/react-native/Libraries/Text/TextInput/RCTBackedTextInputDelegate.h index c2a4362..90f8583 100644 --- a/node_modules/react-native/Libraries/Text/TextInput/RCTBackedTextInputDelegate.h +++ b/node_modules/react-native/Libraries/Text/TextInput/RCTBackedTextInputDelegate.h @@ -33,6 +33,8 @@ NS_ASSUME_NONNULL_BEGIN - (void)textInputDidChangeSelection; +- (void)textInputImagePasted:(NSString *)threadID; + @optional - (void)scrollViewDidScroll:(UIScrollView *)scrollView; diff --git a/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.m b/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.m index a492492..e3b38cb 100644 --- a/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.m +++ b/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.m @@ -19,6 +19,8 @@ #import #import +#import + @implementation RCTBaseTextInputView { __weak RCTBridge *_bridge; __weak id _eventDispatcher; @@ -491,6 +493,46 @@ - (void)textInputDidChangeSelection }); } +- (void)textInputImagePasted:(NSString *)threadID +{ + NSFileManager *fileManager = [NSFileManager defaultManager]; + UIPasteboard *clipboard = [UIPasteboard generalPasteboard]; + NSData *imageData = [clipboard dataForPasteboardType:(NSString*)kUTTypeImage]; + + UIImage *uiImage = [UIImage imageWithData:imageData]; + + if (!imageData) { + RCTLog(@"Failed to get image from UIPasteboard."); + return; + } + + NSString *fileName = [@([imageData hash]) stringValue]; + NSURL *tmpDirURL = [NSURL fileURLWithPath:NSTemporaryDirectory() isDirectory:YES]; + + // We add the PNG file extension because EXImageLoader fails without it. + // Our code ignores file extensions and looks at magic numbers directly. + NSURL *fileURL = [[tmpDirURL URLByAppendingPathComponent:fileName] URLByAppendingPathExtension:@"png"]; + NSString *fileDest = [fileURL path]; + + if (![fileManager fileExistsAtPath:fileDest]) { + BOOL fileWritten = [imageData writeToFile:fileDest atomically:true]; + if (!fileWritten) { + RCTLog(@"Failed to save image to temporary directory."); + return; + } + } + + NSDictionary *eventBody = @{ + @"fileName": fileName, + @"filePath": fileDest, + @"height": @(uiImage.size.height), + @"width": @(uiImage.size.width), + @"threadID": threadID, + }; + + [_eventDispatcher sendAppEventWithName:@"imagePasted" body:eventBody]; +} + - (void)updateLocalData { [self enforceTextAttributesIfNeeded]; diff --git a/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputViewManager.m b/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputViewManager.m index b1ecf85..3462f98 100644 --- a/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputViewManager.m +++ b/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputViewManager.m @@ -33,6 +33,7 @@ @implementation RCTBaseTextInputViewManager #pragma mark - Unified properties +RCT_REMAP_VIEW_PROPERTY(allowImagePasteForThreadID, backedTextInputView.allowImagePasteForThreadID, NSString) RCT_REMAP_VIEW_PROPERTY(autoCapitalize, backedTextInputView.autocapitalizationType, UITextAutocapitalizationType) RCT_REMAP_VIEW_PROPERTY(autoCorrect, backedTextInputView.autocorrectionType, UITextAutocorrectionType) RCT_REMAP_VIEW_PROPERTY(contextMenuHidden, backedTextInputView.contextMenuHidden, BOOL) +diff --git a/node_modules/react-native/ReactAndroid/build.gradle b/node_modules/react-native/ReactAndroid/build.gradle +index 3be8b26..3f7bba8 100644 +--- a/node_modules/react-native/ReactAndroid/build.gradle ++++ b/node_modules/react-native/ReactAndroid/build.gradle +@@ -61,7 +61,7 @@ task createNativeDepsDirectories { + } + + task downloadBoost(dependsOn: createNativeDepsDirectories, type: Download) { +- src("https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION.replace("_", ".")}/source/boost_${BOOST_VERSION}.tar.gz") ++ src("https://archives.boost.io/release/${BOOST_VERSION.replace("_", ".")}/source/boost_${BOOST_VERSION}.tar.gz") + onlyIfNewer(true) + overwrite(false) + dest(new File(downloadsDir, "boost_${BOOST_VERSION}.tar.gz")) +diff --git a/node_modules/react-native/third-party-podspecs/boost.podspec b/node_modules/react-native/third-party-podspecs/boost.podspec +index 2f1fcc4..fa82134 100644 +--- a/node_modules/react-native/third-party-podspecs/boost.podspec ++++ b/node_modules/react-native/third-party-podspecs/boost.podspec +@@ -10,7 +10,7 @@ Pod::Spec.new do |spec| + spec.homepage = 'http://www.boost.org' + spec.summary = 'Boost provides free peer-reviewed portable C++ source libraries.' + spec.authors = 'Rene Rivera' +- spec.source = { :http => 'https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2', ++ spec.source = { :http => 'https://archives.boost.io/release/1.76.0/source/boost_1_76_0.tar.bz2', + :sha256 => 'f0397ba6e982c4450f27bf32a2a83292aba035b827a5623a14636ea583318c41' } + + # Pinning to the same version as React.podspec. diff --git a/patches/react-native-reanimated+2.12.0.patch b/patches/react-native-reanimated+2.12.0.patch new file mode 100644 index 000000000..02212d38f --- /dev/null +++ b/patches/react-native-reanimated+2.12.0.patch @@ -0,0 +1,13 @@ +diff --git a/node_modules/react-native-reanimated/android/build.gradle b/node_modules/react-native-reanimated/android/build.gradle +index a38b2a5..32cb655 100644 +--- a/node_modules/react-native-reanimated/android/build.gradle ++++ b/node_modules/react-native-reanimated/android/build.gradle +@@ -658,7 +658,7 @@ if (isNewArchitectureEnabled()) { + task downloadBoost(dependsOn: resolveBoost, type: Download) { + def transformedVersion = BOOST_VERSION.replace("_", ".") + def artifactLocalName = "boost_${BOOST_VERSION}.tar.gz" +- def srcUrl = "https://boostorg.jfrog.io/artifactory/main/release/${transformedVersion}/source/boost_${BOOST_VERSION}.tar.gz" ++ def srcUrl = "https://archives.boost.io/release/${BOOST_VERSION.replace("_", ".")}/source/boost_${BOOST_VERSION}.tar.gz" + if (REACT_NATIVE_MINOR_VERSION < 69) { + srcUrl = "https://github.com/react-native-community/boost-for-react-native/releases/download/v${transformedVersion}-0/boost_${BOOST_VERSION}.tar.gz" + }