Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

Commit cc31795

Browse files
committed
Change ios.openDocument implementation #158
1 parent 21fd76c commit cc31795

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ios/RNFetchBlob/RNFetchBlob.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ - (id) init {
6868
- (NSDictionary *)constantsToExport
6969
{
7070
return @{
71+
@"MainBundleDir" : [RNFetchBlobFS getMainBundleDir],
7172
@"DocumentDir": [RNFetchBlobFS getDocumentDir],
7273
@"CacheDir" : [RNFetchBlobFS getCacheDir]
7374
};
@@ -445,7 +446,7 @@ - (NSDictionary *)constantsToExport
445446
UIViewController *rootCtrl = [[[[UIApplication sharedApplication] delegate] window] rootViewController];
446447
documentController.delegate = self;
447448
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];
449450
resolve(@[[NSNull null]]);
450451
} else {
451452
reject(@"RNFetchBlob could not open document", @"scheme is not supported", nil);

0 commit comments

Comments
 (0)