Cordova / Wikitude - ERROR: Plugin 'WikitudePlugin' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml

StackOverflow https://stackoverflow.com/questions/21421440

Pregunta

I'm using wikitude and cordova plugin for my augmented reality iOS mobile app project in xcode5. I got this error when try to execute WikitudePlugin.loadARchitectWorld(successCallback, errorCallback, "path/to/your/world"); command.

2014-01-29 11:23:22.152 Bii[5441:60b] ERROR: Plugin 'WikitudePlugin' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
2014-01-29 11:23:22.154 Bii[5441:60b] -[CDVCommandQueue executePending] [Line 117] FAILED pluginJSON = [
  "WikitudePlugin308741238",
  "WikitudePlugin",
  "open",
  [
    "ENTER-YOUR-KEY-HERE",
    null
  ]
]

I already add WTWikitudePlugin h/m into my project. This is my config.xml

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

Why?

¿Fue útil?

Solución

I would make sure your Wikitude plugin header and source files are in the Plugins folder in your Xcode project. I would then verify what the interface name of this plugin is.

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

Particulary, you want to pair up the value in the <feature> tag to the interface name in your header/source file. This is how config.xml links the plugins. The JavaScript file will call the plugin using the "name" property - so this is how Cordova links the JavaScript to the config.xml, to the native library.

Otros consejos

Seems to me that you're using a old version of PhoneGap. The current release (PhoneGap 3.3) uses Plugman to manage plugin installation. Using Plugman, the feature name is WikitudePlugin.

So try to use WikitudePlugin instead of WTWikitudePlugin.

In my case, i removed and re-added wikitude plugin. In result it broke references in xcode project then starts showing this error.

I had to add all the frameworks and compile source files manually.

To do that go to Build Phases

Drag missing .m files in Plugins (possibly WTWikitudePlugin.m and WTARViewController.m) directory to 'Compile Sources' section

Drag all files in Frameworks to 'Link Binary With Libraries' section

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top