File tree Expand file tree Collapse file tree
packages/document-picker/android/src/main/java/com/reactnativedocumentpicker Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131 - name : Install dependencies
3232 run : yarn install --immutable
3333 - name : Install pods
34- run : RCT_NEW_ARCH_ENABLED=0 npx pod-install
34+ run : RCT_NEW_ARCH_ENABLED=0 RCT_USE_PREBUILT_RNCORE=1 RCT_USE_RN_DEP=1 npx pod-install
3535 working-directory : example/ios
3636 - name : Build ios example app on old architecture
3737 run : xcodebuild -scheme ReactTestApp -workspace document-picker-example.xcworkspace ONLY_ACTIVE_ARCH=NO -sdk iphonesimulator -configuration Debug
Original file line number Diff line number Diff line change @@ -83,12 +83,8 @@ class RNDocumentPickerModule(reactContext: ReactApplicationContext) :
8383
8484 @ReactMethod
8585 override fun pick (opts : ReadableMap , promise : Promise ) {
86- val currentActivity = currentActivity
86+ val currentActivity = reactApplicationContext. currentActivity ? : return rejectWithNullActivity(promise)
8787
88- if (currentActivity == null ) {
89- rejectWithNullActivity(promise)
90- return
91- }
9288 if (! promiseWrapper.trySetPromiseRejectingIncoming(promise, " pick" )) {
9389 return
9490 }
@@ -145,11 +141,8 @@ class RNDocumentPickerModule(reactContext: ReactApplicationContext) :
145141
146142 @ReactMethod
147143 override fun pickDirectory (opts : ReadableMap , promise : Promise ) {
148- val currentActivity = currentActivity
149- if (currentActivity == null ) {
150- rejectWithNullActivity(promise)
151- return
152- }
144+ val currentActivity = reactApplicationContext.currentActivity ? : return rejectWithNullActivity(promise)
145+
153146 if (! promiseWrapper.trySetPromiseRejectingIncoming(promise, " pickDirectory" )) {
154147 return
155148 }
You can’t perform that action at this time.
0 commit comments