File tree 1 file changed +6
-0
lines changed
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ @interface FilePickerPlugin()
24
24
@property (nonatomic ) BOOL allowCompression;
25
25
@property (nonatomic ) dispatch_group_t group;
26
26
@property (nonatomic ) BOOL isSaveFile;
27
+ @property (nonatomic ) NSURL *pickedDirectory;
27
28
@end
28
29
29
30
@implementation FilePickerPlugin
@@ -403,6 +404,11 @@ - (void)documentPicker:(UIDocumentPickerViewController *)controller
403
404
NSMutableArray <NSURL *> *newUrls;
404
405
if (controller.documentPickerMode == UIDocumentPickerModeOpen) {
405
406
newUrls = urls;
407
+ if (self.pickedDirectory != nil ) {
408
+ [self .pickedDirectory stopAccessingSecurityScopedResource ];
409
+ }
410
+ self.pickedDirectory = urls[0 ];
411
+ [self .pickedDirectory startAccessingSecurityScopedResource ];
406
412
}
407
413
if (controller.documentPickerMode == UIDocumentPickerModeImport) {
408
414
newUrls = [NSMutableArray new ];
You can’t perform that action at this time.
0 commit comments