commit | 8cf29b651f2278a1a5701d75f831a3cd1b164622 | [log] [tgz] |
---|---|---|
author | Burcu Dogan <jbd@google.com> | Sun Sep 27 13:34:13 2015 -0700 |
committer | Burcu Dogan <jbd@google.com> | Mon Sep 28 16:36:07 2015 +0000 |
tree | 84711e0750734dfbcc31e3fde3002b83fb202fe3 | |
parent | c846a131a8ee8a0e070abf11bd5e08b7269ad371 [diff] |
cmd/gomobile: add modulemaps to framework bundles for simpler imports Modulemaps allow users to use the import directives without providing the specific header file but by using a module name in Objective-C and Swift. gomobile bind -target=ios golang.org/x/mobile/example/bind/hello Add the generated framework to an Xcode project. You will be able to import the library header and use the library by importing hello in Swift. import hello // ... hello.GoHelloGreetings("burcu"); In Objective-C, you will be able to import with the module name similarly by using the import directive below. #import hello This CL also enables Go bindings to be used from Swift without an Objective-C bridging header. Fixes golang/go#12422 Change-Id: I7c60349caad100861d0b642ddfa873d7ada47598 Reviewed-on: https://go-review.googlesource.com/15044 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
The Go mobile repository holds packages and build tools for using Go on mobile platforms.
Package documentation as a starting point:
The Go Mobile project is experimental. Use this at your own risk. While we are working hard to improve it, neither Google nor the Go team can provide end-user support.
This is early work and installing the build system requires Go 1.5. Follow the instructions on golang.org/wiki/Mobile to install the gomobile command, build the basic and the bind example apps.
Contributions to Go are appreciated. See https://golang.org/doc/contribute.html.