Skip to main content

Setup

In this section you are going to find step by step how to install and use Harmony framwework.

Android

Git repository: https://github.com/mobilejazz/harmony-kotlin/

Step 1. Add the JitPack repository in your root build.gradle at the end of repositories:

allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}

Step 2. Add the dependency in your module build.gradle

dependencies {
implementation 'com.github.mobilejazz.harmony-kotlin:android:1.0.2'
}

iOS

Git repository: https://github.com/mobilejazz/harmony-swift

Harmony for iOS is distributed via CocoaPods.

Step 1. Create Podfile for your project. Run the following command and it will create for you a Podfile file:

pod init

Step 2. Add Harmony pod to your Podfile file:

pod 'Harmony'

You can add additional subspecs if you need a specific feature not included into the main Harmony pod:

  pod 'Harmony/Alamofire' # Alamofire files
pod 'Harmony/iOS' # UIKit files
pod 'Harmony/Repository' # Repository based files
pod 'Harmony/Security' # Keychain & encryption files
pod 'Harmony/Vastra' # Object validation library

Step 3. Install pods

pod install

Step 4. From now on, you need to open .xcworkspace file

PHP

Git repository: https://github.com/mobilejazz/harmony-php

Step 1. Clone repo:

git clone git@github.com:mobilejazz/harmony-php.git

Step 2. Add Harmony PHP on the autoload section of you composer.json

Ex.
...
"autoload": {
"psr-4": {
...,
"harmony\\core\\": "harmony-php/core/src/",
"harmony\\eloquent\\": "harmony-php/eloquent/src/"
}
},
...

Step 3. run composer update

composer update

TypeScript

Git respository: https://github.com/mobilejazz/harmony-typescript

Harmony for TypeScript is distributed via the following NPM packages:

  1. @mobilejazz/harmony-core: Contains all basic tools and repository files.
  2. @mobilejazz/harmony-nest: Contains NestJS related files, including the OAuth2 server.
  3. @mobilejazz/harmony-typeorm: Contains TypeORM related files.
  4. @mobilejazz/harmony-angular: Contains Angular related files.

Run npm install --save <package> to install/update any of these.