Notice: The Monaca & Onsen UI Community Forum is shutting down.

For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.

Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.

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

    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, I also have this issue. Did you ever figure out how to fix it?



  • @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?