瀏覽代碼

Change ios.openDocument implementation #158

Ben Hsieh 8 年之前
父節點
當前提交
cc31795d11
共有 1 個檔案被更改,包括 2 行新增1 行删除
  1. 2
    1
      src/ios/RNFetchBlob/RNFetchBlob.m

+ 2
- 1
src/ios/RNFetchBlob/RNFetchBlob.m 查看文件

68
 - (NSDictionary *)constantsToExport
68
 - (NSDictionary *)constantsToExport
69
 {
69
 {
70
     return @{
70
     return @{
71
+             @"MainBundleDir" : [RNFetchBlobFS getMainBundleDir],
71
              @"DocumentDir": [RNFetchBlobFS getDocumentDir],
72
              @"DocumentDir": [RNFetchBlobFS getDocumentDir],
72
              @"CacheDir" : [RNFetchBlobFS getCacheDir]
73
              @"CacheDir" : [RNFetchBlobFS getCacheDir]
73
              };
74
              };
445
     UIViewController *rootCtrl = [[[[UIApplication sharedApplication] delegate] window] rootViewController];
446
     UIViewController *rootCtrl = [[[[UIApplication sharedApplication] delegate] window] rootViewController];
446
     documentController.delegate = self;
447
     documentController.delegate = self;
447
     if(scheme == nil || [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:scheme]]) {
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
         resolve(@[[NSNull null]]);
450
         resolve(@[[NSNull null]]);
450
     } else {
451
     } else {
451
         reject(@"RNFetchBlob could not open document", @"scheme is not supported", nil);
452
         reject(@"RNFetchBlob could not open document", @"scheme is not supported", nil);