Open source cross-platform Tasks app built with NativeScript.
Use this application to find-out how to implement common mobile scenarios with NativeScript.
-
Make sure you have the NativeScript Command-line Interface installed as well as all the prerequisites for the NativeScript development, described in the package page.
-
Install the dependencies of the sample (NativeScript modules and TypeScript compiler)
`npm install`
-
Compile the TypeScript code
`node_modules/typescript/bin/tsc -p ./app`
-
Add the preferred platform-specific tools to the project library. Note that iOS development is only available with a Mac machine.
tns platform add ios|android
-
[Android only] Copy the AndroidManifest.xml file to the Android project folder.
cp ./manifests/AndroidManifest.xml ./platforms/android/src/main
-
Run the project.
tns run ios|android [--emulator]
The
--emulator
keyword instructs the CLI to load the iOS simulator or an android emulator depending on the platform you want.
For convenience you can use the run.bat
/run.sh
scripts on a *NIX/windows environment respectively. The run.sh
script starts the sample in iOS when run on a Mac and Android on Linux/Windows. The run.bat
script runs the sample on an Android emulator under Windows.
For *NIX systems the following script runs the sample directly:
curl https://raw.githubusercontent.com/NativeScript/sample-Tasks/master/run.sh | bash
We chose an app that we know will cover a lot of useful scenarios:
-
User management
-
User authentication
-
User registration
-
User welcome email
-
Cloud data
-
read, update, delete and create data entry stored in the cloud
-
Offline support for the data (not in this article, but coming soon)
-
Modern UX
-
Using SideBar
-
Pull to Refresh
-
FAB (floating action button for Android Lollipop)
-
Load on demand for many tasks
-
Device integration
-
using camera
-
using phone contacts
-
Patterns/Technologies used
-
MVVM
-
CSS for styling
-
XML and data-binding for describing the UI
-
Platform specific targeting for the Android FAB button
-
3rd party native libraries to load Telerik UI
Please read the series of articles that explain how this application is being implemented - https://www.nativescript.org/blog/nativescript-open-source-sample---tasks