From d00d2bb1c2d3892fb9fa6473cba1a11fdbb9f761 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Tue, 11 Apr 2023 12:17:30 +1000 Subject: [PATCH 1/4] Import WebKit in `SourceFile.swift` to address build failure Without this, when using the experimental static linking which should hopefully enable us to wrap Gutenberg mobile in an XCFramework to import in iOS projects, we'd get a build failure with `WKUserScript` not found. --- packages/react-native-bridge/ios/SourceFile.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-native-bridge/ios/SourceFile.swift b/packages/react-native-bridge/ios/SourceFile.swift index b32a65c0b0f2c2..65c688d80af7b7 100644 --- a/packages/react-native-bridge/ios/SourceFile.swift +++ b/packages/react-native-bridge/ios/SourceFile.swift @@ -1,4 +1,5 @@ import Foundation +import WebKit public struct SourceFile { enum SourceFileError: Error { From 4fdf3ecb6f550080d85d984d83b6281528685984 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Tue, 11 Apr 2023 12:20:32 +1000 Subject: [PATCH 2/4] Import `React` in `GutenbergBridgeDelegate.swift` This allows the compiler to find the `RCTLogLevel` type used in the file. --- packages/react-native-bridge/ios/GutenbergBridgeDelegate.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/react-native-bridge/ios/GutenbergBridgeDelegate.swift b/packages/react-native-bridge/ios/GutenbergBridgeDelegate.swift index 25cc3af320b24d..4b13e4e6a15a9e 100644 --- a/packages/react-native-bridge/ios/GutenbergBridgeDelegate.swift +++ b/packages/react-native-bridge/ios/GutenbergBridgeDelegate.swift @@ -1,3 +1,5 @@ +import React + public struct MediaInfo: Encodable { public let id: Int32? public let url: String? From 167953014bfdf7a45be58ce066affc5d19af596f Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Tue, 11 Apr 2023 12:21:37 +1000 Subject: [PATCH 3/4] Import `React` in `RNReactNativeGutenbergBridge.swift` This allows the compiler to find the `RCTEventEmitter` type which is used in the file. --- .../react-native-bridge/ios/RNReactNativeGutenbergBridge.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/react-native-bridge/ios/RNReactNativeGutenbergBridge.swift b/packages/react-native-bridge/ios/RNReactNativeGutenbergBridge.swift index 9b5908a8b7bc7b..bfc3507732138d 100644 --- a/packages/react-native-bridge/ios/RNReactNativeGutenbergBridge.swift +++ b/packages/react-native-bridge/ios/RNReactNativeGutenbergBridge.swift @@ -1,3 +1,5 @@ +import React + struct GutenbergEvent { let name: String let body: Any? From 3cf63cb9afb63694864bba9aecb3278c461bcb67 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Mon, 24 Apr 2023 20:14:40 +1000 Subject: [PATCH 4/4] Remove unnecessary `import Foundation` in `SourceFile.swift` --- packages/react-native-bridge/ios/SourceFile.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/react-native-bridge/ios/SourceFile.swift b/packages/react-native-bridge/ios/SourceFile.swift index 65c688d80af7b7..a6deceed3549f1 100644 --- a/packages/react-native-bridge/ios/SourceFile.swift +++ b/packages/react-native-bridge/ios/SourceFile.swift @@ -1,4 +1,3 @@ -import Foundation import WebKit public struct SourceFile {