ionic-clinical6-demo

0.0.8 • Public • Published

Clinical 6 Ionic Demo

Ionic 2 app showcasing examples of Clinical6's functionality. Great example of how to incorporate the Clinical6 Ionic Plugin & Clinical6 JS SDK.

Getting Started

First setup the Environment

npm install

After cloning this project, run the following commands to build the app locally:

ionic cordova platform add [android | ios]
ionic cordova build [android | ios]
ionic cordova build ios && android
 
# Add Crashlytics if necessary 
# ionic plugins remove org.apache.cordova.crashlytics 
# cordova plugin add https://github.com/vianneyniji/cordova-fabric-crashlytics-plugin  --variable CRASHLYTICS_API_KEY=c1a2c0417de2b0cd6ed902110779b49ac89a4d19 --variable CRASHLYTICS_API_SECRET=ac0bb20be2f8b7b73d5c80ffa21eadd5dcfc03fada5d1b6e99aa978b5ab34cb9 
 
# Fabric io 
# use this one instead as it's the full fabric.io solution 
cordova plugin remove cordova-fabric-plugin
cordova plugin add https://github.com/sarriaroman/FabricPlugin#1.1.7  --variable FABRIC_API_KEY=c1a2c0417de2b0cd6ed902110779b49ac89a4d19 --variable FABRIC_API_SECRET=ac0bb20be2f8b7b73d5c80ffa21eadd5dcfc03fada5d1b6e99aa978b5ab34cb9
 
# Push Notificaiton Plugin 
# ionic cordova plugin remove phonegap-plugin-push 
# ionic cordova plugin add phonegap-plugin-push  --variable SENDER_ID="My Fake Sender ID" 
 
ionic cordova plugin remove phonegap-plugin-push
# ionic cordova plugin add phonegap-plugin-push --variable SENDER_ID="1030401316745" 
ionic cordova plugin add phonegap-plugin-push  --variable SENDER_ID="1030401316745"
 
# Clinical6 Plugin 
ionic cordova plugin remove cordova-plugin-clinical6
ionic cordova plugin add git+ssh://git@github.com/Parallel-6/cordova-plugin-clinical6.git
 
# Run locally on a physical device 
ionic cordova run [android | ios]
 
# Run on emulator 
# Example: 
#   ionic cordova emulate ios --target="iPhone-7-Plus" 
ionic cordova emulate [android | ios]

Unit testing

not sure if this is implemented on this repository

We use jasmine + karma for unit testing, which works together with angular-mocks.

To run the test suite, simply run:

npm install && bower install
gulp karma

Configure Environments

not sure if this is implemented on this repository

Developers can modify the Clinical6 endpoint of this app by specifying the Clinical6 url they want the app to use. To do that, you can run

gulp setup-cr-endpoint --url {url}

Code Style Guidelines

This project follows the Code Style guidelines made by John Papa: https://github.com/johnpapa/angular-styleguide/tree/master/a1

To check if your code meets proper style guidelines, simply run gulp lint

Push Notifications Troubleshooting

Make sure you have the latest cocoapods. You should never have to modify the actual xcode project. Simply remove the platform using ionic/cordova commands and add it back if you are having issues. Make sure you do this prior to any ruby commands.

The certificates and passwords are in the /conf/Certificates/ folder.

To clean and deintegrate pods and reinstall use the following:

[sudo] gem install cocoapods-deintegrate
[sudo] gem install cocoapods-clean
pod deintegrate
pod clean
pod install

Also make sure you have the latest node, npm, cordova, cordova-ios libraries.

cordova --version
// 6.4.0 or higher

cordova platform version
// ios should be at least 4.3.0

Update node, if you are using homebrew

brew upgrade node
// at least 7.2.1

Update npm

npm install npm@latest -g
// at 5.3.0

Update ios-deploy for real devices

npm install -g ios-deploy

Android missing icons and a splashcreen?

cp -r res/ platforms/android/res/

Weird errors in building ionic?

npm install --save @types/node

Deploy Exmaples

First make sure xCode is closed

Building Dev

ionic platform rm ios
ionic platform rm android
gulp prepare --dev --version="1.0.9"
ionic build ios
ionic build android
gulp prepare --dev --version="1.0.9"
# cordova plugin remove cordova-fabric-plugin 
# cordova plugin add https://github.com/sarriaroman/FabricPlugin#1.1.7  --variable FABRIC_API_KEY=c1a2c0417de2b0cd6ed902110779b49ac89a4d19 --variable FABRIC_API_SECRET=ac0bb20be2f8b7b73d5c80ffa21eadd5dcfc03fada5d1b6e99aa978b5ab34cb9 
ionic emulate ios --target="iPhone-7-Plus"
ionic run android

Building Test

ionic platform rm ios
ionic platform rm android
gulp prepare --test --version="1.0.9"
ionic build ios
ionic build android
gulp prepare --test --version="1.0.9"
# cordova plugin remove cordova-fabric-plugin 
# cordova plugin add https://github.com/sarriaroman/FabricPlugin#1.1.7  --variable FABRIC_API_KEY=c1a2c0417de2b0cd6ed902110779b49ac89a4d19 --variable FABRIC_API_SECRET=ac0bb20be2f8b7b73d5c80ffa21eadd5dcfc03fada5d1b6e99aa978b5ab34cb9 
ionic emulate ios --target="iPhone-7-Plus"
ionic run android

If you need to update the version in git

git tag -a 1.0.9
git push origin 1.0.9

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.8
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.8
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i ionic-clinical6-demo

Weekly Downloads

0

Version

0.0.8

License

none

Last publish

Collaborators

  • xaleph