Skip to content

jcavat/LibellID

Repository files navigation

LibellID

Projet

Cette application permet de découvrir les libellules les plus communes de Suisse romande, soit 27 espèces ou groupes d'espèces (liste complète dans la rubrique « fiches infos »).

INFORMATIONS UTILE

Cycle de vie d'une libellule

Les grandes libellules et les demoiselles

Les libellules se divisent en 2 grands groupes :

  • les Anisoptères (grandes libellules)
  • les Zygoptères (demoiselles)

Les Anisoptères sont robustes et se posent avec les ailes ouvertes, alors que les Zygoptères sont plus fins et se posent généralement avec les ailes fermées au repos.

Exemple d'anisoptère : Libellule à 4 taches Libellula quadrimaculata Exemple de zygoptère : Agrion jouvencelle Coenagrion puella
alt text alt text

Installation

  1. Install NodeJS.
  2. Install Ionic.
  3. Clone this repository: git clone https://github.com/jcavat/LibellID.git.
  4. Run npm install.

Mac: if you get the message gyp: No Xcode or CLT version detected!, you to need to execute this command line before npm install: sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/

Running the app

cd app

Browser (not all functionalities): ionic serve or ionic serve --lab

Android build

For complete instructions, see the Cordova Android Platform Guide.
In summary:

  1. Install Java Development Kit (JDK) 8

  2. Install Gradle.

  3. Install Android Studio. This will also install the Android SDK.

  4. Run: ionic cordova run android. This will build and run the app on a connected device, or will start the Android emulator.

Publishing your app

iOS build

XCode must be installed.

Install ios-deploy: npm install -g ios-deploy
Build and run on emulator or connected device: ionic cordova run ios

Troubleshooting

Android build error

Android build: if you keep getting the following message although Android Studio is already installed:

UnhandledPromiseRejectionWarning: CordovaError: Could not find an installed version of Gradle either in Android Studio,
or on your system to install the gradle wrapper. Please include gradle
in your path, or install Android Studio

Install gradle: https://gradle.org/install

iOS build error

if npm install ios-deploy -g fails, run: sudo npm install --global --unsafe-perm ios-deploy (as suggested here)

If you need to completely clean XCode cache, delete all the content of Library/Developer/Xcode/DeriveData/

Deploying

Look at the documentation : Deploying in ionic framework

Run parser for libellID.json

Execute parser:

npm run-script parser

Execute parser before ionic serve

npm run-script parser_serve

Execute parser before ionic run or ionic build with android:

npm run-script parser_run android

npm run-script parser_build android

Execute parser before ionic run or ionic build with IOS:

npm run-script parser_run ios

npm run-script parser_build ios