Skip to content

wordpress-mobile/GutenbergKit

Repository files navigation

GutenbergKit

A proof of concept Gutenberg editor for native iOS and Android apps built using web technologies.

Screenshot 2024-07-01 at 10 30 11 AM

Development

Before starting, you'll need the Node.js dependencies to be installed locally, which you can install by running make build.

React App

The React app is embedded in the native GutenbergKit module.

To launch the app in the browser, run:

make dev-server

GutenbergKit

Swift and Kotlin packages with native wrappers for the Gutenberg editor.

Demo

A host app that can be used to test the changes made to the editor quickly.

By default, the demo app uses a production build of the React app included in the GutenbergKit package. During development, make sure to run the React app and pass the localhost URL as an environment variable of the demo app.

Xcode environment variables

If you are using SwiftUI previews, make sure to point them to the localhost programatically:

#Preview {
    NavigationStack {
//        EditorView()
        EditorView(editorURL: URL(string: "http://localhost:5173/")!)
    }
}

Production

To build the React app for production and incorporate the changes in the GutenbergKit Swift and Kotlin packages, run:

make build

Once it's done, the Swift and Kotlin packages are ready to publish.