This mobile version of SubWallet Extension that is gateway help you access to Dotsama ecosytem.
Mobile version run an app runner run in hidden webview and use message passing to interact with it. There are 2 reasons why we do this:
- React native is not support WASM, we can't get full features of
@polkadot/packages
so we need to run most crypto features on webview. - Using the same resources saves us not only development time, but also makes extension and mobile versioning more consistent
-
Install yarn
-
Setup react native development environment use React Native CLI.
-
[CMake] is required on the build host for web runner.
-
When building for Android, [CMake] should be installed as a part of your Android SDK (open SDK Manager, and look for [CMake] within the SDK Tools tab).
-
On MacOS, the
pkg-config
dependency is also needed. You can install both via [Homebrew], by executing:$ brew install cmake pkg-config
IMPORTANT: [Homebrew] should have added
eval "$(/opt/homebrew/bin/brew shellenv)"'
command to your.zshrc
or.bashrc
. Although this works for interactive terminals, it might not work for sessions inside of other apps, such as XCode, therefore you might need to manually create symbolic links:$ sudo ln -s $(which cmake) /usr/local/bin/cmake $ sudo ln -s $(which pkg-config) /usr/local/bin/pkg-config
For details read: https://earthly.dev/blog/homebrew-on-m1, and Issue#29.
-
- From package folder run
yarn start
to make sure we installed all required packages - Android
- Make sure you started a silumator and check it with command
adb devices
- Run
yarn android
- Make sure you started a silumator and check it with command
- IOS
- Run
yarn ios
to start development
- Run