@@ -74,6 +74,10 @@ - (id) init {
74
74
return self;
75
75
}
76
76
77
+ - (NSDictionary *)getConstants {
78
+ return self.constantsToExport ;
79
+ }
80
+
77
81
- (NSDictionary *)constantsToExport
78
82
{
79
83
return @{
@@ -86,6 +90,11 @@ - (NSDictionary *)constantsToExport
86
90
@" MusicDir" : [ReactNativeBlobUtilFS getMusicDir ],
87
91
@" PictureDir" : [ReactNativeBlobUtilFS getPictureDir ],
88
92
@" 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" : @" " ,
89
98
};
90
99
}
91
100
@@ -853,7 +862,7 @@ - (void)excludeFromBackupKey:(NSString *)url
853
862
[ReactNativeBlobUtilFS df: callback];
854
863
}
855
864
856
- - (UIViewController *) documentInteractionControllerViewControllerForPreview : (UIDocumentInteractionController *) controller
865
+ - (UIViewController *)documentInteractionControllerViewControllerForPreview : (UIDocumentInteractionController *) controller
857
866
{
858
867
UIWindow *window = [UIApplication sharedApplication ].keyWindow ;
859
868
return window.rootViewController ;
@@ -866,7 +875,88 @@ - (UIViewController *) documentInteractionControllerViewControllerForPreview: (U
866
875
[ReactNativeBlobUtilNetwork emitExpiredTasks: eventDispatcherRef];
867
876
}
868
877
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
+
869
958
959
+ # pragma mark - New Architecture
870
960
#if RCT_NEW_ARCH_ENABLED
871
961
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule :
872
962
(const facebook::react::ObjCTurboModule::InitParams &)params
0 commit comments