diff --git a/packages/react-native-bridge/ios/GutenbergBridgeDelegate.swift b/packages/react-native-bridge/ios/GutenbergBridgeDelegate.swift index 92a5e0e7c695fc..e82c9e8f9de664 100644 --- a/packages/react-native-bridge/ios/GutenbergBridgeDelegate.swift +++ b/packages/react-native-bridge/ios/GutenbergBridgeDelegate.swift @@ -239,13 +239,13 @@ public protocol GutenbergBridgeDelegate: class { /// func gutenbergDidRequestMediaSaveSync() - func gutenbergDidRequestMediaFilesEditorLoad(_ mediaFiles: [String], blockId: String) + func gutenbergDidRequestMediaFilesEditorLoad(_ mediaFiles: [[String: Any]], blockId: String) - func gutenbergDidRequestMediaFilesFailedRetryDialog(_ mediaFiles: [String]) + func gutenbergDidRequestMediaFilesFailedRetryDialog(_ mediaFiles: [[String: Any]]) - func gutenbergDidRequestMediaFilesUploadCancelDialog(_ mediaFiles: [String]) + func gutenbergDidRequestMediaFilesUploadCancelDialog(_ mediaFiles: [[String: Any]]) - func gutenbergDidRequestMediaFilesSaveCancelDialog(_ mediaFiles: [String]) + func gutenbergDidRequestMediaFilesSaveCancelDialog(_ mediaFiles: [[String: Any]]) } // MARK: - Optional GutenbergBridgeDelegate methods @@ -259,9 +259,9 @@ public extension GutenbergBridgeDelegate { // Media Collection func gutenbergDidRequestMediaSaveSync() {} - func gutenbergDidRequestMediaFilesEditorLoad(_ mediaFiles: [String], blockId: String) { } - func gutenbergDidRequestMediaFilesFailedRetryDialog(_ mediaFiles: [String]) { } - func gutenbergDidRequestMediaFilesUploadCancelDialog(_ mediaFiles: [String]) { } - func gutenbergDidRequestMediaFilesSaveCancelDialog(_ mediaFiles: [String]) { } + func gutenbergDidRequestMediaFilesEditorLoad(_ mediaFiles: [[String: Any]], blockId: String) { } + func gutenbergDidRequestMediaFilesFailedRetryDialog(_ mediaFiles: [[String: Any]]) { } + func gutenbergDidRequestMediaFilesUploadCancelDialog(_ mediaFiles: [[String: Any]]) { } + func gutenbergDidRequestMediaFilesSaveCancelDialog(_ mediaFiles: [[String: Any]]) { } func gutenbergDidRequestMediaFilesBlockReplaceSync(_ mediaFiles: [[String: Any]], clientId: String) {} } diff --git a/packages/react-native-bridge/ios/RNReactNativeGutenbergBridge.m b/packages/react-native-bridge/ios/RNReactNativeGutenbergBridge.m index d8771fc103730c..8201ff3aa5603d 100644 --- a/packages/react-native-bridge/ios/RNReactNativeGutenbergBridge.m +++ b/packages/react-native-bridge/ios/RNReactNativeGutenbergBridge.m @@ -22,11 +22,11 @@ @interface RCT_EXTERN_MODULE(RNReactNativeGutenbergBridge, NSObject) RCT_EXTERN_METHOD(requestUnsupportedBlockFallback:(NSString *)content blockId:(NSString *)blockId blockName:(NSString *)blockName blockTitle:(NSString *)blockTitle) RCT_EXTERN_METHOD(showUserSuggestions:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)rejecter) RCT_EXTERN_METHOD(showXpostSuggestions:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)rejecter) -RCT_EXTERN_METHOD(requestMediaFilesEditorLoad:(NSArray *)mediaFiles blockId:(NSString *)blockId) -RCT_EXTERN_METHOD(requestMediaFilesFailedRetryDialog:(NSArray *)mediaFiles) -RCT_EXTERN_METHOD(requestMediaFilesUploadCancelDialog:(NSArray *)mediaFiles) -RCT_EXTERN_METHOD(requestMediaFilesSaveCancelDialog:(NSArray *)mediaFiles) -RCT_EXTERN_METHOD(onCancelUploadForMediaCollection:(NSArray *)mediaFiles) +RCT_EXTERN_METHOD(requestMediaFilesEditorLoad:(NSArray *)mediaFiles blockId:(NSString *)blockId) +RCT_EXTERN_METHOD(requestMediaFilesFailedRetryDialog:(NSArray *)mediaFiles) +RCT_EXTERN_METHOD(requestMediaFilesUploadCancelDialog:(NSArray *)mediaFiles) +RCT_EXTERN_METHOD(requestMediaFilesSaveCancelDialog:(NSArray *)mediaFiles) +RCT_EXTERN_METHOD(onCancelUploadForMediaCollection:(NSArray *)mediaFiles) RCT_EXTERN_METHOD(actionButtonPressed:(NSString *)buttonType) RCT_EXTERN_METHOD(mediaSaveSync) RCT_EXTERN_METHOD(mediaFilesBlockReplaceSync:(NSArray *)mediaFiles clientId:(NSString *)clientId) diff --git a/packages/react-native-bridge/ios/RNReactNativeGutenbergBridge.swift b/packages/react-native-bridge/ios/RNReactNativeGutenbergBridge.swift index 0187f32539de76..ab86c3c22b92ed 100644 --- a/packages/react-native-bridge/ios/RNReactNativeGutenbergBridge.swift +++ b/packages/react-native-bridge/ios/RNReactNativeGutenbergBridge.swift @@ -291,28 +291,28 @@ public class RNReactNativeGutenbergBridge: RCTEventEmitter { } @objc - func requestMediaFilesEditorLoad(_ mediaFiles: [String], blockId: String) { + func requestMediaFilesEditorLoad(_ mediaFiles: [[String: Any]], blockId: String) { DispatchQueue.main.async { self.delegate?.gutenbergDidRequestMediaFilesEditorLoad(mediaFiles, blockId: blockId) } } @objc - func requestMediaFilesFailedRetryDialog(_ mediaFiles: [String]) { + func requestMediaFilesFailedRetryDialog(_ mediaFiles: [[String: Any]]) { DispatchQueue.main.async { self.delegate?.gutenbergDidRequestMediaFilesFailedRetryDialog(mediaFiles) } } @objc - func requestMediaFilesUploadCancelDialog(_ mediaFiles: [String]) { + func requestMediaFilesUploadCancelDialog(_ mediaFiles: [[String: Any]]) { DispatchQueue.main.async { self.delegate?.gutenbergDidRequestMediaFilesUploadCancelDialog(mediaFiles) } } @objc - func requestMediaFilesSaveCancelDialog(_ mediaFiles: [String]) { + func requestMediaFilesSaveCancelDialog(_ mediaFiles: [[String: Any]]) { DispatchQueue.main.async { self.delegate?.gutenbergDidRequestMediaFilesSaveCancelDialog(mediaFiles) }