Satimoto mobile application using react native
Required for iOS
- Xcode
- cocoapods 1.7.2 (
brew install cocoapods
)
Required for Android
- Java OpenJDK 11
- Android Studio
- Android NDK
Before running the app, the mobile binaries need to be built for LND so GRPC calls can be made during runtime.
Switch go module aware build mode to auto
go env -w GO111MODULE=auto
Install protobuf
brew install protobuf
Go get gomobile prerequisites
go get golang.org/x/tools/go/packages
go get golang.org/x/tools/cmd/goimports
go get golang.org/x/mobile/cmd/gomobile
Initialize gomobile
gomobile init
Go get protoc modules and falafel
GO111MODULE=on go get github.com/golang/protobuf/[email protected]
GO111MODULE=on go get github.com/grpc-ecosystem/grpc-gateway/[email protected]
GO111MODULE=on go get github.com/grpc-ecosystem/grpc-gateway/[email protected]
GO111MODULE=on go get -u -v github.com/lightninglabs/falafel
Go get LND
go get -d github.com/lightningnetwork/lnd
cd $GOPATH/src/github.com/lightningnetwork/lnd
Change lnd remote
git remote add satimoto https://github.com/satimoto/lnd
git fetch satimoto
Checkout branch to build (Reset staged/unstaged changes if you need to)
git reset --hard HEAD
git checkout -b allocate-alias satimoto/allocate-alias
Build for iOS platform (Lndmobile.xcframework
)
make ios prefix="1" tags="chainrpc invoicesrpc routerrpc signrpc walletrpc"
cp -r $GOPATH/src/github.com/lightningnetwork/lnd/mobile/build/ios/Lndmobile.xcframework <path/to>/react-mobile/ios/LndMobile
Build for android platform (Lndmobile.aar
)
make android prefix="1" tags="chainrpc invoicesrpc routerrpc signrpc walletrpc"
cp $GOPATH/src/github.com/lightningnetwork/lnd/mobile/build/android/Lndmobile.aar <path/to>/react-mobile/android/Lndmobile
docker build . --build-arg git_url=https://github.com/satimoto/lnd --build-arg checkout=allocate-alias -t satimoto/lnd:allocate-alias