[mirror] Go on Mobile
Перейти к файлу
Burcu Dogan 8cf29b651f 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>
2015-09-28 16:36:07 +00:00
app testapp: Use methods of gl.Context rather than package-level OpenGL calls. 2015-09-27 12:25:12 +00:00
asset internal/mobileinit: standardize JNIEnv* access 2015-09-14 17:30:52 +00:00
bind bind/objc: remove a constructor and retain blocks 2015-09-15 17:38:26 +00:00
cmd cmd/gomobile: add modulemaps to framework bundles for simpler imports 2015-09-28 16:36:07 +00:00
doc README.md: add caution. shorten the README.md. 2015-07-17 17:06:14 +00:00
event gl: move to context methods 2015-09-23 23:46:16 +00:00
example sprite: Use gl.Context instead of package-level OpenGL calls. 2015-09-26 17:12:14 +00:00
exp gl: move to context methods 2015-09-23 23:46:16 +00:00
geom app: use one thread for both GL and other UI C code. 2015-06-26 07:43:17 +00:00
gl gl: fix a comment typo. 2015-09-24 01:48:26 +00:00
internal internal/mobileinit: standardize JNIEnv* access 2015-09-14 17:30:52 +00:00
misc/androidstudio misc/androidstudio: handle missing local.properties. 2015-09-11 20:14:45 +00:00
testdata example/sprite: make example lives 2014-12-22 13:10:48 +00:00
.gitattributes mobile: copying .gitattributes to all subrepositories 2014-12-23 23:23:25 +00:00
.gitignore .gitignore: remove *.xcodeproj 2015-09-03 14:46:33 +00:00
AUTHORS go.empty: prototype for new subrepository 2012-01-25 14:45:13 -05:00
CONTRIBUTING.md doc: add CONTRIBUTING.md 2015-02-18 23:42:31 +00:00
CONTRIBUTORS go.empty: prototype for new subrepository 2012-01-25 14:45:13 -05:00
LICENSE LICENSE: add 2012-03-17 15:20:58 +11:00
PATENTS go.empty: add PATENTS file to the subrepo. 2012-04-16 11:24:04 +10:00
README.md readme: link to Mobile wiki page 2015-08-15 00:05:54 +00:00
codereview.cfg mobile: add codereview.cfg 2015-03-18 17:03:44 +00:00

README.md

Go support for Mobile devices

The Go mobile repository holds packages and build tools for using Go on mobile platforms.

Package documentation as a starting point:

Caution image

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.