소스 검색

Change ios.openDocument implementation #158

Ben Hsieh 7 년 전
부모
커밋
cc31795d11
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2
    1
      src/ios/RNFetchBlob/RNFetchBlob.m

+ 2
- 1
src/ios/RNFetchBlob/RNFetchBlob.m 파일 보기

@@ -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);