Cordevicljs Save

CorDeviCLJS - Cordova, Device and ClojureScript. Hybrid mobile app using Cordova with native device bridge, App connecting to backend (included) via websocket. UI based on OnsenUI and Facebook React, based on Enterlab Rente

Project README

Usage

Clone, and cd into the cordevicljs folder.

lein figwheel

Wait for figwheel to finish and notify browser of changed files!

Then in another terminal tab:

lein run

Be sure to have the Apache Cordova CLI installed and then in a third tab:

cd resources
cordova platform add browser
cordova platform add ios|android
cordova plugin add cordova-plugin-device
cordova plugin add cordova-plugin-dialogs
cordova plugin add cordova-plugin-splashscreen

If the plugins return 404s, you can try installing directly from git

cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git
cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs.git
cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen.git

For older versions of Cordova and the Splashscreen plugin, you sometimes had to remove the splashscreen plugin to test in the browser. This doesn't seem to be the case anymore, although your browser will try to get the splash screen, which it can't. If you don't want to look at it, and only develop in the browser, simply remove it again:

cordova plugin rm cordova-plugin-splashscreen

Now you can test in browser. Still in resources, where config.xml resides, run

cordova run browser

This should show a mobile flat UI native like interface with a slider menu and a JavaScript alert telling you that Native Device bridge is working.

(For some older versions of Cordova on Linux, you had to patch platforms/browser/cordova/run as documented here http://stackoverflow.com/questions/29730482)

Test on device emulators

Then to test in device emulator:

cordova run ios|android

Refer to XCode/Android SDK manuals if this won't work.

If it works you should see the same app as before, but this time with a real native dialog instead of a JavaScript alert.

Test on real device

cordova run ios|android --device

It's that simple! :)

PS: If you get a warning when installing on iOS device about backup to iCloud, you can disable this by following the steps in the second reply here: http://stackoverflow.com/questions/18717339/where-can-i-change-the-backupwebstorage-property-in-my-phonegap-app

Comments & Suggestions

Please don't hesitate to contact us if you have any questions/suggestions etc.!

From Rente to CorDeviCLJS

If you want to know all the steps we've went through to convert Rente to CorDeviCLJS, read cordevicljs-howto.textile (might be converted to Markdown at some point).

Special Thanks goes to

Ourselves - CorDeviCLJS is based on Enterlab Rente, which can be found here: https://github.com/enterlab/rente.

And the people enabling the tech that Rente is based upon (see Special Thanks in the Rente README for further info).

License

Copyright © Enterlab 2015-2019

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

Logos/images are strictly Copyright © Enterlab 2015, and can only be used for personal purposes. In other words - replace with your own logos/icons/images for real purpose apps/usages.

Open Source Agenda is not affiliated with "Cordevicljs" Project. README Source: enterlab/cordevicljs
Stars
33
Open Issues
3
Last Commit
3 years ago

Open Source Agenda Badge

Open Source Agenda Rating