Im a newbie in mobile LND. I wanted to generate the mobile framework and the swift files. I followed the tutorial but got an error.
Your environment
v0.16.0-beta
I get this error:
Generating mobile protos from ../lnrpc/autopilotrpc/autopilot.proto, with build tag autopilotrpc
Generating mobile protos from ../lnrpc/chainrpc/chainkit.proto, with build tag chainrpc
Generating mobile protos from ../lnrpc/chainrpc/chainnotifier.proto, with build tag chainrpc
Generating mobile protos from ../lnrpc/devrpc/dev.proto, with build tag devrpc
Generating mobile protos from ../lnrpc/invoicesrpc/invoices.proto, with build tag invoicesrpc
Generating mobile protos from ../lnrpc/lnclipb/lncli.proto, with build tag lnclipb
Generating mobile protos from ../lnrpc/neutrinorpc/neutrino.proto, with build tag neutrinorpc
Generating mobile protos from ../lnrpc/peersrpc/peers.proto, with build tag peersrpc
Generating mobile protos from ../lnrpc/routerrpc/router.proto, with build tag routerrpc
Generating mobile protos from ../lnrpc/signrpc/signer.proto, with build tag signrpc
Generating mobile protos from ../lnrpc/verrpc/verrpc.proto, with build tag verrpc
Generating mobile protos from ../lnrpc/walletrpc/walletkit.proto, with build tag walletrpc
Generating mobile protos from ../lnrpc/watchtowerrpc/watchtower.proto, with build tag watchtowerrpc
Generating mobile protos from ../lnrpc/wtclientrpc/wtclient.proto, with build tag wtclientrpc
/build
Building iOS cxframework (/Users/florian/go/src/github.com/lightningnetwork/lnd/mobile/build/ios/Lndmobile.xcframework).
mkdir -p /Users/florian/go/src/github.com/lightningnetwork/lnd/mobile/build/ios
GO111MODULE=off /Users/florian/go/bin/gomobile bind -target=ios,iossimulator -tags="mobile dev autopilotrpc chainrpc invoicesrpc neutrinorpc peersrpc routerrpc signrpc verrpc walletrpc watchtowerrpc wtclientrpc" -s -w -buildid= -X github.com/lightningnetwork/lnd/build.Commit=v0.16.0-beta-dirty -v -o /Users/florian/go/src/github.com/lightningnetwork/lnd/mobile/build/ios/Lndmobile.xcframework github.com/lightningnetwork/lnd/mobile
flag provided but not defined: -s
usage: /Users/florian/go/bin/gomobile bind [-target android|ios|iossimulator|macos|maccatalyst] [-bootclasspath <path>] [-classpath <path>] [-o output] [build flags] [package]
Bind generates language bindings for the package named by the import
path, and compiles a library for the named target system.
The -target flag takes either android (the default), or one or more
comma-delimited Apple platforms (ios, iossimulator, macos, maccatalyst).
For -target android, the bind command produces an AAR (Android ARchive)
file that archives the precompiled Java API stub classes, the compiled
shared libraries, and all asset files in the /assets subdirectory under
the package directory. The output is named '<package_name>.aar' by
default. This AAR file is commonly used for binary distribution of an
Android library project and most Android IDEs support AAR import. For
example, in Android Studio (1.2+), an AAR file can be imported using
the module import wizard (File > New > New Module > Import .JAR or
.AAR package), and setting it as a new dependency
(File > Project Structure > Dependencies). This requires 'javac'
(version 1.8+) and Android SDK (API level 16 or newer) to build the
library for Android. The ANDROID_HOME and ANDROID_NDK_HOME environment
variables can be used to specify the Android SDK and NDK if they are
not in the default locations. Use the -javapkg flag to specify the Java
package prefix for the generated classes.
By default, -target=android builds shared libraries for all supported
instruction sets (arm, arm64, 386, amd64). A subset of instruction sets
can be selected by specifying target type with the architecture name. E.g.,
-target=android/arm,android/386.
For Apple -target platforms, gomobile must be run on an OS X machine with
Xcode installed. The generated Objective-C types can be prefixed with the
-prefix flag.
For -target android, the -bootclasspath and -classpath flags are used to
control the bootstrap classpath and the classpath for Go wrappers to Java
classes.
The -v flag provides verbose output, including the list of packages built.
The build flags -a, -n, -x, -gcflags, -ldflags, -tags, -trimpath, and -work
are shared with the build command. For documentation, see 'go help build'.
make: *** [ios] Error 1
Seems like the code uses the -s flag which is not defined.
Background
Im a newbie in mobile LND. I wanted to generate the mobile framework and the swift files. I followed the tutorial but got an error.
Your environment
I get this error:
Seems like the code uses the -s flag which is not defined.