iosxcodecordovaphonegap-pluginswikitude

How to set up Wikitude Phonegap plugin in iOS mobile app project?


I'm using Wikitude and PhoneGap for my augmented reality mobile app project in xcode5. I don't what mistake I had done during installation. I have already read all the documentation related to this setup.

http://www.wikitude.com/external/doc/documentation/3.0/phonegap/setupguidephonegapios.html

Besides that, I have already downloaded Wikitude Phonegap plugin sample from Github but I still don't have any idea to integrate the samples into my project.

https://github.com/Wikitude/wikitude-phonegap-samples

I have already inserted this code into config.xml.

<feature name="WikitudePlugin">
        <param name="ios-package" value="WTWikitudePlugin"/>
    </feature>

enter image description here

But I am not understanding this part.

JAVASCRIPT INTERFACE

It is straightforward to use the Wikitude Plugin within your PhoneGap application.

We wrapped all cordova.exec calls into a separate JavaScript wrapper which handles location updates and some more functionality behind the scenes.

You will mainly work with the WikitudePlugin where all you have to do is to call Wikitude.isDeviceReady(successCallback, errorCallback) and in your successCallback, you can call WikitudePlugin.loadARchitectWorld(successCallback, errorCallback, "path/to/your/world").

What are the other kinds of files I need to add for running Wikitude sdk in my mobile app project?

Why does it happen?


Solution

  • you are referencing an outdated documentation from Wikitude. Have a look at the current documentation which describes the setup process using PhoneGap 3.0 + Plugman.

    After you have done this, all you need to do is to add your 'Architect World' which is the 'assets' folder in the sample application. You can structure this folder as you want but it has to include a html file which is the starting point for the Architect World.

    To interact with the Wikitude SDK, there is the WikitudePlugin.js file, which wraps all the calls from JS to the native ObjC application. Have a look at the sample application how to use the WikitudePlugin.js, but in general you need to check if the device is able to run an Architect World (WikitudePlugin.isDeviceSupported) and after this, use the success callback to load the Architect World with WikitudePlugin.loadARchitectWorld.