Skip to content

Shuunen/green-app

Repository files navigation

Green App

GitHub license

Build Status David LGTM Grade Scrutinizer Score

A native application built with NativeScript-Vue

Prerequisites

Guides

Please follow the NativeScript guide before looking at these :

Usage

npm install # Install dependencies
npm start # Build for dev
npm run build # Build for production
npm run debug # Build, watch for changes and debug the application

Tips

  • if there is structural updates to the project like new deps, modified conf, etc... delete the platforms folder and let npm run dev (or build) regenerate it

About deep linking

Access via greenapporder://my-page?param=42 scheme is setup on both Android & iOS.

Access via https://green-app-order.fr/my-page?param=42 scheme is setup on Android only (for now).

Keep in mind that the second option will not open the app right away because it's a web link and the local browser can open it too. So the first time user will click a link like this it will be prompted to choose which app to use to open this link.

Also, because the host green-app-order.fr does not exists the deep linking will not work.

To edit this deep linking : app\App_Resources\Android\src\main\AndroidManifest.xml & app\App_Resources\iOS\Info.plist

When a deep link is catch by app\plugins\url-handler.js you will see a console log with details.

Upgrading stack

  • like described in their docs
  • like a smart-ass : follow the getting started with NS Vue and create a new project, then compare & upgrade this one accordingly
  • like a bad-ass : npm run update, try dev and build to check that everything is still working

Known problems :

  • clean-webpack-plugin : version 1.0.1 is compatible with the current NativeScript generated webpack.config.js but the upper major version are not. In 1.0.1 this module is imported like this const CleanWebpackPlugin = require('clean-webpack-plugin') but should be imported with const { CleanWebpackPlugin } ... in the next versions. So let's wait for NativeScript to generate updated webpack config to update this module.

TODO

  • production build should be tns build <platform> --env.production according to the last stack readme

Thanks