cordova-plugin-viewar

0.0.2 • Public • Published

Cordova ViewAR Plugin: cordova-plugin-viewar

A Plugin that lets cordova apps (currently we support only iOS) use ViewAR SDK

How to use it

  1. Create a new Cordova Project or if using in an existing project skip this step

    $ cordova create mysample com.example.mysample MySample
    $ cd mysample
    $ cordova platform add ios
    
    1. Install this Plugin

      $cordova plugin add cordova-plugin-viewar

    2. open the project in XCode and go to "Build Phases" and all the following lines in "Run Script"

    cp -a ../../plugins/cordova-plugin-viewar/resources/* "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/"

  2. ensure that you have -lstdc++ in Build Settings -> Linking -> Other Linker Flags

  1. To start using ViewAR, add the following function to your index.js script and call it when needed

    startViewAR: function() {

    var success = function(message) { console.log('Success calling ViewAR Plugin'); }

    var failure = function() { alert("Error calling ViewAR plugin!!!"); } cordova.plugins.ViewARPlugin.init('init', success, failure); }

Package Sidebar

Install

npm i cordova-plugin-viewar

Weekly Downloads

3

Version

0.0.2

License

MIT

Unpacked Size

125 MB

Total Files

300

Last publish

Collaborators

  • ak_viewar