Go version
go version go1.22.3 darwin/arm64
Output of go env
in your module/workspace:
GO111MODULE=''
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/miho.sasaki/Library/Caches/go-build'
GOENV='/Users/miho.sasaki/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/miho.sasaki/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/miho.sasaki/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.22.3'
GCCGO='gccgo'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='my-working-directory/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/3w/wwx16f7s1sdbg17k_tnjzw9h0000gp/T/go-build512292993=/tmp/go-build -gno-record-gcc-switches -fno-common'
What did you do?
mobile go version is the latest
For iOS
Following this instruction - executed command
gomobile build -target=ios -bundleid=org.golang.gomobiletest \
-o=basic.app golang.org/x/mobile/example/basic
- drag&drop to the iOS simulator
iOS simulator version
- iPhone 13(iOS 17.5)
- iPhone 15(iOS 17.5)
- open the app then it closes without any log
I also tried with -iosversion=15
but it also didn't work.
For macOS
- env
macOS: Sonoma 14.3.1
- executed command
gomobile build -target=macos -bundleid=org.golang.gomobiletest \
-o=basic.app golang.org/x/mobile/example/basic
- open the app
- this error is shown
What did you see happen?
As the described above, - For the iOS app, the app closes without any error. - For the macOS app, the app shows the error that it cannot be opened.
What did you expect to see?
The app is opening without any issue.
Comment From: gabyhelp
Related Issues and Documentation
- x/mobile: Cannot bind gomobile with simple go package #30842 (closed)
- x/mobile/cmd/gomobile: gomobile build fails for iOS targets with Go 1.14 #36665 (closed)
- x/mobile/cmd/gomobile: gomobile bind fails with Xcode 15 #63141 (closed)
- x/mobile: gomobile build fails for iOS targets #32963 (closed)
- x/mobile/cmd/gomobile: iOS app built with gomobile-build freezes after switching apps #25133
- x/mobile/cmd/gomobile: iOS app built with gomobile-build fails to run on simulators #25148 (closed)
- x/mobile: bind example does not work under xcode 11 GM #34312
- x/mobile/cmd/gomobile: gomobile bind targetting iOS fails #24733 (closed)
- x/sys: gomobile build failed for x/crypto/ssh/terminal #22727 (closed)
- x/mobile: gomobile iOS bind error unknown GOARCH #24571 (closed)
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
Comment From: seankhliao
there's a dedicated target for the simulator
Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.
For questions please refer to https://github.com/golang/go/wiki/Questions