Skip to content
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: apps built with go 1.12, gomobile and Xcode 10.2 are using non-public APIs #31628

Open
halseth opened this issue Apr 23, 2019 · 7 comments

Comments

Projects
None yet
5 participants
@halseth
Copy link

commented Apr 23, 2019

What version of Go are you using (go version)?

$ go version
go version go1.12.4 darwin/amd64

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/johan/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/johan/golang"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.12.4/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.12.4/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/johan/golang/src/github.com/lightningnetwork/lnd/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/kq/3436m_v11sg0l7zqtmv2r1gw0000gn/T/go-build608163721=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

After having been unable to build the lnd framework on Xcode 10.2 because of a previous issue (see #31284), I was able to build it using the latest gomobile (3e0bab5) and Xcode v10.2.1 (10E1001) after this fix was merged: #31284 (comment)

The iOS app (https://github.com/lightninglabs/lightning-app) using the framework was then built, and submitted to App Store connect.

What did you expect to see?

App builds, and app store distribution encounter no problems.

What did you see instead?

App Store submission fails with the following error:

We identified one or more issues with a recent delivery for your app, "Lightning: Fast Bitcoin Wallet". Please correct the following issues, then upload again.

Non-public API usage:

The app references non-public symbols in lightning: _ptrace

If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed.

Additional info

Building and app store submission previously encountered no problems, when using Xcode 10.1 together with gomobile@ca80213619811c2fbed3ff8345accbd4ba924d45

@katiehockman katiehockman changed the title [gomobile] apps built with gomobile and Xcode 10.2 are using non-public APIs x/mobile: apps built with gomobile and Xcode 10.2 are using non-public APIs Apr 29, 2019

@gopherbot gopherbot added this to the Unreleased milestone Apr 29, 2019

@gopherbot gopherbot added the mobile label Apr 29, 2019

@katiehockman

This comment has been minimized.

Copy link
Contributor

commented Apr 29, 2019

/cc @hyangah

@tanx

This comment has been minimized.

Copy link

commented May 2, 2019

Any update on this? We're currently blocked to release an update to Testflight due to this issue. I'm going to try to downgrade to xcode 10.1 to work around the issue for now (see: https://stackoverflow.com/questions/14756026/how-to-downgrade-xcode-to-previous-version). Thanks

@halseth

This comment has been minimized.

Copy link
Author

commented May 2, 2019

More research seems to indicate it is actually go 1.12 that introduces this failure, my hunch is changes related to: #17490

@halseth halseth changed the title x/mobile: apps built with gomobile and Xcode 10.2 are using non-public APIs x/mobile: apps built with go 1.12, gomobile and Xcode 10.2 are using non-public APIs May 2, 2019

@halseth

This comment has been minimized.

Copy link
Author

commented May 2, 2019

Possibly related:

@randall77

This comment has been minimized.

Copy link
Contributor

commented May 2, 2019

Do you know of documentation about when ptrace is allowed?
I suspect it is ok on OSX but not on iOS. (The manpage on my 10.12 OSX box doesn't mention anything about disallowed/deprecated/...)

It's pretty easy to rip out ptrace support, and we can do that because it is package syscall. The stdlib itself doesn't use ptrace. That said, I'd rather not break people's programs unnecessarily.

@tanx

This comment has been minimized.

Copy link

commented May 2, 2019

I can confirm releasing to Testflight worked again with go@1.11.6, gomobile@ 3e0bab5405d63a8f5dd9d9764a24c8e5ac4997fa, xcode@10.2.1.

@halseth

This comment has been minimized.

Copy link
Author

commented May 19, 2019

@randall77 Tried to find any documentation on this, but to no luck.

Maybe best bet is to disable it, then check if that's enough for the app to pass App Store review? I think people's programs are broken already, if they want it on the App Store that is...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.