# cordova-plugin-viewar

> ViewAR SDK Cordova Plugin

Latest version **0.0.2** (published 2019-07-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install cordova-plugin-viewar
pnpm add cordova-plugin-viewar
yarn add cordova-plugin-viewar
bun add cordova-plugin-viewar
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; large bundle; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2019-07-26 |
| First published | 2019-07-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 119.3 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | ak_viewar |
| Keywords | ecosystem:cordova, cordova-ios |

## Links

- npm: https://www.npmjs.com/package/cordova-plugin-viewar
- npm.io page: https://npm.io/package/cordova-plugin-viewar

## Recent versions

- 0.0.2 (latest) — 2019-07-26

## README

# 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

   2) Install this Plugin
   
       $cordova plugin add cordova-plugin-viewar

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

   
   ![](Script.png)
   
   cp -a ../../plugins/cordova-plugin-viewar/resources/* "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/"

  4) ensure that you have -lstdc++ in Build Settings -> Linking -> Other Linker Flags
  
  ![](LinkerFlag.png)

  5) 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);
    }

---
_Source: https://npm.io/package/cordova-plugin-viewar · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
