RoepStoep / lidrobile

lidraughts.org mobile application
https://lidraughts.org/mobile
GNU General Public License v3.0
8 stars 1 forks source link

lidraughts.org/mobile

Android build Lint and unit tests GitHub

Lidraughts mobile is the lidraughts.org official application, forked from Lichess mobile. It is written in TypeScript, with a bit of Kotlin and Swift. It is a web application that accesses the native SDK, thanks to Ionic capacitor. The rendering library is mithril.js. It talks to a native Scan 3.1 engine, through a capacitor plugin. Multi-variant draughts library is brought by a JavaScript version of scaladraughts.

Download

<img src="https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png" alt="Get it on Google Play" height="74"> <img src="res/ios-badge.svg" alt="Download on the App Store">

or get the APK from the Releases section

Required dependencies

Android:

Setup project

Make sure to install all dependencies:

$ npm install

Capacitor needs the web app before sync, so build it:

$ npm run build

Sync capacitor:

$ npx cap sync

Running in the browser

$ npm run serve

Will serve assets at http://localhost:8080. Once the server is up, browse to http://localhost:8080/www.

You should use a chromium based browser to be close to the android webview which is based on chrome.

Be sure to Toggle Device Mode or else you won't be able to click on anything.

Running in a device/emulator

Be sure to install all the dependencies and follow the steps above in the Setup project section.

Android

Using command line:

$ npx cap run android

Using android studio:

$ npx cap open android

More information available here.

Free version

By default, the output APK will rely on Firebase Cloud Messaging to support push notifications. However, it is possible to remove this dependency if you don't care about push notifications.

To build the free version:

$ npm run patch-nonfree
$ npx cap update android
$ cd ./android
$ ./gradlew assembleDebug

iOS

You will need a GoogleService-Info.plist file in order to compile iOS project. You can download a dummy one from the firebase open-source project. Put it in the ios/App/App/ folder. Only debug builds are allowed with that example file. Push notifications won't work, but you will be able to run the app on a simulator just fine.

Using command line:

$ npx cap run ios

Using Xcode:

$ npx cap open ios

More information available here.