kasparsj / homework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Homework

Cordova based hybrid app with 4 buttons, that:

  1. calls native code (shows native alert)
  2. calls native code, that evaluates javascript on WKWebView or CordovaWebView
  3. calls C++ method
  4. calls static C++ method

All the native handlers are packed in a Cordova plugin: https://github.com/kasparsj/homework-plugin

To run (tested on MacOS):

  • git clone https://github.com/kasparsj/homework
  • cd homework
  • npm i
  • node_modules/.bin/cordova run android
  • node_modules/.bin/cordova run ios

if it does not work then try removing and re-adding the platforms:

  • node_modules/.bin/cordova platform remove android
  • node_modules/.bin/cordova platform add android
  • node_modules/.bin/cordova run android
  • node_modules/.bin/cordova platform remove ios
  • node_modules/.bin/cordova platform add ios
  • node_modules/.bin/cordova run ios

if it still does not work, try removing and re-adding the plugin:

  • cd ..
  • git clone https://github.com/kasparsj/homework-plugin
  • cd homework
  • node_modules/.bin/cordova plugin remove cordova-plugin-homework
  • node_modules/.bin/cordova plugin add ../homework-plugin
  • node_modules/.bin/cordova run android
  • node_modules/.bin/cordova run ios

About


Languages

Language:Java 45.7%Language:Objective-C 30.4%Language:CMake 7.1%Language:C++ 5.9%Language:JavaScript 4.4%Language:HTML 1.9%Language:CSS 0.9%Language:Batchfile 0.9%Language:C 0.7%Language:Shell 0.6%Language:Objective-C++ 0.6%Language:Kotlin 0.5%Language:Swift 0.5%Language:Ruby 0.0%