Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/react-native-bridge/ios/Gutenberg.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ public class Gutenberg: NSObject {
settingsUpdates
}

initialProps["crashLoggingOptions"] = dataSource.gutenbergCrashLoggingOptions()

return initialProps
}

Expand Down Expand Up @@ -240,8 +242,10 @@ extension Gutenberg: RCTBridgeDelegate {
}

public func extraModules(for bridge: RCTBridge!) -> [RCTBridgeModule]! {
// Aztec
let aztecManager = RCTAztecViewManager()
aztecManager.attachmentDelegate = dataSource.aztecAttachmentDelegate()

let baseModules:[RCTBridgeModule] = [bridgeModule, aztecManager]
return baseModules + extraModules
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ public protocol GutenbergBridgeDataSource: class {
/// Asks the data source for a list of theme colors.
func gutenbergEditorSettings() -> GutenbergEditorSettings?

/// Asks the data source for the crash logging options to initialize the SDK in the React native side.
///
/// - Returns: Crash logging SDK options.
func gutenbergCrashLoggingOptions() -> [String: Any]?

/// Asks the data source for a view to show while the Editor is loading.
var loadingView: UIView? { get }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,10 @@ extension GutenbergViewController: GutenbergBridgeDataSource {
func gutenbergMediaSources() -> [Gutenberg.MediaSource] {
return [.filesApp, .otherApps]
}

func gutenbergCrashLoggingOptions() -> [String: Any]? {
return nil
}
}

extension Gutenberg.MediaSource {
Expand Down