AgoraDesk, LocalMonero Apps
There are two apps under one code base in this repository.
First app - AgoraDesk:
- Appstore
- Google Play
- F-Droid - soon
- Download .apk
Second app - LocalMonero:
- Appstore
- Google Play
- F-Droid - soon
- Download .apk
🔥
App Features -
Within one code base there are 2 apps: AgoraDesk, LocalMonero. Each app can be built as Android and iOS native app. Design and logic separation made with flavors (more info further in this doc).
-
Universal Links work for Android and iOS. In case app is installed on the device, the regular links will run apps instead of browser. In case of two apps installed on one device the AgoraDesk app prioritized (it means in case of link localmonero/something AgoraDesk app will be opened).
-
Push notifications work on iOS & Android. In case user's device (for example in China or with GrapheneOS) can't receive pushes, app detects it and start polling in the background mode. More info
-
For anonymisation reasons all notifications sent without translations and translated on client. So, we use data messages to display them with app code (not with the FCM).
-
Made with Dart & Flutter
❤️
Build
For build the app locally after getting code from repository use FOSS commands in Makefile
.
For example, to build FOSS apk LocalMonero app
flutter build apk --verbose --flavor localmonero --dart-define=app.flavor=localmonero --dart-define=app.includeFcm=false
The apps use MapBox for reverse geocoding. In order to build it yourself, you need to create/provide your own MapBox API key. The instructions can be found here.
After that, create the file lib/keys/keys.dart
and add your key there: key const keysMapToken = 'YOUR_MAPBOX_KEY';
You will get the app that works without FCM services. Push notifications will be received with polling with foreground service (if the app is closed it still works).
Translation
The source of truth for the translation files is .json language files for web-version. https://github.com/AgoraDesk-LocalMonero/translation
In the flutter we use .arb files. For conversion to both directions use dart util https://github.com/AgoraDesk-LocalMonero/dart-json-arb-json-converter
Flavors
How to build iOS with run parameters
Fastline
Initial settings
Set up Firebase for different flavors
- https://firebase.flutter.dev/docs/cli
- https://firebase.google.com/docs/projects/multiprojects
- https://stackoverflow.com/questions/37615405/use-different-googleservice-info-plist-for-different-build-schemes
- https://stackoverflow.com/questions/56626467/use-different-googleservice-info-plist-for-single-project-in-xcode-using-swift4
Set up iOS links for the different apps
ios/Runner/Runner.entitlements ios/Runner/Runner-localmonero.entitlements
Presspacks
- Agoradesk https://agoradesk.com/static/press/agoradesk-presspack.zip/
- LocalMonero https://localmonero.co/static/press/localmonero-presspack.zip/
Known issues
Push notifications
Backend sends data messages. We get them in the app, translate and display. So, when the app is terminated, we should run the app, handle the message and display it.
iOS issues
- Crashes when receiving notification. Connected with awesome notifications settings. firebase/flutterfire#4026
Contribution
- Commits naming https://www.conventionalcommits.org/en/v1.0.0/
Types other than fix: and feat: are allowed, for example @commitlint/config-conventional (based on the the Angular convention) recommends build:, chore:, ci:, docs:, style:, refactor:, perf:, test:, and others.
Mark commit number with #, for example fix: #89
.
Also we can use following:
- feat: A new feature
- fix: A bug fix
- docs: Documentation only changes
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- refactor: A code change that neither fixes a bug nor adds a feature
- perf: A code change that improves performance
- test: Adding missing tests
- chore: Changes to the build process or auxiliary tools and libraries such as documentation generation