2
0
mirror of synced 2025-02-22 14:28:14 +00:00
Hyang-Ah (Hana) Kim 926122382b bind/objc: Interface binding support
Given a Go package defining an interface,

  package testpkg
  type I interface {
      Fn()
  }

I is mapped to an objective-c protocol and a proxy interface
that implements the routing of method calls from Go.

  @protocol GoTestpkgI
  -(void)Fn;
  @end

Users implement a class conforming the generated protocol. For example,

  @interface MyI <GoTestpkgI> {
  }
  @end

  @implementation MyI {
  }
  - (void)Fn { .... }
  @end

Gobind will also create a proxy interface to handle Go objects
implementing the interface and passed to Objective-C, but that will
be hidden from users.

  @interface GoTestpkgI : NSObject <GoTestpkgI> {
  ...
  -(void)Fn;
  @end

The gobind code to generate the objective-c binding is in a separate CL.

Change-Id: I6a72d34fe3a5b8d2774d2d53913229c1e71f2d60
Reviewed-on: https://go-review.googlesource.com/12389
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
2015-07-31 20:12:03 +00:00
2015-07-31 20:12:03 +00:00
2015-07-31 14:47:41 +00:00
2015-07-29 20:28:35 +00:00
2015-07-28 18:02:47 +00:00
2015-03-18 17:03:44 +00:00
2015-02-18 23:42:31 +00:00
2012-03-17 15:20:58 +11:00

Go support for Mobile devices

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

Package documentation serves 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 build instructions on godoc.org/golang.org/x/mobile/cmd/gomobile to install the gomobile command and build the basic example.

--

Contributions to Go are appreciated. See https://golang.org/doc/contribute.html.

Languages
Go 86.9%
Objective-C 4.7%
Java 4.6%
C 3.4%
HTML 0.3%
Other 0.1%