Running zmNinja from Source - 3esmit/zmNinja GitHub Wiki
NOTE If you want to run it on your desktop, you can directly download desktop binaries here and if you want it for Android/iOS you can get from the play/appstore. This is only for those who want to run from source.
Version note: The code is compiled using the following versions of tools. If you are using newer versions of ionic the code may not compile - I don't have the time to upgrade yet. Finally, if you choose to go the source route, I expect you to spend a lot of time yourself debugging first before you create an issue. Even if you do create an issue, I have very limited bandwidth to debug source compilation issues for you. Thanks.
Gulp version: CLI version 3.9.0
Gulp local: Local version 3.9.0
Ionic Version: 1.1.0
Ionic CLI Version: 1.7.0
Ionic App Lib Version: 0.5.1-beta.0
ios-deploy version: Not installed
ios-sim version: 5.0.2
1. Common steps - Desktop/Android/iOS
Step 1: install node.js
For Ubuntu:
sudo apt-get install curl
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs
For other systems: Just download NodeJS and install it
Step 2: install cordova and ionic
sudo npm install -g cordova ionic
Step 3: download zmNinja
git clone https://github.com/pliablepixels/zmNinja.git
Step 4: configure zmNinja and get all required plugins
cd zmNinja
sudo npm install
sudo npm install -g gulp
ionic state restore # this may take time, grab a coffee
Note that when you do ionic state restore
it will all android and iOS directories too. You need to do this step even if you run it in desktop.
##2. Making an iOS build Note: You need to be doing this on a mac, with Xcode and the SDK installed To compile a debug build for iOS:
ionic build ios
This does not produce an iOS ready ipa. What you need to do then is to open platforms/ios/zmNinja.xcodeproj
in Xcode. Then go to Project -> General, enable all these options as below and the compile and deploy on your device
. Make sure you use your provisioning profiles.
##3. Making an Android build Note: You need to have the Android SDK and build tools installed To compile a debug build for Android:
ionic build android
If this complains of missing SDKs, you need to install the SDK version it requests This should produce an APK file. To install it on your phone over adb, you'd do something like
adb install -r platforms/android/build/outputs/apk/android-armv7-debug.apk
##3. Running it on a desktop zmNinja can also run inside your browser as a desktop app.
Step 1: Set up the proxy redirect
cp ionic.project.sample ionic.project
Now edit ionic.project and the in the line that says
"proxyUrl": "http://server/zm",
replace server
with your ZM hostname or IP. Note that if you are using SSL its important that the hostname matches the common name you used when generating the certificate. For example, if you used a common name of myserver.ddns.net and then specified its IP here, SSL would fail.
What we are doing here is telling ionic to proxy requests to ZM via a proxy server - this is needed so that SSL as well as API authentication works. Plus this is needed to avoid CORS problems in desktops
Step 2: Run with it!
Simply do a (while inside the zmNinja root directory)
ionic serve
-or-
ionic serve -c # to display console logs in the terminal - recommended to debug and figure out what's going wrong
Enjoy.