Start a new topic

Need help getting Cordova plugin to run with Ionic

Need help getting Cordova plugin to run with Ionic



Hi, i made a ngCordova wrapper for the cordova plugin you can download it from here https://gist.github.com/yailPeralta/d86126fe96a0a43f441e11a1cb3bb80e

And here is how to configure the wikitud key and initialize the plugin

https://gist.github.com/yailPeralta/2b968a3f7d3a0c7cf5a7103f7880961f (in Ionic)

Hi,

I am trying to get the Wikitude Cordova plugin to work with a blank Ionic project. But not getting a lot of success trying to link all the javascript files etc.

So these are the steps i did:


create a new ionic project

installed ngCordova

added the iOS and android platform

did a build of them both

installed the Wikitdue Cordova plugin

added my license key to the following file WikitudePlugin.js

added index.js to the main index.html file in the www folder

created in www a folder called views and in there I created another folder called camera

in the camera folder I created a js folder and place the js files (marker.js & fromwebservice.js), this folder also contains the following files: cameraview.html and poidetail.html


In the cameraview.html file I call upon the wikitude architect like so:

<ion-view view-title="Pub Stop">
<ion-content class="background">
<a href="javascript:app.loadARchitectWorld();">Camera</a>
</ion-content>
</ion-view>


And in the poidetail.html I place the following code:

<ion-view view-title="Detail">
<ion-content class="background">

<h1>test</h1>

</ion-content>
</ion-view>


 

In the index.js file I adjusted the path of the url to the following ->  "path": "views/camera/camveraview.html"

My file structure looks like this:


https://gyazo.com/be9a20e404b5324c0d7876f75ab724f9


 

When I run it on the phone via Ionic View nothing happens, so I run it in the browser and I get the following error:

https://gyazo.com/c6ac1dbcfdc845e3433eb5c3a0794406

 

Can somebody help me to link all the files correctly so I can get started with this project. Here is a dropbox link where I share the www folder https://www.dropbox.com/s/gp2ca7w9i0a6mqv/www.zip?dl=0

 

 
Login or Signup to post a comment