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

Commit

Permalink
Change ios.openDocument implementation #158
Browse files Browse the repository at this point in the history
  • Loading branch information
wkh237 committed Oct 15, 2016
1 parent 21fd76c commit cc31795
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ios/RNFetchBlob/RNFetchBlob.m
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ - (id) init {
- (NSDictionary *)constantsToExport
{
return @{
@"MainBundleDir" : [RNFetchBlobFS getMainBundleDir],
@"DocumentDir": [RNFetchBlobFS getDocumentDir],
@"CacheDir" : [RNFetchBlobFS getCacheDir]
};
Expand Down Expand Up @@ -445,7 +446,7 @@ - (NSDictionary *)constantsToExport
UIViewController *rootCtrl = [[[[UIApplication sharedApplication] delegate] window] rootViewController];
documentController.delegate = self;
if(scheme == nil || [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:scheme]]) {
[documentController presentOpenInMenuFromRect:rootCtrl.view.bounds inView:rootCtrl.view animated:YES];
[documentController presentOptionsMenuFromRect:rootCtrl.view.bounds inView:rootCtrl.view animated:YES];
resolve(@[[NSNull null]]);
} else {
reject(@"RNFetchBlob could not open document", @"scheme is not supported", nil);
Expand Down

0 comments on commit cc31795

Please sign in to comment.