|
@@ -68,6 +68,7 @@ RCT_EXPORT_MODULE();
|
68
|
68
|
- (NSDictionary *)constantsToExport
|
69
|
69
|
{
|
70
|
70
|
return @{
|
|
71
|
+ @"MainBundleDir" : [RNFetchBlobFS getMainBundleDir],
|
71
|
72
|
@"DocumentDir": [RNFetchBlobFS getDocumentDir],
|
72
|
73
|
@"CacheDir" : [RNFetchBlobFS getCacheDir]
|
73
|
74
|
};
|
|
@@ -445,7 +446,7 @@ RCT_EXPORT_METHOD(openDocument:(NSString*)uri scheme:(NSString *)scheme resolver
|
445
|
446
|
UIViewController *rootCtrl = [[[[UIApplication sharedApplication] delegate] window] rootViewController];
|
446
|
447
|
documentController.delegate = self;
|
447
|
448
|
if(scheme == nil || [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:scheme]]) {
|
448
|
|
- [documentController presentOpenInMenuFromRect:rootCtrl.view.bounds inView:rootCtrl.view animated:YES];
|
|
449
|
+ [documentController presentOptionsMenuFromRect:rootCtrl.view.bounds inView:rootCtrl.view animated:YES];
|
449
|
450
|
resolve(@[[NSNull null]]);
|
450
|
451
|
} else {
|
451
|
452
|
reject(@"RNFetchBlob could not open document", @"scheme is not supported", nil);
|