• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

LiskHQ/lisk-mobile:

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

LiskHQ/lisk-mobile

开源软件地址(OpenSource Url):

https://github.com/LiskHQ/lisk-mobile

开源编程语言(OpenSource Language):

JavaScript 97.5%

开源软件介绍(OpenSource Introduction):

Lisk Mobile

Build Status Coverage Status License: GPL v3 GitHub package.json version DeepScan grade

Lisk Mobile is a cross-platform application written in React Native and primarily build for iOS and Android. It provides the users with all the functionality they need to send and receive LSK tokens, as well as reviewing the activity history of their or any other account in the Lisk blockchain.

Get it from iTunes Get it on Google Play

Pre-Installation

The prerequisites to install and run Lisk Mobile from source using the different tagged releases are listed bellow. If you don't have them installed on your machine, please run the attached commands from your terminal.

  • Brew

    $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • Git

    $ brew install git
  • Node.js (recommended 14.9.0)

    $ brew install node
  • NVM

    $ brew install nvm

    Remember to follow Brew additional steps for enabling NVM fully. After running brew install nvm, Brew will detail this steps.

  • NPM (recommended 6.14.16)

    $ nvm install-latest-npm

    npm is shipped with Node.js. But to have a specific version installed see here.

  • Watchman

    $ brew install watchman

iOS

  • Install the latest version of Xcode

Android

  • Install Android Studio, which sould have these options checked installed:
    • Android SDK
    • Android SDK Platform
    • Performance (Intel ® HAXM)
    • Android Virtual Device
  • Install the Android SDK. Consider these configurations:
    • compileSdkVersion: 30
    • buildToolsVersion: 30.0.2

Installation

On your terminal, go to the directory you want to install Lisk Mobile and run:

$ git clone https://github.com/LiskHQ/lisk-mobile.git
$ cd lisk-mobile
$ nvm install
$ npm ci
$ npm run link

Run

$ npm start

Run on iOS - MacOS with Intel chip

To run the app on ios, you have to install pods.

For this, just run:

$ npx pod-install
$ npm run ios

Run on iOS - MacOS with Apple chip

If your machine has the Apple Silicon chip (not Intel), you will have to run some additional steps, which we hope are going to be solved in a short term while the new chip is more widely adopted.

The process is:

  1. Locate in Terminal app in Finder.
  2. Right-click and click on Get Info
  3. Check the Open using Rosetta checkbox.
  4. Quit Terminal app and run it again
  5. Go to your app folder and run sudo gem install ffi
  6. Run npx pod-install
  7. Run npm run ios

More details here.

Run on Android

To run android:

$ npm run android

Build on iOS

$ npm run build:ios

Build on Android

$ npm run build:android

Unit Tests

Single run

$ npm run test

Development

You can run the project in Xcode and use iOS simulators or alternatively use Android simulators. There are several options to set up your Android development environment. Please read React Native docs for more info.

There is a standalone app for debugging React Native. it has React and Redux debugger enabled by default. Please read React Native Debugger for more info.

Environment variables

You can fill out env.json with this variables:

{
  "network": "Lisk network's name, can be mainnet or testnet.",
  "passphrase": "Passphrase of your LSK account, to be filled out automatically on login",
  "secondPassphrase": "Second passphrase of your LSK account, to be filled out automatically on send process.",
  "useCommercialFonts": "Tells styleGuide/fonts.js file to load commercial fonts instead of Open Sans."
}

In order to avoid committing that file you can follow this approach as following:

$ git update-index --assume-unchanged env.json

Possible Errors for Mac Users

Errors on lottie-ios/Lottie.modulemap

If you face this error when trying to run the app:

/Users/***/Library/Developer/Xcode/DerivedData/Lisk-***/Build/Products/Debug-iphonesimulator/lottie-ios/Lottie.modulemap

Follow this steps to solve it:

  1. Add the following to the end of your Podfile (especially M1 users)
post_install do |installer|
  react_native_post_install(installer)
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
          config.build_settings["ONLY_ACTIVE_ARCH"] = "NO"
        end
    end
end
  1. Remove Pods folder and Podfile.lock rm -rf ios/Pods && rm -rf ios/Podfile.lock
  2. Run npx pod-install on your terminal.

Duplicate symbols for architecture x86_64

If you face this error when trying to run the app:

Products/Debug-iphonesimulator/react-native-udp/libreact-native-udp.a(GCDAsyncUdpSocket.o)
ld: 144 duplicate symbols for architecture x86_64

Follow this steps to solve it:

  1. Run npx patch-package
  2. Remove Pods folder and Podfile.lock rm -rf ios/Pods && rm -rf ios/Podfile.lock
  3. npx pod-install

Other possible errors

SDK location not found.

Create android/local.properties and add this line in the file for Mac Users:

sdk.dir=/Users/username/Library/Android/sdk

OR Set the environmental PATH to your sdk installation location.

Using Commercial Fonts

Since some of the fonts used in the production version are commercial, this repository only contains open source fonts and uses Open Sans as a replacement for the commercial ones.

If you have licensed copies of Basier Circle and Gilroy, you can add them to fonts folder with the naming convention stated in styleGuide/fonts.js file and make sure all the fonts are linked.

$ react-native link ./src/assets/fonts

iMessage Extension

Please check out iMessage extension docs for more information.

Contributing

Please see CONTRIBUTING.md for more information.

Contributors

See contributors section.

License

Copyright © 2016-2022 Lisk Foundation

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap