Skip to content

Commit

Permalink
Add a few import required for the React Native wrapper distribution a…
Browse files Browse the repository at this point in the history
…s iOS XCFramework (#50009)

* 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.

* Import `React` in `GutenbergBridgeDelegate.swift`

This allows the compiler to find the `RCTLogLevel` type used in the
file.

* Import `React` in `RNReactNativeGutenbergBridge.swift`

This allows the compiler to find the `RCTEventEmitter` type which is
used in the file.

* Remove unnecessary `import Foundation` in `SourceFile.swift`
  • Loading branch information
mokagio authored May 4, 2023
1 parent fd505e5 commit 1db3fd7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React

public struct MediaInfo: Encodable {
public let id: Int32?
public let url: String?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React

struct GutenbergEvent {
let name: String
let body: Any?
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-bridge/ios/SourceFile.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Foundation
import WebKit

public struct SourceFile {
enum SourceFileError: Error {
Expand Down

0 comments on commit 1db3fd7

Please sign in to comment.