Apache Cordova wrapper for Kakuro Dojo
See cordova.apache.org for documentation.
Currently, iOS is the only supported platform, but adding Android should be very easy, once I get the iOS app deployed.
Do once:
cd .../git clone git@github.com:billstclair/kakuro-master.gitnpm install -g cordovanpm install -g ios-deploycd .../kakuro-master/cordova./configure# Add platforms and pluginscordova requirements# Do whatever it tells you to complete.cordova run ios --list# Do whenever you want to see the emulated device list
After that, you can test changes with:
cd .../kakuro-masterbin/build-sitecd cordovacordova run ios --emulator --target=iPad-Air-2# (--emulatoris the default.--targetdefaults toiPhone-SE)./runis a script for thecordova run...command above../prepareis a script for thecordova prepare...command.- If you prefer, as I do, to do your compilation and running in Xcode, use this, and operate on
platforms/ios/Kakuro Dojo.xcodeprojin Xcode. - You'll need to set your development team in Xcode.
- This makes it easy to load the app onto a real device.
- To debug the JavaScript from the simulator or an iOS device:
- In iOS Settings/Safari/Advanced, enable "Web Inspector".
- After starting the app, in Safari on your Mac, open "Develop/<iOS device>/Kakuro Dojo/Kakuro Dojo".
- If it fails before you can get there, try, from the
cordovadirectory,cordova serve, aim your web browser at the printed location (http://localhost:8000), and click oniOS.
Android notes
The ./configure script in the cordova directory may fail for Android while executing cordova plugin add cordova-plugin-device. If it does, you need to edit cordova/platforms/android/CordovaLib/build.gradle, and add jcenter() to the repositories:
repositories {
mavenCentral()
jcenter()
}
Then retry cordova plugin add cordova-plugin-device.
Doing cordova run android tends to fail. I prefer to just use ./prepare android, and then import the run File/New/Import Project... from Android Studio, choosing the cordova/platforms/android directory. Then build and run the project in Android Studio.
Some changes you make, followed by ./prepare android, will require Build/Clean Project or Build/Rebuild Project in Android Studio. Others it will properly notice and do the right thing. I haven't figured out which is which.
You may also need to add ~/Library/Android/sdk/tools/bin (in MacOS, or the equivalent in Linux) to your shell PATH.