feat: new architecture support (#649)
* feat: rn 70 ios builds with new arch * feat: android migration wip * fix: update test-app, react-native and react version, fix codegen config * fix: change spec for backward compat * fix: simplify android code and make it work * fix: ios code * fix: remove unnecessary folly version * fix: srcDirs on paper * refactor: review * refactor: review * refactor: node 18 * docs: new arch in readme * docs: new arch in readme * refactor: use Spec --------- Co-authored-by: Wojciech Lewicki <wojciech.lewicki@swmansion.com>
This commit is contained in:
parent
301c551970
commit
fc1c0f2d24
2
.github/workflows/nodejs.yml
vendored
2
.github/workflows/nodejs.yml
vendored
@ -18,7 +18,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [15.x]
|
||||
node-version: [18.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
@ -18,7 +18,9 @@ A React Native wrapper for:
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
Requires RN >= 0.63, Android 5.0+ and iOS 11+
|
||||
Requires RN >= 0.69, Android 5.0+ and iOS 11+
|
||||
|
||||
New architecture is supported.
|
||||
|
||||
# Table of Contents
|
||||
|
||||
|
||||
@ -1,56 +1,62 @@
|
||||
buildscript {
|
||||
if (project == rootProject) {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.5.3'
|
||||
}
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
def getExtOrIntegerDefault(name) {
|
||||
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties['ReactNativeDocumentPicker_' + name]).toInteger()
|
||||
}
|
||||
|
||||
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.android.library'
|
||||
|
||||
def safeExtGet(prop, fallback) {
|
||||
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
||||
if (isNewArchitectureEnabled()) {
|
||||
apply plugin: "com.facebook.react"
|
||||
}
|
||||
|
||||
|
||||
android {
|
||||
compileSdkVersion safeExtGet('compileSdkVersion', 29)
|
||||
buildToolsVersion safeExtGet('buildToolsVersion', '29.0.2')
|
||||
defaultConfig {
|
||||
minSdkVersion safeExtGet('minSdkVersion', 21)
|
||||
targetSdkVersion safeExtGet('targetSdkVersion', 29)
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
compileSdkVersion getExtOrIntegerDefault('compileSdkVersion')
|
||||
|
||||
// Used to override the NDK path/version on internal CI or by allowing
|
||||
// users to customize the NDK path/version from their root project (e.g. for M1 support)
|
||||
if (rootProject.hasProperty("ndkPath")) {
|
||||
ndkPath rootProject.ext.ndkPath
|
||||
}
|
||||
if (rootProject.hasProperty("ndkVersion")) {
|
||||
ndkVersion rootProject.ext.ndkVersion
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
defaultConfig {
|
||||
minSdkVersion getExtOrIntegerDefault('minSdkVersion')
|
||||
targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
|
||||
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
|
||||
}
|
||||
|
||||
sourceSets.main {
|
||||
java {
|
||||
if (!isNewArchitectureEnabled()) {
|
||||
srcDirs += 'src/paper/java'
|
||||
}
|
||||
}
|
||||
}
|
||||
lintOptions {
|
||||
disable 'GradleCompatible'
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
maven {
|
||||
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
||||
url("$rootDir/../node_modules/react-native/android")
|
||||
}
|
||||
google()
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
//noinspection GradleDynamicVersion
|
||||
implementation "com.facebook.react:react-native:+" // From node_modules
|
||||
implementation 'com.facebook.react:react-native:+' // from node_modules
|
||||
}
|
||||
|
||||
@ -1,28 +0,0 @@
|
||||
package com.reactnativedocumentpicker;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.facebook.react.ReactPackage;
|
||||
import com.facebook.react.bridge.NativeModule;
|
||||
import com.facebook.react.bridge.ReactApplicationContext;
|
||||
import com.facebook.react.uimanager.ViewManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class DocumentPickerPackage implements ReactPackage {
|
||||
@NonNull
|
||||
@Override
|
||||
public List<NativeModule> createNativeModules(@NonNull ReactApplicationContext reactContext) {
|
||||
List<NativeModule> modules = new ArrayList<>();
|
||||
modules.add(new DocumentPickerModule(reactContext));
|
||||
return modules;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public List<ViewManager> createViewManagers(@NonNull ReactApplicationContext reactContext) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
@ -22,13 +22,11 @@ import com.facebook.react.bridge.GuardedResultAsyncTask;
|
||||
import com.facebook.react.bridge.Promise;
|
||||
import com.facebook.react.bridge.ReactApplicationContext;
|
||||
import com.facebook.react.bridge.ReactContext;
|
||||
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
||||
import com.facebook.react.bridge.ReactMethod;
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.bridge.WritableArray;
|
||||
import com.facebook.react.bridge.WritableMap;
|
||||
import com.facebook.react.module.annotations.ReactModule;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
@ -39,8 +37,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
@ReactModule(name = DocumentPickerModule.NAME)
|
||||
public class DocumentPickerModule extends ReactContextBaseJavaModule {
|
||||
public class RNDocumentPickerModule extends NativeDocumentPickerSpec {
|
||||
public static final String NAME = "RNDocumentPicker";
|
||||
private static final int READ_REQUEST_CODE = 41;
|
||||
private static final int PICK_DIR_REQUEST_CODE = 42;
|
||||
@ -64,6 +61,14 @@ public class DocumentPickerModule extends ReactContextBaseJavaModule {
|
||||
private static final String FIELD_TYPE = "type";
|
||||
private static final String FIELD_SIZE = "size";
|
||||
|
||||
private Promise promise;
|
||||
private String copyTo;
|
||||
|
||||
public RNDocumentPickerModule(ReactApplicationContext reactContext) {
|
||||
super(reactContext);
|
||||
reactContext.addActivityEventListener(activityEventListener);
|
||||
}
|
||||
|
||||
private final ActivityEventListener activityEventListener = new BaseActivityEventListener() {
|
||||
@Override
|
||||
public void onActivityResult(Activity activity, int requestCode, int resultCode, Intent data) {
|
||||
@ -89,14 +94,6 @@ public class DocumentPickerModule extends ReactContextBaseJavaModule {
|
||||
return array;
|
||||
}
|
||||
|
||||
private Promise promise;
|
||||
private String copyTo;
|
||||
|
||||
public DocumentPickerModule(ReactApplicationContext reactContext) {
|
||||
super(reactContext);
|
||||
reactContext.addActivityEventListener(activityEventListener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCatalystInstanceDestroy() {
|
||||
super.onCatalystInstanceDestroy();
|
||||
@ -167,6 +164,11 @@ public class DocumentPickerModule extends ReactContextBaseJavaModule {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void releaseSecureAccess(ReadableArray uris, Promise promise) {
|
||||
promise.reject("RNDocumentPicker:releaseSecureAccess", "releaseSecureAccess is not supported on Android");
|
||||
}
|
||||
|
||||
private void onPickDirectoryResult(int resultCode, Intent data) {
|
||||
if (resultCode == Activity.RESULT_CANCELED) {
|
||||
sendError(E_DOCUMENT_PICKER_CANCELED, "User canceled directory picker");
|
||||
@ -0,0 +1,46 @@
|
||||
package com.reactnativedocumentpicker;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.facebook.react.TurboReactPackage;
|
||||
import com.facebook.react.bridge.NativeModule;
|
||||
import com.facebook.react.bridge.ReactApplicationContext;
|
||||
import com.facebook.react.module.model.ReactModuleInfo;
|
||||
import com.facebook.react.module.model.ReactModuleInfoProvider;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class RNDocumentPickerPackage extends TurboReactPackage {
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public NativeModule getModule(String name, ReactApplicationContext reactContext) {
|
||||
if (name.equals(RNDocumentPickerModule.NAME)) {
|
||||
return new RNDocumentPickerModule(reactContext);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReactModuleInfoProvider getReactModuleInfoProvider() {
|
||||
return () -> {
|
||||
boolean isTurboModule = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
|
||||
final Map<String, ReactModuleInfo> moduleInfos = new HashMap<>();
|
||||
moduleInfos.put(
|
||||
RNDocumentPickerModule.NAME,
|
||||
new ReactModuleInfo(
|
||||
RNDocumentPickerModule.NAME,
|
||||
RNDocumentPickerModule.NAME,
|
||||
// "DocumentPickerModule",
|
||||
false, // canOverrideExistingModule
|
||||
false, // needsEagerInit
|
||||
true, // hasConstants
|
||||
false, // isCxxModule
|
||||
isTurboModule // isTurboModule
|
||||
));
|
||||
return moduleInfos;
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
|
||||
/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Then it was commited. It is here to support the old architecture.
|
||||
* If you use the new architecture, this file won't be included and instead will be generated by the codegen.
|
||||
*
|
||||
* @generated by codegen project: GenerateModuleJavaSpec.js
|
||||
*
|
||||
* @nolint
|
||||
*/
|
||||
|
||||
package com.reactnativedocumentpicker;
|
||||
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
import com.facebook.react.bridge.Promise;
|
||||
import com.facebook.react.bridge.ReactApplicationContext;
|
||||
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
||||
import com.facebook.react.bridge.ReactMethod;
|
||||
import com.facebook.react.bridge.ReactModuleWithSpec;
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.turbomodule.core.interfaces.TurboModule;
|
||||
|
||||
public abstract class NativeDocumentPickerSpec extends ReactContextBaseJavaModule implements ReactModuleWithSpec, TurboModule {
|
||||
public NativeDocumentPickerSpec(ReactApplicationContext reactContext) {
|
||||
super(reactContext);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
@DoNotStrip
|
||||
public abstract void pick(ReadableMap options, Promise promise);
|
||||
|
||||
@ReactMethod
|
||||
@DoNotStrip
|
||||
public abstract void releaseSecureAccess(ReadableArray uris, Promise promise);
|
||||
|
||||
@ReactMethod
|
||||
@DoNotStrip
|
||||
public abstract void pickDirectory(Promise promise);
|
||||
}
|
||||
@ -99,6 +99,7 @@ const styles = StyleSheet.create({
|
||||
flex: 1,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
backgroundColor: 'white',
|
||||
},
|
||||
box: {
|
||||
width: 60,
|
||||
|
||||
@ -1,25 +1,26 @@
|
||||
buildscript {
|
||||
def androidTestAppDir = "../../node_modules/react-native-test-app/android"
|
||||
apply(from: "${androidTestAppDir}/dependencies.gradle")
|
||||
def androidTestAppDir = "../../node_modules/react-native-test-app/android"
|
||||
apply(from: "${androidTestAppDir}/dependencies.gradle")
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
google()
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
google()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath "com.android.tools.build:gradle:$androidPluginVersion"
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
|
||||
dependencies {
|
||||
getReactNativeDependencies().each { dependency ->
|
||||
classpath(dependency)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
maven {
|
||||
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
||||
url("${rootDir}/../../node_modules/react-native/android")
|
||||
}
|
||||
mavenCentral()
|
||||
google()
|
||||
repositories {
|
||||
maven {
|
||||
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
||||
url("${rootDir}/../../node_modules/react-native/android")
|
||||
}
|
||||
mavenCentral()
|
||||
google()
|
||||
}
|
||||
}
|
||||
|
||||
@ -30,9 +30,17 @@ android.enableJetifier=true
|
||||
# Version of Flipper to use with React Native. Default value is whatever React
|
||||
# Native defaults to. To disable Flipper, set it to `false`.
|
||||
#FLIPPER_VERSION=0.125.0
|
||||
FLIPPER_VERSION=false
|
||||
|
||||
# Enable Fabric at runtime.
|
||||
#USE_FABRIC=1
|
||||
|
||||
# Enable new architecture, i.e. Fabric + TurboModule - implies USE_FABRIC=1.
|
||||
# Note that this is incompatible with web debugging.
|
||||
newArchEnabled=false
|
||||
|
||||
# Uncomment the line below if building react-native from source
|
||||
#ANDROID_NDK_VERSION=21.4.7075529
|
||||
|
||||
# Version of Kotlin to build against.
|
||||
#KOTLIN_VERSION=1.7.10
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
@ -2,19 +2,19 @@ PODS:
|
||||
- boost (1.76.0)
|
||||
- CocoaAsyncSocket (7.6.5)
|
||||
- DoubleConversion (1.1.6)
|
||||
- FBLazyVector (0.68.2)
|
||||
- FBReactNativeSpec (0.68.2):
|
||||
- RCT-Folly (= 2021.06.28.00-v2)
|
||||
- RCTRequired (= 0.68.2)
|
||||
- RCTTypeSafety (= 0.68.2)
|
||||
- React-Core (= 0.68.2)
|
||||
- React-jsi (= 0.68.2)
|
||||
- ReactCommon/turbomodule/core (= 0.68.2)
|
||||
- FBLazyVector (0.71.8)
|
||||
- FBReactNativeSpec (0.71.8):
|
||||
- RCT-Folly (= 2021.07.22.00)
|
||||
- RCTRequired (= 0.71.8)
|
||||
- RCTTypeSafety (= 0.71.8)
|
||||
- React-Core (= 0.71.8)
|
||||
- React-jsi (= 0.71.8)
|
||||
- ReactCommon/turbomodule/core (= 0.71.8)
|
||||
- Flipper (0.125.0):
|
||||
- Flipper-Folly (~> 2.6)
|
||||
- Flipper-RSocket (~> 1.4)
|
||||
- Flipper-Boost-iOSX (1.76.0.1.11)
|
||||
- Flipper-DoubleConversion (3.2.0)
|
||||
- Flipper-DoubleConversion (3.2.0.1)
|
||||
- Flipper-Fmt (7.1.7)
|
||||
- Flipper-Folly (2.6.10):
|
||||
- Flipper-Boost-iOSX
|
||||
@ -23,7 +23,7 @@ PODS:
|
||||
- Flipper-Glog
|
||||
- libevent (~> 2.1.12)
|
||||
- OpenSSL-Universal (= 1.1.1100)
|
||||
- Flipper-Glog (0.5.0.4)
|
||||
- Flipper-Glog (0.5.0.5)
|
||||
- Flipper-PeerTalk (0.0.4)
|
||||
- Flipper-RSocket (1.4.3):
|
||||
- Flipper-Folly (~> 2.6)
|
||||
@ -75,286 +75,319 @@ PODS:
|
||||
- glog (0.3.5)
|
||||
- libevent (2.1.12)
|
||||
- OpenSSL-Universal (1.1.1100)
|
||||
- RCT-Folly (2021.06.28.00-v2):
|
||||
- RCT-Folly (2021.07.22.00):
|
||||
- boost
|
||||
- DoubleConversion
|
||||
- fmt (~> 6.2.1)
|
||||
- glog
|
||||
- RCT-Folly/Default (= 2021.06.28.00-v2)
|
||||
- RCT-Folly/Default (2021.06.28.00-v2):
|
||||
- RCT-Folly/Default (= 2021.07.22.00)
|
||||
- RCT-Folly/Default (2021.07.22.00):
|
||||
- boost
|
||||
- DoubleConversion
|
||||
- fmt (~> 6.2.1)
|
||||
- glog
|
||||
- RCTRequired (0.68.2)
|
||||
- RCTTypeSafety (0.68.2):
|
||||
- FBLazyVector (= 0.68.2)
|
||||
- RCT-Folly (= 2021.06.28.00-v2)
|
||||
- RCTRequired (= 0.68.2)
|
||||
- React-Core (= 0.68.2)
|
||||
- React (0.68.2):
|
||||
- React-Core (= 0.68.2)
|
||||
- React-Core/DevSupport (= 0.68.2)
|
||||
- React-Core/RCTWebSocket (= 0.68.2)
|
||||
- React-RCTActionSheet (= 0.68.2)
|
||||
- React-RCTAnimation (= 0.68.2)
|
||||
- React-RCTBlob (= 0.68.2)
|
||||
- React-RCTImage (= 0.68.2)
|
||||
- React-RCTLinking (= 0.68.2)
|
||||
- React-RCTNetwork (= 0.68.2)
|
||||
- React-RCTSettings (= 0.68.2)
|
||||
- React-RCTText (= 0.68.2)
|
||||
- React-RCTVibration (= 0.68.2)
|
||||
- React-callinvoker (0.68.2)
|
||||
- React-Codegen (0.68.2):
|
||||
- FBReactNativeSpec (= 0.68.2)
|
||||
- RCT-Folly (= 2021.06.28.00-v2)
|
||||
- RCTRequired (= 0.68.2)
|
||||
- RCTTypeSafety (= 0.68.2)
|
||||
- React-Core (= 0.68.2)
|
||||
- React-jsi (= 0.68.2)
|
||||
- React-jsiexecutor (= 0.68.2)
|
||||
- ReactCommon/turbomodule/core (= 0.68.2)
|
||||
- React-Core (0.68.2):
|
||||
- glog
|
||||
- RCT-Folly (= 2021.06.28.00-v2)
|
||||
- React-Core/Default (= 0.68.2)
|
||||
- React-cxxreact (= 0.68.2)
|
||||
- React-jsi (= 0.68.2)
|
||||
- React-jsiexecutor (= 0.68.2)
|
||||
- React-perflogger (= 0.68.2)
|
||||
- Yoga
|
||||
- React-Core/CoreModulesHeaders (0.68.2):
|
||||
- glog
|
||||
- RCT-Folly (= 2021.06.28.00-v2)
|
||||
- React-Core/Default
|
||||
- React-cxxreact (= 0.68.2)
|
||||
- React-jsi (= 0.68.2)
|
||||
- React-jsiexecutor (= 0.68.2)
|
||||
- React-perflogger (= 0.68.2)
|
||||
- Yoga
|
||||
- React-Core/Default (0.68.2):
|
||||
- glog
|
||||
- RCT-Folly (= 2021.06.28.00-v2)
|
||||
- React-cxxreact (= 0.68.2)
|
||||
- React-jsi (= 0.68.2)
|
||||
- React-jsiexecutor (= 0.68.2)
|
||||
- React-perflogger (= 0.68.2)
|
||||
- Yoga
|
||||
- React-Core/DevSupport (0.68.2):
|
||||
- glog
|
||||
- RCT-Folly (= 2021.06.28.00-v2)
|
||||
- React-Core/Default (= 0.68.2)
|
||||
- React-Core/RCTWebSocket (= 0.68.2)
|
||||
- React-cxxreact (= 0.68.2)
|
||||
- React-jsi (= 0.68.2)
|
||||
- React-jsiexecutor (= 0.68.2)
|
||||
- React-jsinspector (= 0.68.2)
|
||||
- React-perflogger (= 0.68.2)
|
||||
- Yoga
|
||||
- React-Core/RCTActionSheetHeaders (0.68.2):
|
||||
- glog
|
||||
- RCT-Folly (= 2021.06.28.00-v2)
|
||||
- React-Core/Default
|
||||
- React-cxxreact (= 0.68.2)
|
||||
- React-jsi (= 0.68.2)
|
||||
- React-jsiexecutor (= 0.68.2)
|
||||
- React-perflogger (= 0.68.2)
|
||||
- Yoga
|
||||
- React-Core/RCTAnimationHeaders (0.68.2):
|
||||
- glog
|
||||
- RCT-Folly (= 2021.06.28.00-v2)
|
||||
- React-Core/Default
|
||||
- React-cxxreact (= 0.68.2)
|
||||
- React-jsi (= 0.68.2)
|
||||
- React-jsiexecutor (= 0.68.2)
|
||||
- React-perflogger (= 0.68.2)
|
||||
- Yoga
|
||||
- React-Core/RCTBlobHeaders (0.68.2):
|
||||
- glog
|
||||
- RCT-Folly (= 2021.06.28.00-v2)
|
||||
- React-Core/Default
|
||||
- React-cxxreact (= 0.68.2)
|
||||
- React-jsi (= 0.68.2)
|
||||
- React-jsiexecutor (= 0.68.2)
|
||||
- React-perflogger (= 0.68.2)
|
||||
- Yoga
|
||||
- React-Core/RCTImageHeaders (0.68.2):
|
||||
- glog
|
||||
- RCT-Folly (= 2021.06.28.00-v2)
|
||||
- React-Core/Default
|
||||
- React-cxxreact (= 0.68.2)
|
||||
- React-jsi (= 0.68.2)
|
||||
- React-jsiexecutor (= 0.68.2)
|
||||
- React-perflogger (= 0.68.2)
|
||||
- Yoga
|
||||
- React-Core/RCTLinkingHeaders (0.68.2):
|
||||
- glog
|
||||
- RCT-Folly (= 2021.06.28.00-v2)
|
||||
- React-Core/Default
|
||||
- React-cxxreact (= 0.68.2)
|
||||
- React-jsi (= 0.68.2)
|
||||
- React-jsiexecutor (= 0.68.2)
|
||||
- React-perflogger (= 0.68.2)
|
||||
- Yoga
|
||||
- React-Core/RCTNetworkHeaders (0.68.2):
|
||||
- glog
|
||||
- RCT-Folly (= 2021.06.28.00-v2)
|
||||
- React-Core/Default
|
||||
- React-cxxreact (= 0.68.2)
|
||||
- React-jsi (= 0.68.2)
|
||||
- React-jsiexecutor (= 0.68.2)
|
||||
- React-perflogger (= 0.68.2)
|
||||
- Yoga
|
||||
- React-Core/RCTSettingsHeaders (0.68.2):
|
||||
- glog
|
||||
- RCT-Folly (= 2021.06.28.00-v2)
|
||||
- React-Core/Default
|
||||
- React-cxxreact (= 0.68.2)
|
||||
- React-jsi (= 0.68.2)
|
||||
- React-jsiexecutor (= 0.68.2)
|
||||
- React-perflogger (= 0.68.2)
|
||||
- Yoga
|
||||
- React-Core/RCTTextHeaders (0.68.2):
|
||||
- glog
|
||||
- RCT-Folly (= 2021.06.28.00-v2)
|
||||
- React-Core/Default
|
||||
- React-cxxreact (= 0.68.2)
|
||||
- React-jsi (= 0.68.2)
|
||||
- React-jsiexecutor (= 0.68.2)
|
||||
- React-perflogger (= 0.68.2)
|
||||
- Yoga
|
||||
- React-Core/RCTVibrationHeaders (0.68.2):
|
||||
- glog
|
||||
- RCT-Folly (= 2021.06.28.00-v2)
|
||||
- React-Core/Default
|
||||
- React-cxxreact (= 0.68.2)
|
||||
- React-jsi (= 0.68.2)
|
||||
- React-jsiexecutor (= 0.68.2)
|
||||
- React-perflogger (= 0.68.2)
|
||||
- Yoga
|
||||
- React-Core/RCTWebSocket (0.68.2):
|
||||
- glog
|
||||
- RCT-Folly (= 2021.06.28.00-v2)
|
||||
- React-Core/Default (= 0.68.2)
|
||||
- React-cxxreact (= 0.68.2)
|
||||
- React-jsi (= 0.68.2)
|
||||
- React-jsiexecutor (= 0.68.2)
|
||||
- React-perflogger (= 0.68.2)
|
||||
- Yoga
|
||||
- React-CoreModules (0.68.2):
|
||||
- RCT-Folly (= 2021.06.28.00-v2)
|
||||
- RCTTypeSafety (= 0.68.2)
|
||||
- React-Codegen (= 0.68.2)
|
||||
- React-Core/CoreModulesHeaders (= 0.68.2)
|
||||
- React-jsi (= 0.68.2)
|
||||
- React-RCTImage (= 0.68.2)
|
||||
- ReactCommon/turbomodule/core (= 0.68.2)
|
||||
- React-cxxreact (0.68.2):
|
||||
- boost (= 1.76.0)
|
||||
- DoubleConversion
|
||||
- glog
|
||||
- RCT-Folly (= 2021.06.28.00-v2)
|
||||
- React-callinvoker (= 0.68.2)
|
||||
- React-jsi (= 0.68.2)
|
||||
- React-jsinspector (= 0.68.2)
|
||||
- React-logger (= 0.68.2)
|
||||
- React-perflogger (= 0.68.2)
|
||||
- React-runtimeexecutor (= 0.68.2)
|
||||
- React-jsi (0.68.2):
|
||||
- boost (= 1.76.0)
|
||||
- DoubleConversion
|
||||
- glog
|
||||
- RCT-Folly (= 2021.06.28.00-v2)
|
||||
- React-jsi/Default (= 0.68.2)
|
||||
- React-jsi/Default (0.68.2):
|
||||
- boost (= 1.76.0)
|
||||
- DoubleConversion
|
||||
- glog
|
||||
- RCT-Folly (= 2021.06.28.00-v2)
|
||||
- React-jsiexecutor (0.68.2):
|
||||
- DoubleConversion
|
||||
- glog
|
||||
- RCT-Folly (= 2021.06.28.00-v2)
|
||||
- React-cxxreact (= 0.68.2)
|
||||
- React-jsi (= 0.68.2)
|
||||
- React-perflogger (= 0.68.2)
|
||||
- React-jsinspector (0.68.2)
|
||||
- React-logger (0.68.2):
|
||||
- glog
|
||||
- react-native-document-picker (8.1.0):
|
||||
- RCTRequired (0.71.8)
|
||||
- RCTTypeSafety (0.71.8):
|
||||
- FBLazyVector (= 0.71.8)
|
||||
- RCTRequired (= 0.71.8)
|
||||
- React-Core (= 0.71.8)
|
||||
- React (0.71.8):
|
||||
- React-Core (= 0.71.8)
|
||||
- React-Core/DevSupport (= 0.71.8)
|
||||
- React-Core/RCTWebSocket (= 0.71.8)
|
||||
- React-RCTActionSheet (= 0.71.8)
|
||||
- React-RCTAnimation (= 0.71.8)
|
||||
- React-RCTBlob (= 0.71.8)
|
||||
- React-RCTImage (= 0.71.8)
|
||||
- React-RCTLinking (= 0.71.8)
|
||||
- React-RCTNetwork (= 0.71.8)
|
||||
- React-RCTSettings (= 0.71.8)
|
||||
- React-RCTText (= 0.71.8)
|
||||
- React-RCTVibration (= 0.71.8)
|
||||
- React-callinvoker (0.71.8)
|
||||
- React-Codegen (0.71.8):
|
||||
- FBReactNativeSpec
|
||||
- RCT-Folly
|
||||
- RCTRequired
|
||||
- RCTTypeSafety
|
||||
- React-Core
|
||||
- React-perflogger (0.68.2)
|
||||
- React-RCTActionSheet (0.68.2):
|
||||
- React-Core/RCTActionSheetHeaders (= 0.68.2)
|
||||
- React-RCTAnimation (0.68.2):
|
||||
- RCT-Folly (= 2021.06.28.00-v2)
|
||||
- RCTTypeSafety (= 0.68.2)
|
||||
- React-Codegen (= 0.68.2)
|
||||
- React-Core/RCTAnimationHeaders (= 0.68.2)
|
||||
- React-jsi (= 0.68.2)
|
||||
- ReactCommon/turbomodule/core (= 0.68.2)
|
||||
- React-RCTBlob (0.68.2):
|
||||
- RCT-Folly (= 2021.06.28.00-v2)
|
||||
- React-Codegen (= 0.68.2)
|
||||
- React-Core/RCTBlobHeaders (= 0.68.2)
|
||||
- React-Core/RCTWebSocket (= 0.68.2)
|
||||
- React-jsi (= 0.68.2)
|
||||
- React-RCTNetwork (= 0.68.2)
|
||||
- ReactCommon/turbomodule/core (= 0.68.2)
|
||||
- React-RCTImage (0.68.2):
|
||||
- RCT-Folly (= 2021.06.28.00-v2)
|
||||
- RCTTypeSafety (= 0.68.2)
|
||||
- React-Codegen (= 0.68.2)
|
||||
- React-Core/RCTImageHeaders (= 0.68.2)
|
||||
- React-jsi (= 0.68.2)
|
||||
- React-RCTNetwork (= 0.68.2)
|
||||
- ReactCommon/turbomodule/core (= 0.68.2)
|
||||
- React-RCTLinking (0.68.2):
|
||||
- React-Codegen (= 0.68.2)
|
||||
- React-Core/RCTLinkingHeaders (= 0.68.2)
|
||||
- React-jsi (= 0.68.2)
|
||||
- ReactCommon/turbomodule/core (= 0.68.2)
|
||||
- React-RCTNetwork (0.68.2):
|
||||
- RCT-Folly (= 2021.06.28.00-v2)
|
||||
- RCTTypeSafety (= 0.68.2)
|
||||
- React-Codegen (= 0.68.2)
|
||||
- React-Core/RCTNetworkHeaders (= 0.68.2)
|
||||
- React-jsi (= 0.68.2)
|
||||
- ReactCommon/turbomodule/core (= 0.68.2)
|
||||
- React-RCTSettings (0.68.2):
|
||||
- RCT-Folly (= 2021.06.28.00-v2)
|
||||
- RCTTypeSafety (= 0.68.2)
|
||||
- React-Codegen (= 0.68.2)
|
||||
- React-Core/RCTSettingsHeaders (= 0.68.2)
|
||||
- React-jsi (= 0.68.2)
|
||||
- ReactCommon/turbomodule/core (= 0.68.2)
|
||||
- React-RCTText (0.68.2):
|
||||
- React-Core/RCTTextHeaders (= 0.68.2)
|
||||
- React-RCTVibration (0.68.2):
|
||||
- RCT-Folly (= 2021.06.28.00-v2)
|
||||
- React-Codegen (= 0.68.2)
|
||||
- React-Core/RCTVibrationHeaders (= 0.68.2)
|
||||
- React-jsi (= 0.68.2)
|
||||
- ReactCommon/turbomodule/core (= 0.68.2)
|
||||
- React-runtimeexecutor (0.68.2):
|
||||
- React-jsi (= 0.68.2)
|
||||
- ReactCommon/turbomodule/core (0.68.2):
|
||||
- React-jsc
|
||||
- React-jsi
|
||||
- React-jsiexecutor
|
||||
- ReactCommon/turbomodule/bridging
|
||||
- ReactCommon/turbomodule/core
|
||||
- React-Core (0.71.8):
|
||||
- glog
|
||||
- RCT-Folly (= 2021.07.22.00)
|
||||
- React-Core/Default (= 0.71.8)
|
||||
- React-cxxreact (= 0.71.8)
|
||||
- React-jsc
|
||||
- React-jsi (= 0.71.8)
|
||||
- React-jsiexecutor (= 0.71.8)
|
||||
- React-perflogger (= 0.71.8)
|
||||
- Yoga
|
||||
- React-Core/CoreModulesHeaders (0.71.8):
|
||||
- glog
|
||||
- RCT-Folly (= 2021.07.22.00)
|
||||
- React-Core/Default
|
||||
- React-cxxreact (= 0.71.8)
|
||||
- React-jsc
|
||||
- React-jsi (= 0.71.8)
|
||||
- React-jsiexecutor (= 0.71.8)
|
||||
- React-perflogger (= 0.71.8)
|
||||
- Yoga
|
||||
- React-Core/Default (0.71.8):
|
||||
- glog
|
||||
- RCT-Folly (= 2021.07.22.00)
|
||||
- React-cxxreact (= 0.71.8)
|
||||
- React-jsc
|
||||
- React-jsi (= 0.71.8)
|
||||
- React-jsiexecutor (= 0.71.8)
|
||||
- React-perflogger (= 0.71.8)
|
||||
- Yoga
|
||||
- React-Core/DevSupport (0.71.8):
|
||||
- glog
|
||||
- RCT-Folly (= 2021.07.22.00)
|
||||
- React-Core/Default (= 0.71.8)
|
||||
- React-Core/RCTWebSocket (= 0.71.8)
|
||||
- React-cxxreact (= 0.71.8)
|
||||
- React-jsc
|
||||
- React-jsi (= 0.71.8)
|
||||
- React-jsiexecutor (= 0.71.8)
|
||||
- React-jsinspector (= 0.71.8)
|
||||
- React-perflogger (= 0.71.8)
|
||||
- Yoga
|
||||
- React-Core/RCTActionSheetHeaders (0.71.8):
|
||||
- glog
|
||||
- RCT-Folly (= 2021.07.22.00)
|
||||
- React-Core/Default
|
||||
- React-cxxreact (= 0.71.8)
|
||||
- React-jsc
|
||||
- React-jsi (= 0.71.8)
|
||||
- React-jsiexecutor (= 0.71.8)
|
||||
- React-perflogger (= 0.71.8)
|
||||
- Yoga
|
||||
- React-Core/RCTAnimationHeaders (0.71.8):
|
||||
- glog
|
||||
- RCT-Folly (= 2021.07.22.00)
|
||||
- React-Core/Default
|
||||
- React-cxxreact (= 0.71.8)
|
||||
- React-jsc
|
||||
- React-jsi (= 0.71.8)
|
||||
- React-jsiexecutor (= 0.71.8)
|
||||
- React-perflogger (= 0.71.8)
|
||||
- Yoga
|
||||
- React-Core/RCTBlobHeaders (0.71.8):
|
||||
- glog
|
||||
- RCT-Folly (= 2021.07.22.00)
|
||||
- React-Core/Default
|
||||
- React-cxxreact (= 0.71.8)
|
||||
- React-jsc
|
||||
- React-jsi (= 0.71.8)
|
||||
- React-jsiexecutor (= 0.71.8)
|
||||
- React-perflogger (= 0.71.8)
|
||||
- Yoga
|
||||
- React-Core/RCTImageHeaders (0.71.8):
|
||||
- glog
|
||||
- RCT-Folly (= 2021.07.22.00)
|
||||
- React-Core/Default
|
||||
- React-cxxreact (= 0.71.8)
|
||||
- React-jsc
|
||||
- React-jsi (= 0.71.8)
|
||||
- React-jsiexecutor (= 0.71.8)
|
||||
- React-perflogger (= 0.71.8)
|
||||
- Yoga
|
||||
- React-Core/RCTLinkingHeaders (0.71.8):
|
||||
- glog
|
||||
- RCT-Folly (= 2021.07.22.00)
|
||||
- React-Core/Default
|
||||
- React-cxxreact (= 0.71.8)
|
||||
- React-jsc
|
||||
- React-jsi (= 0.71.8)
|
||||
- React-jsiexecutor (= 0.71.8)
|
||||
- React-perflogger (= 0.71.8)
|
||||
- Yoga
|
||||
- React-Core/RCTNetworkHeaders (0.71.8):
|
||||
- glog
|
||||
- RCT-Folly (= 2021.07.22.00)
|
||||
- React-Core/Default
|
||||
- React-cxxreact (= 0.71.8)
|
||||
- React-jsc
|
||||
- React-jsi (= 0.71.8)
|
||||
- React-jsiexecutor (= 0.71.8)
|
||||
- React-perflogger (= 0.71.8)
|
||||
- Yoga
|
||||
- React-Core/RCTSettingsHeaders (0.71.8):
|
||||
- glog
|
||||
- RCT-Folly (= 2021.07.22.00)
|
||||
- React-Core/Default
|
||||
- React-cxxreact (= 0.71.8)
|
||||
- React-jsc
|
||||
- React-jsi (= 0.71.8)
|
||||
- React-jsiexecutor (= 0.71.8)
|
||||
- React-perflogger (= 0.71.8)
|
||||
- Yoga
|
||||
- React-Core/RCTTextHeaders (0.71.8):
|
||||
- glog
|
||||
- RCT-Folly (= 2021.07.22.00)
|
||||
- React-Core/Default
|
||||
- React-cxxreact (= 0.71.8)
|
||||
- React-jsc
|
||||
- React-jsi (= 0.71.8)
|
||||
- React-jsiexecutor (= 0.71.8)
|
||||
- React-perflogger (= 0.71.8)
|
||||
- Yoga
|
||||
- React-Core/RCTVibrationHeaders (0.71.8):
|
||||
- glog
|
||||
- RCT-Folly (= 2021.07.22.00)
|
||||
- React-Core/Default
|
||||
- React-cxxreact (= 0.71.8)
|
||||
- React-jsc
|
||||
- React-jsi (= 0.71.8)
|
||||
- React-jsiexecutor (= 0.71.8)
|
||||
- React-perflogger (= 0.71.8)
|
||||
- Yoga
|
||||
- React-Core/RCTWebSocket (0.71.8):
|
||||
- glog
|
||||
- RCT-Folly (= 2021.07.22.00)
|
||||
- React-Core/Default (= 0.71.8)
|
||||
- React-cxxreact (= 0.71.8)
|
||||
- React-jsc
|
||||
- React-jsi (= 0.71.8)
|
||||
- React-jsiexecutor (= 0.71.8)
|
||||
- React-perflogger (= 0.71.8)
|
||||
- Yoga
|
||||
- React-CoreModules (0.71.8):
|
||||
- RCT-Folly (= 2021.07.22.00)
|
||||
- RCTTypeSafety (= 0.71.8)
|
||||
- React-Codegen (= 0.71.8)
|
||||
- React-Core/CoreModulesHeaders (= 0.71.8)
|
||||
- React-jsi (= 0.71.8)
|
||||
- React-RCTBlob
|
||||
- React-RCTImage (= 0.71.8)
|
||||
- ReactCommon/turbomodule/core (= 0.71.8)
|
||||
- React-cxxreact (0.71.8):
|
||||
- boost (= 1.76.0)
|
||||
- DoubleConversion
|
||||
- glog
|
||||
- RCT-Folly (= 2021.06.28.00-v2)
|
||||
- React-callinvoker (= 0.68.2)
|
||||
- React-Core (= 0.68.2)
|
||||
- React-cxxreact (= 0.68.2)
|
||||
- React-jsi (= 0.68.2)
|
||||
- React-logger (= 0.68.2)
|
||||
- React-perflogger (= 0.68.2)
|
||||
- ReactTestApp-DevSupport (1.3.9):
|
||||
- RCT-Folly (= 2021.07.22.00)
|
||||
- React-callinvoker (= 0.71.8)
|
||||
- React-jsi (= 0.71.8)
|
||||
- React-jsinspector (= 0.71.8)
|
||||
- React-logger (= 0.71.8)
|
||||
- React-perflogger (= 0.71.8)
|
||||
- React-runtimeexecutor (= 0.71.8)
|
||||
- React-jsc (0.71.8):
|
||||
- React-jsc/Fabric (= 0.71.8)
|
||||
- React-jsi (= 0.71.8)
|
||||
- React-jsc/Fabric (0.71.8):
|
||||
- React-jsi (= 0.71.8)
|
||||
- React-jsi (0.71.8):
|
||||
- boost (= 1.76.0)
|
||||
- DoubleConversion
|
||||
- glog
|
||||
- RCT-Folly (= 2021.07.22.00)
|
||||
- React-jsiexecutor (0.71.8):
|
||||
- DoubleConversion
|
||||
- glog
|
||||
- RCT-Folly (= 2021.07.22.00)
|
||||
- React-cxxreact (= 0.71.8)
|
||||
- React-jsi (= 0.71.8)
|
||||
- React-perflogger (= 0.71.8)
|
||||
- React-jsinspector (0.71.8)
|
||||
- React-logger (0.71.8):
|
||||
- glog
|
||||
- react-native-document-picker (8.2.0):
|
||||
- React-Core
|
||||
- React-perflogger (0.71.8)
|
||||
- React-RCTActionSheet (0.71.8):
|
||||
- React-Core/RCTActionSheetHeaders (= 0.71.8)
|
||||
- React-RCTAnimation (0.71.8):
|
||||
- RCT-Folly (= 2021.07.22.00)
|
||||
- RCTTypeSafety (= 0.71.8)
|
||||
- React-Codegen (= 0.71.8)
|
||||
- React-Core/RCTAnimationHeaders (= 0.71.8)
|
||||
- React-jsi (= 0.71.8)
|
||||
- ReactCommon/turbomodule/core (= 0.71.8)
|
||||
- React-RCTAppDelegate (0.71.8):
|
||||
- RCT-Folly
|
||||
- RCTRequired
|
||||
- RCTTypeSafety
|
||||
- React-Core
|
||||
- ReactCommon/turbomodule/core
|
||||
- React-RCTBlob (0.71.8):
|
||||
- RCT-Folly (= 2021.07.22.00)
|
||||
- React-Codegen (= 0.71.8)
|
||||
- React-Core/RCTBlobHeaders (= 0.71.8)
|
||||
- React-Core/RCTWebSocket (= 0.71.8)
|
||||
- React-jsi (= 0.71.8)
|
||||
- React-RCTNetwork (= 0.71.8)
|
||||
- ReactCommon/turbomodule/core (= 0.71.8)
|
||||
- React-RCTImage (0.71.8):
|
||||
- RCT-Folly (= 2021.07.22.00)
|
||||
- RCTTypeSafety (= 0.71.8)
|
||||
- React-Codegen (= 0.71.8)
|
||||
- React-Core/RCTImageHeaders (= 0.71.8)
|
||||
- React-jsi (= 0.71.8)
|
||||
- React-RCTNetwork (= 0.71.8)
|
||||
- ReactCommon/turbomodule/core (= 0.71.8)
|
||||
- React-RCTLinking (0.71.8):
|
||||
- React-Codegen (= 0.71.8)
|
||||
- React-Core/RCTLinkingHeaders (= 0.71.8)
|
||||
- React-jsi (= 0.71.8)
|
||||
- ReactCommon/turbomodule/core (= 0.71.8)
|
||||
- React-RCTNetwork (0.71.8):
|
||||
- RCT-Folly (= 2021.07.22.00)
|
||||
- RCTTypeSafety (= 0.71.8)
|
||||
- React-Codegen (= 0.71.8)
|
||||
- React-Core/RCTNetworkHeaders (= 0.71.8)
|
||||
- React-jsi (= 0.71.8)
|
||||
- ReactCommon/turbomodule/core (= 0.71.8)
|
||||
- React-RCTSettings (0.71.8):
|
||||
- RCT-Folly (= 2021.07.22.00)
|
||||
- RCTTypeSafety (= 0.71.8)
|
||||
- React-Codegen (= 0.71.8)
|
||||
- React-Core/RCTSettingsHeaders (= 0.71.8)
|
||||
- React-jsi (= 0.71.8)
|
||||
- ReactCommon/turbomodule/core (= 0.71.8)
|
||||
- React-RCTText (0.71.8):
|
||||
- React-Core/RCTTextHeaders (= 0.71.8)
|
||||
- React-RCTVibration (0.71.8):
|
||||
- RCT-Folly (= 2021.07.22.00)
|
||||
- React-Codegen (= 0.71.8)
|
||||
- React-Core/RCTVibrationHeaders (= 0.71.8)
|
||||
- React-jsi (= 0.71.8)
|
||||
- ReactCommon/turbomodule/core (= 0.71.8)
|
||||
- React-runtimeexecutor (0.71.8):
|
||||
- React-jsi (= 0.71.8)
|
||||
- ReactCommon/turbomodule/bridging (0.71.8):
|
||||
- DoubleConversion
|
||||
- glog
|
||||
- RCT-Folly (= 2021.07.22.00)
|
||||
- React-callinvoker (= 0.71.8)
|
||||
- React-Core (= 0.71.8)
|
||||
- React-cxxreact (= 0.71.8)
|
||||
- React-jsi (= 0.71.8)
|
||||
- React-logger (= 0.71.8)
|
||||
- React-perflogger (= 0.71.8)
|
||||
- ReactCommon/turbomodule/core (0.71.8):
|
||||
- DoubleConversion
|
||||
- glog
|
||||
- RCT-Folly (= 2021.07.22.00)
|
||||
- React-callinvoker (= 0.71.8)
|
||||
- React-Core (= 0.71.8)
|
||||
- React-cxxreact (= 0.71.8)
|
||||
- React-jsi (= 0.71.8)
|
||||
- React-logger (= 0.71.8)
|
||||
- React-perflogger (= 0.71.8)
|
||||
- ReactNativeHost (0.2.5):
|
||||
- React-Core
|
||||
- React-cxxreact
|
||||
- ReactTestApp-DevSupport (2.5.3):
|
||||
- React-Core
|
||||
- React-jsi
|
||||
- ReactTestApp-Resources (1.0.0-dev)
|
||||
- SocketRocket (0.6.0)
|
||||
- SwiftLint (0.47.1)
|
||||
- Yoga (1.14.0)
|
||||
- YogaKit (1.18.1):
|
||||
- Yoga (~> 1.14)
|
||||
@ -366,10 +399,10 @@ DEPENDENCIES:
|
||||
- FBReactNativeSpec (from `../../node_modules/react-native/React/FBReactNativeSpec`)
|
||||
- Flipper (= 0.125.0)
|
||||
- Flipper-Boost-iOSX (= 1.76.0.1.11)
|
||||
- Flipper-DoubleConversion (= 3.2.0)
|
||||
- Flipper-DoubleConversion (= 3.2.0.1)
|
||||
- Flipper-Fmt (= 7.1.7)
|
||||
- Flipper-Folly (= 2.6.10)
|
||||
- Flipper-Glog (= 0.5.0.4)
|
||||
- Flipper-Glog (= 0.5.0.5)
|
||||
- Flipper-PeerTalk (= 0.0.4)
|
||||
- Flipper-RSocket (= 1.4.3)
|
||||
- FlipperKit (= 0.125.0)
|
||||
@ -398,6 +431,7 @@ DEPENDENCIES:
|
||||
- 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-jsc (from `../../node_modules/react-native/ReactCommon/jsc`)
|
||||
- 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`)
|
||||
@ -406,6 +440,7 @@ DEPENDENCIES:
|
||||
- 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-RCTAppDelegate (from `../../node_modules/react-native/Libraries/AppDelegate`)
|
||||
- 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`)
|
||||
@ -415,9 +450,9 @@ DEPENDENCIES:
|
||||
- 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`)
|
||||
- "ReactNativeHost (from `../../node_modules/@rnx-kit/react-native-host`)"
|
||||
- ReactTestApp-DevSupport (from `../../node_modules/react-native-test-app`)
|
||||
- ReactTestApp-Resources (from `..`)
|
||||
- SwiftLint
|
||||
- Yoga (from `../../node_modules/react-native/ReactCommon/yoga`)
|
||||
|
||||
SPEC REPOS:
|
||||
@ -436,7 +471,6 @@ SPEC REPOS:
|
||||
- libevent
|
||||
- OpenSSL-Universal
|
||||
- SocketRocket
|
||||
- SwiftLint
|
||||
- YogaKit
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
@ -468,6 +502,8 @@ EXTERNAL SOURCES:
|
||||
:path: "../../node_modules/react-native/React/CoreModules"
|
||||
React-cxxreact:
|
||||
:path: "../../node_modules/react-native/ReactCommon/cxxreact"
|
||||
React-jsc:
|
||||
:path: "../../node_modules/react-native/ReactCommon/jsc"
|
||||
React-jsi:
|
||||
:path: "../../node_modules/react-native/ReactCommon/jsi"
|
||||
React-jsiexecutor:
|
||||
@ -484,6 +520,8 @@ EXTERNAL SOURCES:
|
||||
:path: "../../node_modules/react-native/Libraries/ActionSheetIOS"
|
||||
React-RCTAnimation:
|
||||
:path: "../../node_modules/react-native/Libraries/NativeAnimation"
|
||||
React-RCTAppDelegate:
|
||||
:path: "../../node_modules/react-native/Libraries/AppDelegate"
|
||||
React-RCTBlob:
|
||||
:path: "../../node_modules/react-native/Libraries/Blob"
|
||||
React-RCTImage:
|
||||
@ -502,6 +540,8 @@ EXTERNAL SOURCES:
|
||||
:path: "../../node_modules/react-native/ReactCommon/runtimeexecutor"
|
||||
ReactCommon:
|
||||
:path: "../../node_modules/react-native/ReactCommon"
|
||||
ReactNativeHost:
|
||||
:path: "../../node_modules/@rnx-kit/react-native-host"
|
||||
ReactTestApp-DevSupport:
|
||||
:path: "../../node_modules/react-native-test-app"
|
||||
ReactTestApp-Resources:
|
||||
@ -510,57 +550,59 @@ EXTERNAL SOURCES:
|
||||
:path: "../../node_modules/react-native/ReactCommon/yoga"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
boost: a7c83b31436843459a1961bfd74b96033dc77234
|
||||
boost: 57d2868c099736d80fcd648bf211b4431e51a558
|
||||
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
|
||||
DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662
|
||||
FBLazyVector: a7a655862f6b09625d11c772296b01cd5164b648
|
||||
FBReactNativeSpec: 88f95b9c87f17bcfdddff9e41263526740029f50
|
||||
DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
|
||||
FBLazyVector: f637f31eacba90d4fdeff3fa41608b8f361c173b
|
||||
FBReactNativeSpec: 6112d05dd89ba0bf3eb8c219a089c52f28dc399b
|
||||
Flipper: 26fc4b7382499f1281eb8cb921e5c3ad6de91fe0
|
||||
Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c
|
||||
Flipper-DoubleConversion: 3d3d04a078d4f3a1b6c6916587f159dc11f232c4
|
||||
Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30
|
||||
Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b
|
||||
Flipper-Folly: 584845625005ff068a6ebf41f857f468decd26b3
|
||||
Flipper-Glog: 87bc98ff48de90cb5b0b5114ed3da79d85ee2dd4
|
||||
Flipper-Glog: 70c50ce58ddaf67dc35180db05f191692570f446
|
||||
Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9
|
||||
Flipper-RSocket: d9d9ade67cbecf6ac10730304bf5607266dd2541
|
||||
FlipperKit: cbdee19bdd4e7f05472a66ce290f1b729ba3cb86
|
||||
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
|
||||
glog: 476ee3e89abb49e07f822b48323c51c57124b572
|
||||
glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
|
||||
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
|
||||
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
|
||||
RCT-Folly: 4d8508a426467c48885f1151029bc15fa5d7b3b8
|
||||
RCTRequired: 3e917ea5377751094f38145fdece525aa90545a0
|
||||
RCTTypeSafety: c43c072a4bd60feb49a9570b0517892b4305c45e
|
||||
React: 176dd882de001854ced260fad41bb68a31aa4bd0
|
||||
React-callinvoker: c2864d1818d6e64928d2faf774a3800dfc38fe1f
|
||||
React-Codegen: 98b6f97f0a7abf7d67e4ce435c77c05b7a95cf05
|
||||
React-Core: fdaa2916b1c893f39f02cff0476d1fb0cab1e352
|
||||
React-CoreModules: fd8705b80699ec36c2cdd635c2ce9d874b9cfdfc
|
||||
React-cxxreact: 1832d971f7b0cb2c7b943dc0ec962762c90c906e
|
||||
React-jsi: 72af715135abe8c3f0dcf3b2548b71d048b69a7e
|
||||
React-jsiexecutor: b7b553412f2ec768fe6c8f27cd6bafdb9d8719e6
|
||||
React-jsinspector: c5989c77cb89ae6a69561095a61cce56a44ae8e8
|
||||
React-logger: a0833912d93b36b791b7a521672d8ee89107aff1
|
||||
react-native-document-picker: 5663fe4bcdb646200683a41790464d2793307ac8
|
||||
React-perflogger: a18b4f0bd933b8b24ecf9f3c54f9bf65180f3fe6
|
||||
React-RCTActionSheet: 547fe42fdb4b6089598d79f8e1d855d7c23e2162
|
||||
React-RCTAnimation: bc9440a1c37b06ae9ebbb532d244f607805c6034
|
||||
React-RCTBlob: a1295c8e183756d7ef30ba6e8f8144dfe8a19215
|
||||
React-RCTImage: a30d1ee09b1334067fbb6f30789aae2d7ac150c9
|
||||
React-RCTLinking: ffc6d5b88d1cb9aca13c54c2ec6507fbf07f2ac4
|
||||
React-RCTNetwork: f807a2facab6cf5cf36d592e634611de9cf12d81
|
||||
React-RCTSettings: 861806819226ed8332e6a8f90df2951a34bb3e7f
|
||||
React-RCTText: f3fb464cc41a50fc7a1aba4deeb76a9ad8282cb9
|
||||
React-RCTVibration: 79040b92bfa9c3c2d2cb4f57e981164ec7ab9374
|
||||
React-runtimeexecutor: b960b687d2dfef0d3761fbb187e01812ebab8b23
|
||||
ReactCommon: 095366164a276d91ea704ce53cb03825c487a3f2
|
||||
ReactTestApp-DevSupport: fd0eb30fb60e42c4270d427fd9ccd8b6d20da381
|
||||
ReactTestApp-Resources: 74a1cf509f4e7962b16361ea4e73cba3648fff5d
|
||||
RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1
|
||||
RCTRequired: 8af6a32dfc2b65ec82193c2dee6e1011ff22ac2a
|
||||
RCTTypeSafety: bee9dd161c175896c680d47ef1d9eaacf2b587f4
|
||||
React: d850475db9ba8006a8b875d79e1e0d6ac8a0f8b6
|
||||
React-callinvoker: 6a0c75475ddc17c9ed54e4ff0478074a18fd7ab5
|
||||
React-Codegen: 26e2dc1e6c5f625dbd7c3d6be56c93c2da5a30b6
|
||||
React-Core: 1e838e49ad862ce54778654b0609983eaaad7cd6
|
||||
React-CoreModules: 958d236715415d4ccdd5fa35c516cf0356637393
|
||||
React-cxxreact: 92df23ee6120eecc2fdf5ce26c4e3a64ced3307e
|
||||
React-jsc: 8b399c43246460b7251ac479058ea9939692dd34
|
||||
React-jsi: 8aebc88463f27eeed55b5136919c7ce7a087c653
|
||||
React-jsiexecutor: 9101857bcffac8dae43d76a7bc0a39bda593c756
|
||||
React-jsinspector: c712f9e3bb9ba4122d6b82b4f906448b8a281580
|
||||
React-logger: 342f358b8decfbf8f272367f4eacf4b6154061be
|
||||
react-native-document-picker: 495c444c0c773c6e83a5d91165890ecb1c0a399a
|
||||
React-perflogger: d21f182895de9d1b077f8a3cd00011095c8c9100
|
||||
React-RCTActionSheet: 0151f83ef92d2a7139bba7dfdbc8066632a6d47b
|
||||
React-RCTAnimation: 5ec9c0705bb2297549c120fe6473aa3e4a01e215
|
||||
React-RCTAppDelegate: 6e5e88bfe52c56fa887130a7ed1663e929baadfc
|
||||
React-RCTBlob: 5d799e91fe570dbf618f2e4d80796fd66c088f42
|
||||
React-RCTImage: 3c12cb32dec49549ae62ed6cba4018db43841ffc
|
||||
React-RCTLinking: 310e930ee335ef25481b4a173d9edb64b77895f9
|
||||
React-RCTNetwork: b6837841fe88303b0c04c1e3c01992b30f1f5498
|
||||
React-RCTSettings: 600d91fe25fa7c16b0ff891304082440f2904b89
|
||||
React-RCTText: a0a19f749088280c6def5397ed6211b811e7eef3
|
||||
React-RCTVibration: 43ffd976a25f6057a7cf95ea3648ba4e00287f89
|
||||
React-runtimeexecutor: 7c51ae9d4b3e9608a2366e39ccaa606aa551b9ed
|
||||
ReactCommon: 739352444061f8625428e6ff0620c30362c3d9af
|
||||
ReactNativeHost: 5e4cc8c8ededf0639d095fe874e4bddcacdfe77f
|
||||
ReactTestApp-DevSupport: 8e3030aaf85e328faca59c09740bf6891ff5d160
|
||||
ReactTestApp-Resources: 1f512f66574607bcfa614e9c0d30e7a990fecf30
|
||||
SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608
|
||||
SwiftLint: f80f1be7fa96d30e0aa68e58d45d4ea1ccaac519
|
||||
Yoga: 99652481fcd320aefa4a7ef90095b95acd181952
|
||||
Yoga: 065f0b74dba4832d6e328238de46eb72c5de9556
|
||||
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
|
||||
|
||||
PODFILE CHECKSUM: dc071451ec1c2d558d10c7f4ede5643329535abb
|
||||
|
||||
COCOAPODS: 1.11.2
|
||||
COCOAPODS: 1.12.0
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#import <React/RCTConvert.h>
|
||||
@import UIKit;
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface RCTConvert(RNDocumentPicker)
|
||||
|
||||
|
||||
@ -1,7 +1,17 @@
|
||||
#ifdef RCT_NEW_ARCH_ENABLED
|
||||
#import <rndocumentpicker/rndocumentpicker.h>
|
||||
#else
|
||||
#import <React/RCTBridgeModule.h>
|
||||
#endif
|
||||
|
||||
@import UIKit;
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface RNDocumentPicker : NSObject <RCTBridgeModule>
|
||||
@interface RNDocumentPicker : NSObject <
|
||||
#ifdef RCT_NEW_ARCH_ENABLED
|
||||
NativeDocumentPickerSpec
|
||||
#else
|
||||
RCTBridgeModule
|
||||
#endif
|
||||
>
|
||||
|
||||
@end
|
||||
|
||||
@ -32,8 +32,6 @@ static NSString *const FIELD_SIZE = @"size";
|
||||
NSMutableArray *urlsInOpenMode;
|
||||
}
|
||||
|
||||
@synthesize bridge = _bridge;
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
@ -63,8 +61,8 @@ static NSString *const FIELD_SIZE = @"size";
|
||||
RCT_EXPORT_MODULE()
|
||||
|
||||
RCT_EXPORT_METHOD(pick:(NSDictionary *)options
|
||||
resolver:(RCTPromiseResolveBlock)resolve
|
||||
rejecter:(RCTPromiseRejectBlock)reject)
|
||||
resolve:(RCTPromiseResolveBlock)resolve
|
||||
reject:(RCTPromiseRejectBlock)reject)
|
||||
{
|
||||
mode = options[@"mode"] && [options[@"mode"] isEqualToString:@"open"] ? UIDocumentPickerModeOpen : UIDocumentPickerModeImport;
|
||||
copyDestination = options[@"copyTo"];
|
||||
@ -174,8 +172,8 @@ RCT_EXPORT_METHOD(pick:(NSDictionary *)options
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(releaseSecureAccess:(NSArray<NSString *> *)uris
|
||||
resolver:(RCTPromiseResolveBlock)resolve
|
||||
rejecter:(RCTPromiseRejectBlock)reject)
|
||||
resolve:(RCTPromiseResolveBlock)resolve
|
||||
reject:(RCTPromiseRejectBlock)reject)
|
||||
{
|
||||
NSMutableArray *discardedItems = [NSMutableArray array];
|
||||
for (NSString *uri in uris) {
|
||||
@ -191,6 +189,10 @@ RCT_EXPORT_METHOD(releaseSecureAccess:(NSArray<NSString *> *)uris
|
||||
resolve(nil);
|
||||
}
|
||||
|
||||
- (void)pickDirectory:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
|
||||
reject(@"RNDocumentPicker:pickDirectory", @"pickDirectory is not supported on iOS", nil);
|
||||
}
|
||||
|
||||
+ (NSURL *)copyToUniqueDestinationFrom:(NSURL *)url usingDestinationPreset:(NSString *)copyToDirectory error:(NSError *)error
|
||||
{
|
||||
NSURL *destinationRootDir = [self getDirectoryForFileCopy:copyToDirectory];
|
||||
@ -239,4 +241,13 @@ RCT_EXPORT_METHOD(releaseSecureAccess:(NSArray<NSString *> *)uris
|
||||
[promiseWrapper reject:@"user canceled the document picker" withCode:E_DOCUMENT_PICKER_CANCELED withError:error];
|
||||
}
|
||||
|
||||
// Thanks to this guard, we won't compile this code when we build for the old architecture.
|
||||
#ifdef RCT_NEW_ARCH_ENABLED
|
||||
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
|
||||
(const facebook::react::ObjCTurboModule::InitParams &)params
|
||||
{
|
||||
return std::make_shared<facebook::react::NativeDocumentPickerSpecJSI>(params);
|
||||
}
|
||||
#endif
|
||||
|
||||
@end
|
||||
43
package.json
43
package.json
@ -33,7 +33,15 @@
|
||||
"start": "react-native start",
|
||||
"windows": "react-native run-windows --sln example/windows/document-picker-example.sln",
|
||||
"android": "react-native run-android",
|
||||
"ios": "react-native run-ios --project-path example/ios"
|
||||
"ios": "react-native run-ios"
|
||||
},
|
||||
"codegenConfig": {
|
||||
"name": "rndocumentpicker",
|
||||
"type": "modules",
|
||||
"jsSrcsDir": "src",
|
||||
"android": {
|
||||
"javaPackageName": "com.reactnativedocumentpicker"
|
||||
}
|
||||
},
|
||||
"keywords": [
|
||||
"react-native",
|
||||
@ -56,27 +64,27 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/config-conventional": "^13.2.0",
|
||||
"@react-native-community/eslint-config": "^3.0.0",
|
||||
"@react-native-community/eslint-config": "^3.1.0",
|
||||
"@release-it/conventional-changelog": "^3.3.0",
|
||||
"@types/invariant": "^2.2.35",
|
||||
"@types/jest": "^27.0.2",
|
||||
"@types/react": "^17.0.19",
|
||||
"@types/react-native": "0.64.13",
|
||||
"@types/jest": "^29.5.1",
|
||||
"@types/react": "^18.0.18",
|
||||
"commitlint": "^13.2.0",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-config-prettier": "^8.3.0",
|
||||
"eslint-plugin-prettier": "^4.0.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-ft-flow": "^2.0.3",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"husky": "^4.2.5",
|
||||
"jest": "^27.2.4",
|
||||
"metro-react-native-babel-preset": "^0.71.1",
|
||||
"pod-install": "^0.1.28",
|
||||
"prettier": "^2.4.1",
|
||||
"react": "17.0.2",
|
||||
"react-native": "0.68.2",
|
||||
"react-native-builder-bob": "^0.18.0",
|
||||
"react-native-test-app": "^1.3.9",
|
||||
"jest": "^29.0.2",
|
||||
"metro-react-native-babel-preset": "0.73.9",
|
||||
"pod-install": "^0.1.38",
|
||||
"prettier": "^2.7.1",
|
||||
"react": "18.2.0",
|
||||
"react-native": "0.71.8",
|
||||
"react-native-builder-bob": "^0.20.4",
|
||||
"react-native-test-app": "^2.5.3",
|
||||
"release-it": "^14.11.6",
|
||||
"typescript": "^4.4.3"
|
||||
"typescript": "^4.8.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "*",
|
||||
@ -150,5 +158,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"invariant": "^2.2.4"
|
||||
},
|
||||
"resolutions": {
|
||||
"@types/react": "^18.2.6"
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,6 +2,8 @@ require "json"
|
||||
|
||||
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "react-native-document-picker"
|
||||
s.version = package["version"]
|
||||
@ -16,4 +18,20 @@ Pod::Spec.new do |s|
|
||||
s.source_files = "ios/**/*.{h,m,mm}"
|
||||
|
||||
s.dependency "React-Core"
|
||||
|
||||
# This guard prevent to install the dependencies when we run `pod install` in the old architecture.
|
||||
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
|
||||
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
|
||||
s.pod_target_xcconfig = {
|
||||
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
|
||||
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
|
||||
}
|
||||
|
||||
s.dependency "React-Codegen"
|
||||
s.dependency "RCT-Folly"
|
||||
s.dependency "RCTRequired"
|
||||
s.dependency "RCTTypeSafety"
|
||||
s.dependency "ReactCommon/turbomodule/core"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
const path = require('path')
|
||||
const { androidManifestPath, iosProjectPath } = require('react-native-test-app')
|
||||
const { androidManifestPath } = require('react-native-test-app')
|
||||
|
||||
const project = (() => {
|
||||
try {
|
||||
@ -9,7 +9,7 @@ const project = (() => {
|
||||
manifestPath: androidManifestPath(path.join(__dirname, 'example', 'android')),
|
||||
},
|
||||
ios: {
|
||||
project: iosProjectPath('example/ios'),
|
||||
sourceDir: path.join('example', 'ios'),
|
||||
},
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
27
src/NativeDocumentPicker.ts
Normal file
27
src/NativeDocumentPicker.ts
Normal file
@ -0,0 +1,27 @@
|
||||
import type { TurboModule } from 'react-native'
|
||||
import { TurboModuleRegistry } from 'react-native'
|
||||
|
||||
export type DocumentPickerResponse = {
|
||||
uri: string
|
||||
name: string
|
||||
copyError?: string
|
||||
fileCopyUri: string | null
|
||||
type: string | null
|
||||
size: number | null
|
||||
}
|
||||
|
||||
export type DirectoryPickerResponse = {
|
||||
uri: string
|
||||
}
|
||||
|
||||
export interface Spec extends TurboModule {
|
||||
readonly getConstants: () => {}
|
||||
|
||||
// we use "Object" to still have backwards compability with already
|
||||
// present methods on iOS, which use NSDictionary
|
||||
pick(options: Object): Promise<DocumentPickerResponse[]>
|
||||
releaseSecureAccess(uris: string[]): Promise<void>
|
||||
pickDirectory(): Promise<DirectoryPickerResponse>
|
||||
}
|
||||
|
||||
export const NativeDocumentPicker = TurboModuleRegistry.getEnforcing<Spec>('RNDocumentPicker')
|
||||
@ -1,7 +1,8 @@
|
||||
import { Platform, NativeModules, ModalPropsIOS } from 'react-native'
|
||||
import { Platform, ModalPropsIOS } from 'react-native'
|
||||
import invariant from 'invariant'
|
||||
import type { PlatformTypes, SupportedPlatforms } from './fileTypes'
|
||||
import { perPlatformTypes } from './fileTypes'
|
||||
import { NativeDocumentPicker } from './NativeDocumentPicker'
|
||||
|
||||
export type DocumentPickerResponse = {
|
||||
uri: string
|
||||
@ -18,14 +19,6 @@ export type DirectoryPickerResponse = {
|
||||
uri: string
|
||||
}
|
||||
|
||||
type DocumentPickerType = {
|
||||
pick(options: Record<string, any>): Promise<DocumentPickerResponse[]>
|
||||
releaseSecureAccess(uris: string[]): Promise<void>
|
||||
pickDirectory(): Promise<DirectoryPickerResponse>
|
||||
}
|
||||
|
||||
const RNDocumentPicker: DocumentPickerType = NativeModules.RNDocumentPicker
|
||||
|
||||
export type TransitionStyle = 'coverVertical' | 'flipHorizontal' | 'crossDissolve' | 'partialCurl'
|
||||
|
||||
export type DocumentPickerOptions<OS extends SupportedPlatforms> = {
|
||||
@ -51,7 +44,7 @@ export async function pickDirectory<OS extends SupportedPlatforms>(
|
||||
})
|
||||
return { uri: result[0].uri }
|
||||
} else {
|
||||
return RNDocumentPicker.pickDirectory()
|
||||
return NativeDocumentPicker.pickDirectory()
|
||||
}
|
||||
}
|
||||
|
||||
@ -139,7 +132,7 @@ function doPick<OS extends SupportedPlatforms>(
|
||||
throw new TypeError('Invalid copyTo option: ' + options.copyTo)
|
||||
}
|
||||
|
||||
return RNDocumentPicker.pick(options)
|
||||
return NativeDocumentPicker.pick(options)
|
||||
}
|
||||
|
||||
export function releaseSecureAccess(uris: Array<string>): Promise<void> {
|
||||
@ -152,7 +145,7 @@ export function releaseSecureAccess(uris: Array<string>): Promise<void> {
|
||||
`"uris" should be an array of strings, was ${uris}`,
|
||||
)
|
||||
|
||||
return RNDocumentPicker.releaseSecureAccess(uris)
|
||||
return NativeDocumentPicker.releaseSecureAccess(uris)
|
||||
}
|
||||
|
||||
const E_DOCUMENT_PICKER_CANCELED = 'DOCUMENT_PICKER_CANCELED'
|
||||
@ -169,7 +162,7 @@ export function isInProgress(err: unknown): boolean {
|
||||
}
|
||||
|
||||
function isErrorWithCode(err: unknown, errorCode: string): boolean {
|
||||
if (err instanceof Error && 'code' in err) {
|
||||
if (err && typeof err === 'object' && 'code' in err) {
|
||||
const nativeModuleErrorInstance = err as NativeModuleErrorShape
|
||||
return nativeModuleErrorInstance?.code === errorCode
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user