Procházet zdrojové kódy

Change ios.openDocument implementation #158

Ben Hsieh před 7 roky
rodič
revize
cc31795d11
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2
    1
      src/ios/RNFetchBlob/RNFetchBlob.m

+ 2
- 1
src/ios/RNFetchBlob/RNFetchBlob.m Zobrazit soubor

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