This document contains the installation, bootstrapping, build and uninstall steps used during development.

Prerequisites

  • Go 1.24+
  • Android SDK and Android NDK installed (Android Studio recommended)
  • xtool.sh (For cross-platform iOS builds)
  • git, curl

NB: For less mess, do not alter the default location for Android SDK.

Installation

You can use Go to install Sweet Juice CLI tool, juice.

  • Using Go:
go install github.com/sweet-juice/sweetjuice/cmd/juice@latest

Create a new project

juice --new my-new-app

This scaffolds a fresh project from the local AppTemplate included in the Sweet Juice module.

Sweet Juice app structure

  • .plugins/ โ€” Go-side implementations of native plugins
  • native/android/ โ€” Android Studio project using the generated AAR
  • native/ios/ โ€” iOS project using the generated XFramework
  • lib/views/ โ€” Go view definitions using native widgets

Run App

Run on a connected device: To run on device, ensure Android ADB is configured for Android, or iTunes or libimobiledevice is configured for iOS.

# For Android (via ADB)
juice --run android

# For iOS (via xtool)
juice --run ios

Build release binaries:

# Android
juice --build android debug
juice --build android release
juice --build android bundle

# iOS
juice --build ios debug
juice --build ios release

To Uninstall Sweet Juice CLI:

rm $(go env GOPATH)/bin/juice     

Notes & troubleshooting

  • Ensure ANDROID_HOME or equivalent environment variables are set or Android Studio is installed in default locations.
  • For iOS, ensures xtool and Xcode Command Line Tools are installed.
  • If bindings seem stale, run juice --refresh <platform> to force a rebuild.