-
Notifications
You must be signed in to change notification settings - Fork 18k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/mobile: reverse and swift #19830
Comments
As far as I know there is no Swift support, nor anybody working on it. /cc @eliasnaur |
I ask because swift is similar to golang and much more modern compared to objective-c. This makes it much easier to use. https://github.com/golang/mobile/blob/master/internal/importers/objc/objc.go |
Is there a specific problem you're trying to solve that you can't today? Go Mobile only generates ObjC bindings, but I know several projects that have used those with Swift with relative ease (Apple specifically designed Swift to be easy to interface with legacy Obj-C code). Moreover, the way to interface swift with C (and thus, Cgo) is with Obj-C bridges anyway; as far as I know, Swift doesn't interface with C directly. |
The issue is doing golang to native flow. I can call from native to golang using the gomobile bind technqiue. That allows me to run a web view for example with a localhost webserver responding. |
Sure. Apple has more information about objective-c bridging at their
developer site.
Den tir. 4. apr. 2017 16.02 skrev gedw99 <notifications@github.com>:
… The issue is doing golang to native flow.
I can call from native to golang using the gomobile bind technqiue. That
allows me to run a web view for example with a localhost webserver
responding.
In the same project i need to call from golang to native using the reverse
techniques. For example fire a notification to the user. I can do this with
objective c. i am guessing that its possible to mix swift and objective c ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#19830 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAgCDCfgNoTzyy1YUpyplud0VqxDvg-Fks5rsk2FgaJpZM4MyAuy>
.
|
Hi @gedw99, did you come up with any solution for this? |
no. i swifted to using flutter for mobile and desktops. |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?1.8
What operating system and processor architecture are you using (
go env
)?x-MacBook-Pro:gosync apple$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/apple/workspace/go"
GORACE=""
GOROOT="/usr/local/opt/go/libexec"
GOTOOLDIR="/usr/local/opt/go/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/wp/ff6sz9qs6g71jnm12nj2kbyw0000gp/T/go-build775985182=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
What did you do?
More a question. Gomobile reverse works well for Android, but i was wondering how to do it for swift.
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: