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

badger-cash/badger-mobile: Badger Mobile

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

开源软件名称(OpenSource Name):

badger-cash/badger-mobile

开源软件地址(OpenSource Url):

https://github.com/badger-cash/badger-mobile

开源编程语言(OpenSource Language):

TypeScript 97.0%

开源软件介绍(OpenSource Introduction):

Badger Mobile Wallet

Your gateway to the world of Bitcoin Cash (BCH) apps.

Badger Mobile Wallet is a Bitcoin Cash (BCH) and Simple Ledger Protocol (SLP) wallet. Designed to be simple and straightforward to highlight exciting world of BCH and SLP.

Feature Highlights

  • BCH Wallet
    • Wallet on 145 derivation path
    • Multi-currency fiat conversions for display
  • SLP vault
    • Wallet on 245 derivation path
    • All of your SLP tokens in one place
  • BIP70 support
    • BCH
    • SLP
  • Paper wallet wif sweeping
    • BCH - Bitcoin Cash paper wallets
    • SLP - Simple Token paper wallets

Application Overview

Primary Technology

  • react-native
    • redux
    • react-navigation
    • styled-components
  • bcash (Bitcoin Cash version of bcoin)
  • prettier
  • yarn
  • TypeScript

File Structure

  • /
    • Configuration files and project setup
    • assets/
      • Images and fonts packaged with the app
    • /atoms/
      • Lowest level UI components, such as Text, Buttons, Spacer, etc
    • /components/
      • UI components used throughout the app, should be mainly composed of atoms with additional logic
    • /data/
      • The redux store, and all data management logic
    • /navigation/
      • The router of the application
    • /screens/
      • Top level screens, these are what the navigation renders
    • /themes/
      • App color files
    • /hooks/
      • Custom react hooks
    • /utils/
      • Utility methods, mainly for Bitcoin Cash (BCH) related logic
    • /ios/
      • iOS specific project files, modify these through xCode
    • /android/
      • Android specific project files

Data

All data which lives longer than a single screen is stored in redux, the structure of which can be found in the /data folder.

Local State and React Lifecycle

Only use Functional Components with React and stick to using the hook paradigm; except for rare exceptions.
Keeping the entire app on this single pattern will make the code more consistent, future-proof, and easier to maintain.

Styling

All styling is done with the styled-components library.
Most of the base components we reuse should be turned into atoms and put into the /atoms folder.

To reuse variables throughout the app (like colo and spacing), define them in one of the ./themes files.

Navigation

Navigation is managed with the react-navigation library. To contain the logic of navigation in a single place, keep all navigation and router setup in the /navigation folder.

Development Setup

This project use react-native. Please refer to the React Native documentation to get the iOS or Android emulator installed and running before running badger-mobile

Run Local Tests

yarn test

Initial Setup

iOS Setup

> yarn install
> cd ios
> pod install
> cd ..
> yarn run ios

Different iOS Device

> yarn run ios --simulator="iPhone 11 Pro Max"
> yarn run ios --simulator="iPhone 11 Pro"
> yarn run ios --simulator="iPhone 8 Plus"
> yarn run ios --simulator="iPhone 6"
> yarn run ios --simulator="iPhone SE"
> yarn run ios --simulator="iPhone X"

iOS Store Deployment

  1. Load project in XCode
  2. Update version & build numbers
  3. Product > archive project
  4. Sign with deployment keys
  5. Go to the Apple web console to create release
  6. Test on testflight
  7. Release to production

Android Setup

Generate Debug Keystore

  • Required for local development
  • Generate a debug keystore in android/app
    1. cd android/app
    2. keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000

Setup Release Keystore

  1. Required for releases
  2. Follow the steps to sign an apk
  3. generate or place the badger-mobile-release.keystore file and put into /android/app
    • Get this from the project lead
  4. update android/gradle.properties with the keystore filename and password. Template below.

gradle.properties Template

MYAPP_RELEASE_STORE_FILE=badger-mobile-release.keystore
MYAPP_RELEASE_KEY_ALIAS=badger-mobile-release
MYAPP_RELEASE_STORE_PASSWORD= - - - - - - - - - -
MYAPP_RELEASE_KEY_PASSWORD= - - - - - - - - - -
  • Suggestion to not commit secrets by mistake: git update-index --assume-unchanged android/gradle.properties

Android Local Install

> yarn install
> Start an Android device - either
  > Android emulator from Android Studio
  > Physical device with USB debugging enabled
> yarn run jetify
 > jetify only required once
> yarn run android

Create Bundles'n'Builds

  • Increment versionCode in android/app/build.gradle
  • Build .apk
    • The .apk file is good for distributing online, or for sending to people direct to sideload.
    • > yarn run android-build
  • Bundle the build
    • The bundle is be used to distributed on the Play Store.
    • > yarn run android-bundle

Android Store Deployment

  • Go to Play console
  • Upload the bundle to a new internal test release
  • Launch to internal test group
  • QA - and testing
  • Fix issues, repeat from beginning
  • Launch to beta
  • Launch to production
  • Update the universal .apk on badger.bitcoin.com



鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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