We are hiring, join us! 👨💻👩💻
- Related: ledger-live-desktop
- Backed by: ledger-live-common
Ledger Live is a mobile companion app for Ledger hardware wallets. It allows users to manage their crypto assets securely, such as Bitcoin, Ethereum, XRP and many others. Ledger Live mobile is available for iOS and Android.
Ledger Live mobile is a native mobile application built using React Native, React, Redux, RxJS. It is compatible with iOS and Android. It communicates with Ledger hardware wallet devices via Bluetooth (when compatible) or USB to manage installed applications, update the device firmware, verify public addresses and sign transactions with ledgerjs.
We also share core business logic with Ledger Live mobile through @ledgerhq/live-common library package.
- Node LTS version
- Pnpm
- React Native (without Expo)
- XCode
- Ruby 3.3.0 or above. The macOS built-in Ruby does not work properly for installing dependencies of the iOS app, you have to install Ruby with for instance Homebrew or rvm and make sure that
which ruby
points to that newly installed Ruby.
- Android Studio
- JDK 17
- Required SDK tools: (go to Android Studio > Tools > SDK Manager > SDK Tools > check "Show Package Details" at the bottom right)
- Android NDK 21.4.7075529 (in case this doc is outdated, check the version specified as
ndkVersion
inandroid/build.gradle
) - CMake 3.10.2
- Android NDK 21.4.7075529 (in case this doc is outdated, check the version specified as
Reminder: all commands should be run at the root of the monorepository
install dependencies.
Runs your app in development mode.
Sometimes you may need to reset or clear the React Native packager's cache. To do so, you can pass the --reset-cache
flag to the start script:
pnpm dev:llm -- --reset-cache
or open ios/ledgerlivemobile.xcworkspace
in XCode
Note:
You need to have metro running with pnpm dev:llm
then pnpm mobile ios
in another terminal
or open android/
in Android Studio.
Note:
You need to have metro running with pnpm dev:llm
then pnpm mobile android
in another terminal
Delete the application data for Ledger Live Mobile, equivalent to doing it manually through settings.
Produces a development .ipa signed with the developer's current certificates (can be installed on phones added to our apple dev center). Not eligible for AppStore/TestFlight
Produces a development .apk that can be installed on Android phones. Not eligible for Google PlayStore
Optional environment variables you can put in .env
, .env.production
or .env.staging
for debug, release, or staging release builds respectively.
A more exhaustive list of documented environment variables can be found here.
DEVICE_PROXY_URL=http://localhost:8435
Use the ledger device over HTTP. Useful for debugging on an emulator. More info about this in the section Connection via HTTP bridge.BRIDGESTREAM_DATA=...
Come from console.log of the desktop app during the qrcode export. allow to bypass the bridgestream scanning.DEBUG_RNDEBUGGER=1
Enable react native debugger.DISABLE_READ_ONLY=1
Disable readonly mode by default.SKIP_ONBOARDING=1
Skips the onboarding flow.
Add any desired path mapping in tsconfig.json
: (for instance "@utils/*": ["./src/utils/*"]
)
Then, import @utils/constants
in your project files and it will automatically resolve to ./src/utils/constants.{js/jsx/ts/tsx}
.
Please respect the following structure: "@{package}/*": ["{any/path}/*"]
// tsconfig.json
{
{ ... }
"paths": {
"@utils/*": ["./src/utils/*"],
"@constants/*": ["./src/constants/*"],
}
}
pnpm mobile sync-locales
Flipper has been integrated in the project, so you can use it to get debugging information (like network monitoring) and find other useful data you could previously get from scattered places, here neatly presented in a single interface (like logs and crash reports for both platforms).
React Native integration seems pretty bleeding edge right now, so don't expect everything to work just yet.
- Install Flipper on your computer
- Launch it 🚀
- Run Ledger Live Mobile in debug as usual (set
DEBUG_RNDEBUGGER=1
in your.env
) - No need to enable remote debug!
List of Flipper's plugins that will help you to debug efficiently the application:
- Hermes Debugger (RN)
- Logs
- React DevTools
- Redux Debugger
Refer to the e2e specific wiki.
Run the app from the Apple or Google own IDE to get some native debugging features like breakpoints etc.
It is possible to run Ledger Live Mobile on an emulator and connect to a Nano that is plugged in via USB.
- Install the ledger-live cli.
- Plug in your Nano to your computer.
- Run
ledger-live proxy
orpnpm run:cli proxy
. A server starts and displays variable environments that can be used to build Ledger-Live Mobile. For example:DEVICE_PROXY_URL=ws://localhost:8435 DEVICE_PROXY_URL=ws://192.168.1.14:8435 Nano S proxy started on 192.168.1.14
- Either
- First, do
export DEVICE_PROXY_URL=the_adress_given_by_the_server
or paste this variable environment in the.env
file at the root of the project (create it if it doesn't exist) - Then, build & run Ledger Live Mobile
pnpm mobile ios
orpnpm mobile android
- OR
- First, build & run Ledger Live Mobile
pnpm mobile ios
orpnpm mobile android
- Then, go to the settings tab, then debug > connectivity > http transport and paste the IP (ex: 192.168.1.14)
- First, do
- When prompted to choose a Nano device in Ledger Live Mobile, you will see your Nano available with the adress from above, just select it and it should work normally.
This part of the repository is where you will add the support of your blockchain for the mobile app.
For a smooth and quick integration:
- See the developers’ documentation on the Developer Portal and
- Go on Discord to chat with developer support and the developer community.