Welcome to the mobile app repository for Plug! An Internet Computer crypto wallet and authentication provider. Find our latest version of our mobile app in this repository's releases, or on our website. You can go to our documentation to learn more about how to interact with Plug as a developer.
This release is now compatible with iOS devices using iOS 15 or above and Android devices using Android 5 or above.
- Holding & sending ICP, XTC; WICP
- Adding, deleting and transfering custom tokens
- Holding & sending NFTs (any listed in DAB)
- Saving and using contacts in an address book
- Viewing transactions in the activity tab
- FaceID and TouchID integration
- ICNS support (.icp name resolving)
- Delete wallet
- Connecting to apps from the mobile extension
- Viewing your transactions in the CAP Explorer
The code is built using React-Native and running code locally requires a Mac.
-
Install sentry-cli tools:
brew install getsentry/tools/sentry-cli
-
Install Node.js version 14 (latest stable) and yarn@1 (latest)
- If you are using nvm (recommended) running
nvm use
will automatically choose the right node version for you.
- If you are using nvm (recommended) running
-
Install the shared React Native dependencies (
React Native CLI
, notExpo CLI
) -
Install cocoapods by running:
sudo gem install cocoapods
-
Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
And choose option 1 (proceed with installation (default))
-
Clone this repo:
git clone repo-url
-
Follow the installation steps on our controller package called plug-mobile-controller.
-
Install our dependencies:
For iOS:
cd plug-mobile
yarn patch:ios
cd ios && pod install && cd .. # install pods for iOS
For Android:
cd plug-mobile
yarn patch:android
- Choose the toolchain and install rust dependencies following the nexts steps:
For Intel users:
$ cargo install cargo-lipo
$ rustup default 1.55.0-x86_64-apple-darwin
For M1 users:
$ cargo install cargo-lipo
$ rustup default 1.55.0-aarch64-apple-darwin
And then run:
$ rustup target add aarch64-apple-ios x86_64-apple-ios
$ rustup target add aarch64-linux-android
$ rustup target add armv7-linux-androideabi
$ rustup target add i686-linux-android
-
Download NDK from Android Studio -> Download the version
22.1.7171670
. -
Set in
local.properties
the NDK path like this:ndk.dir=/Users/your-user-name/Library/Android/sdk/ndk-bundle
or like thisndk.dir=/Users/your-user-name/Library/Android/sdk/ndk/22.1.7171670
. -
Set
$ANDROID_NDK_HOME
in enviroment with you path:
export ANDROID_NDK_HOME="/Users/your-user-name/Library/Android/sdk/ndk/22.1.7171670"
- Run
sh ./create-ndk-standalone.sh
on project's root to create theconfig.toml
file. - You might need to install Python if you haven't
brew install pyenv
pyenv install 3.9.2
yarn patch:android && yarn android
yarn patch:ios && yarn ios
If you're experiencing any troubles with the setup guide you can share your issues in our Discord at #plug-mobile
-
Error-1:
env: node: No such file or directory Command PhaseScriptExecution failed with a nonzero exit code
-
Solution-1:
run
sudo ln -s "$(which node)" /usr/local/bin/node
then delete Plug-mobile folder from Delivered Data, clean build on Xcode and build again.