M
@mtnappdeveloper said in Wikitude SDK cordova.require not found:
I want to develop an AR app using Cordova’s Wikitude SDK.
https://github.com/Wikitude/wikitude-cordova-plugin Wordle
Got a trial key.
key is Reflected in this._sdkKey of WikitudePlugin.js.
"Error module com.wikitude.phonegap.WikitudePlugin.WikitudePlugin not found"
Will be.
Cordova.require (“com.wikitude.phonegap.WikitudePlugin.WikitudePlugin”);
This is bad, but I don’t know why.
Cordoba version is 10
The version of the Wikitude SDK is 9.8.0.
var app = {
// represents the device capability of launching ARchitect Worlds with specific features
isDeviceSupported: false,
// Application Constructor
initialize: function() {
this.bindEvents();
},
// Bind Event Listeners
//
// Bind any events that are required on startup. Common events are:
// 'load', 'deviceready', 'offline', and 'online'.
bindEvents: function() {
document.addEventListener('deviceready', this.onDeviceReady, false);
},
// deviceready Event Handler
onDeviceReady: function() {
try {
app.wikitudePlugin = cordova.require("com.wikitude.phonegap.WikitudePlugin.WikitudePlugin");
var requiredFeatures = [ "image_tracking", "geo" ];
app.wikitudePlugin.isDeviceSupported(app.onDeviceSupported, app.onDeviceNotSupported,requiredFeatures);
} catch (error) {
alert(error);
}
},
onDeviceSupported: function() {
alert('Your DeviceSupported');
},
onDeviceNotSupported: function(errorMessage) {
alert('Your DeviceNotSupported');
},
…more
};
app.initialize();
Hi @mtnappdeveloper, Are you able tell me how you did this please?