-
Notifications
You must be signed in to change notification settings - Fork 18.1k
x/mobile: iOS framework, app crashes on launch for 1.18 #51784
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
Comments
Which iOS version are you using (Go 1.18 requires iOS12 or later)? Could you provide a minimum reproducible example? |
I currently set on iOS 14.0 for the minimum version. The device I'm testing it on runs on iOS 15.1. |
I suspect that iOS 15 might have issues with code signing. Is the problem reproducible on iOS 14? |
I currently don't have a device that runs iOS 14. |
If that's the case, then a reproducible example would be very helpful. |
JFYI: I am not able to reproduce this crash using the examples mentioned in #47952. |
I tried to create a minimal example. In doing so I realized that I was using an older version of the gomobile binary. $ gomobile bind -target=ios -o Frameworks/helper.framework In the latest version, it should have thrown the error: gomobile: static framework name "Frameworks/helper.framework" missing .xcframework suffix Furthermore, I noticed that the go.mod file has the maximum go version, but simply editing it to the new version didn't work. module example.com/helper go 1.17 ... So I reinitialize the the go module: $ go mod init example.com/helper so that it reflects the current version: module example.com/helper go 1.18 ... In the end, I wasn't able to create a minimal example that can reproduce the error,
Thank you for your support. |
Thanks for posting a solution. Based on the discussion, I think this issue does not require any action to take at the moment, and the issue might already have had a relevant Go 1.18 fix landed therefore upgrading to the latest gomobile can solve the issue. If anyone encountered a similar issue, we could refer to your suggested solution. Hence, close. |
I experience a similar error using cross-compiled golang for iOS (not via x/mobile), and the issue was due to GOOS=ios was introduced in a413908 For catalyst, x/mobile still uses GOOS=darwin https://github.com/golang/mobile/blob/fea317f4e1ac8a39cd725d852b60936f25f2b23d/cmd/gomobile/env.go#L63-L65 |
@tmm1 Have you tried to use the latest gomobile? |
im still seeing this on go 1.19 when trying to build and install the basic example to the simulator following the steps here: My env
Repro steps
logs:
|
I tried @kstanmartin's solution from here. I checked out the basic example and reinitialised it with go1.19. This didnt fix it. I also tried downgrading the simulator to ios 14.0.1 but now I cant even install the bundle on the simulator. I just get error: Not sure if its relevant but im on a M1 mac. |
This solved the problem for me |
Thank you. This helped me a lot. |
This also made my day! Thanks so much for pointing it out |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?What did you do?
What did you expect to see?
App running happily.
What did you see instead?
App tried to launch, white background becomes visible, but closes abruptly.
Here's the console log:
iOS example app runs fine up to version 1.17.8
After upgrading to 1.18, building the framework, app launch failed.
Reverting to 1.17.8, and rebuilding the framework, app launch succeeds.
I saw a similar error log posted here: #47952
The text was updated successfully, but these errors were encountered: