With Go 1.5, Go will support mobile platforms (Android and iOS) and will provide tools to build mobile applications.
There are two strategies you can follow to include Go into your mobile stack:
This article will contain step-by-step guides to explain how to achieve these strategies.
Go Mobile introduces a new tool, gomobile, to help you with the build and the binding process. Go get gomobile and initialize it to install the required toolchain.
On Mac OSX, you will need to have Xcode Command Line Tools installed.
$ go get golang.org/x/mobile/cmd/gomobile $ gomobile init # it might take a few minutes
(The following sections will help you how to use the gomobile tool.)
Native category includes applications entirely written in Go. Currently, the mobile standard library contains only a handful of packages.
TODO
In this category, we will show you how you can use a Go package in your existing Android or iOS application.
The advantages to follow this strategy:
The disadvantages include the following:
TODO