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: crash in gobind with interface with ios 8.4 and xcode 7.0.1 #13578
Comments
I tried 3 ios8.4 iphone,only one iphone crash. |
I have the exact same error when using gobind on an iPhone 5 and iPhone 5C, both on iOS 8 and iOS 9. So it's probably tied to building on armv7. |
I also have this (or a very similar-looking) problem, iPhone 5 and iOS 9. Here is a screenshot of my error log: I noticed that the error in the original post by @bronze1man may be due to the
My code, however, has only two functions, and I made sure they do not conflict with any other names. gobind-generated objective C file looks like this:
|
@bronze1man I'd love to know how you figured out which part of the code to comment out to make it work! |
This has been plaguing me for hours now, and I finally figured out that if I revert back to go1.5.3, it works without problems. Switch to 1.6.0, and it crashes with the error log I posted above. So it must be something that changed between these two versions? |
workaroundThe real workaround is to use cgo with objective-c and golang and put your .h file into generated framework .h file ,and do not use gomobile rpc stuff.(only leave a empty Hello function in the gomobile rpc). This workaround can use any objective-c ios api in cgo, |
Environment:
I have following code to bind into ios project.
golang:
oc:
It build success,but
It crash when the app is open in ios 8.4.
It will not crash for ios 9.1 and xcode 7.0.1, but it will crash for ios 8.4 and xcode 7.0.1
I found a way to prevent it from crash:
comment the file at src/golang.org/x/mobile/bind/genobjc.go:275
The text was updated successfully, but these errors were encountered: