On Friday, January 13, 2017 at 2:26:11 PM UTC+1, nik.ku...@gmail.com wrote:
> Hello, everyone! As I know gomobile now supports reverse binding for ObjC 
> (thanks @elisnaur). I'd like to know - is it working only for system 
> modules or I can use it to call my own ObjC code from go as well?

There's nothing special about the system modules as far as gomobile knows. 
However, the reverse generator only looks for ObjC frameworks in the SDK. 
For -target android, there's a -classpath flag to point the generators at 
your own Java code. Something similar should be added to -target ios.

If you'd like to take a stab at it, look for "importModule" in 
golang.org/x/mobile/internal/importers/objc/objc.go where the framework 
lookup is done. You can draw inspiration from how 
internal/importers/java/java.go handles -classpath. For a first attempt, 
I'd add my own framework to the system SDK path and see if it works. If so, 
it's just a matter of plumbing through the flag.

If you'd rather not touch gomobile, please create an issue (feel free to CC 
me) and describe your use case as thorough as possible, with simple ObjC 
code you'd like to reverse bind.

 - elias

You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to