@@ -74,6 +74,10 @@ - (id) init {
7474 return self;
7575}
7676
77+ - (NSDictionary *)getConstants {
78+ return self.constantsToExport ;
79+ }
80+
7781- (NSDictionary *)constantsToExport
7882{
7983 return @{
@@ -86,6 +90,11 @@ - (NSDictionary *)constantsToExport
8690 @" MusicDir" : [ReactNativeBlobUtilFS getMusicDir ],
8791 @" PictureDir" : [ReactNativeBlobUtilFS getPictureDir ],
8892 @" ApplicationSupportDir" : [ReactNativeBlobUtilFS getApplicationSupportDir ],
93+ // Android only. For the new architecture, we have a single spec for both platforms.
94+ @" RingtoneDir" : @" " ,
95+ @" SDCardDir" : @" " ,
96+ @" SDCardApplicationDir" : @" " ,
97+ @" DCIMDir" : @" " ,
8998 };
9099}
91100
@@ -853,7 +862,7 @@ - (void)excludeFromBackupKey:(NSString *)url
853862 [ReactNativeBlobUtilFS df: callback];
854863}
855864
856- - (UIViewController *) documentInteractionControllerViewControllerForPreview : (UIDocumentInteractionController *) controller
865+ - (UIViewController *)documentInteractionControllerViewControllerForPreview : (UIDocumentInteractionController *) controller
857866{
858867 UIWindow *window = [UIApplication sharedApplication ].keyWindow ;
859868 return window.rootViewController ;
@@ -866,7 +875,88 @@ - (UIViewController *) documentInteractionControllerViewControllerForPreview: (U
866875 [ReactNativeBlobUtilNetwork emitExpiredTasks: eventDispatcherRef];
867876}
868877
878+ # pragma mark - Android Only methods
879+ // These methods are required because in the New Arch we have a single spec for both platforms
880+ - (void )actionViewIntent : (NSString *) path
881+ mime : (NSString *) mime
882+ chooserTitle : (NSString *) chooserTitle
883+ resolve : (RCTPromiseResolveBlock)resolve
884+ reject : (RCTPromiseRejectBlock)reject
885+ {
886+ reject (@" ENOT_SUPPORTED" , @" This method is not supported on iOS" , nil );
887+ }
888+
889+ - (void )addCompleteDownload : (NSDictionary *)config
890+ resolve : (RCTPromiseResolveBlock)resolve
891+ reject : (RCTPromiseRejectBlock)reject
892+ {
893+ reject (@" ENOT_SUPPORTED" , @" This method is not supported on iOS" , nil );
894+ }
895+
896+ - (void )copyToInternal : (NSString *)contentUri
897+ destpath : (NSString *) destpath
898+ resolve : (RCTPromiseResolveBlock)resolve
899+ reject : (RCTPromiseRejectBlock)reject
900+ {
901+ reject (@" ENOT_SUPPORTED" , @" This method is not supported on iOS" , nil );
902+ }
903+ - (void )copyToMediaStore : (NSDictionary *)filedata
904+ mt : (NSString *) mt
905+ path : (NSString *)
906+ resolve : (RCTPromiseResolveBlock)resolve
907+ reject : (RCTPromiseRejectBlock)reject
908+ {
909+ reject (@" ENOT_SUPPORTED" , @" This method is not supported on iOS" , nil );
910+ }
911+
912+ - (void )createMediaFile : (NSDictionary *)filedata
913+ mt : (NSString *) mt
914+ resolve : (RCTPromiseResolveBlock)resolve
915+ reject : (RCTPromiseRejectBlock)reject
916+ {
917+ reject (@" ENOT_SUPPORTED" , @" This method is not supported on iOS" , nil );
918+ }
919+
920+ - (void )getBlob : (NSString *)contentUri
921+ encoding : (NSString *)encoding
922+ resolve : (RCTPromiseResolveBlock)resolve
923+ reject : (RCTPromiseRejectBlock)reject
924+ {
925+ reject (@" ENOT_SUPPORTED" , @" This method is not supported on iOS" , nil );
926+ }
927+
928+ - (void )getContentIntent : (NSString *)mime
929+ resolve : (RCTPromiseResolveBlock)resolve
930+ reject : (RCTPromiseRejectBlock)reject
931+ {
932+ reject (@" ENOT_SUPPORTED" , @" This method is not supported on iOS" , nil );
933+ }
934+ - (void )getSDCardDir : (RCTPromiseResolveBlock)resolve
935+ reject : (RCTPromiseRejectBlock)reject
936+ {
937+ reject (@" ENOT_SUPPORTED" , @" This method is not supported on iOS" , nil );
938+ }
939+ - (void )getSDCardApplicationDir : (RCTPromiseResolveBlock)resolve
940+ reject : (RCTPromiseRejectBlock)reject
941+ {
942+ reject (@" ENOT_SUPPORTED" , @" This method is not supported on iOS" , nil );
943+ }
944+ - (void )scanFile : (NSArray *)pairs
945+ callback : (RCTResponseSenderBlock)callback
946+ {
947+ callback (@[@" Scan file method not supported in iOS" ]);
948+ }
949+ - (void )writeToMediaFile : (NSString *)fileUri
950+ path : (NSString *)path
951+ transformFile : (BOOL )transformFile
952+ resolve : (RCTPromiseResolveBlock)resolve
953+ reject : (RCTPromiseRejectBlock)reject
954+ {
955+ reject (@" ENOT_SUPPORTED" , @" This method is not supported on iOS" , nil );
956+ }
957+
869958
959+ # pragma mark - New Architecture
870960#if RCT_NEW_ARCH_ENABLED
871961- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule :
872962 (const facebook::react::ObjCTurboModule::InitParams &)params
0 commit comments