Gio includes very basic support for integrating with existing mobile and browser projects.


To build a Gio program as an .aar package, use the -buildmode=archive flag. For example,

$ go run -target android -buildmode archive

produces gophers.aar, ready to include in an Android project.

To display the Gio Android Activity, declare it in your AndroidManifest.xml:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="">
	<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="28" />
	<uses-feature android:glEsVersion="0x00030000"/>
	<application android:label="Gio">
		<activity android:name="org.gioui.GioActivity"

and launch it from another Activity with

startActivity(new Intent(this, GioActivity.class));


The gogio tool can also produce a framework ready to include in an iOS or tvOS Xcode project. The command

$ go run -target ios -buildmode archive

outputs Gophers.framework with the demo program built for iOS.

To run the Gio program, use the GioAppDelegate class from your program:

@import UIKit;
@import Gio;

int main(int argc, char * argv[]) {
	@autoreleasepool {
		return UIApplicationMain(argc, argv, nil, NSStringFromClass([GioAppDelegate class]));


If the embedding HTML page for the Gio program contains a <div id="giowindow"> element, Gio will run in that instead of creating its own container.