gurehbgui
gurehbgui

Reputation: 14674

Plugin 'Device' not found

I made an App with Ionic and then Deployed it to my iPhone. It results to the following message:

(lldb) 2015-03-21 12:25:01.541 Foo[545:102930] CDVPlugin class CDVDevice (pluginName: Device) does not exist.
2015-03-21 12:25:01.542 Foo[545:102930] ERROR: Plugin 'Device' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
(lldb) 2015-03-21 12:25:01.543 Foo[545:102930] -[CDVCommandQueue executePending] [Line 158] FAILED pluginJSON = [
  "Device492387493",
  "Device",
  "getDeviceInfo",
  [

  ]
]

The command cordova plugins lists the Device plugin:

abc:Foo user$ cordova plugins
com.google.cordova.admob 2.7.4 "AdMob Plugin Pro"
com.google.playservices 19.0.0 "Google Play Services for Android"
com.ionic.keyboard 1.0.4 "Keyboard"
com.rjfun.cordova.extension 1.0.6 "Cordova Plugin Extension"
org.apache.cordova.console 0.2.13 "Console"
org.apache.cordova.device 0.3.0 "Device"

My config.xml:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<widget id="a.b.c" version="1.1.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
  <name>Foo</name>
  <description>
        Foo App.
    </description>
  <author email="[email protected]" href="http://Foo.foo/">
      WestByte
  </author>
  <content src="index.html"/>
  <access origin="*"/>
  <preference name="webviewbounce" value="false"/>
  <preference name="UIWebViewBounce" value="false"/>
  <preference name="DisallowOverscroll" value="true"/>
  <preference name="BackupWebStorage" value="none"/>
  <feature name="StatusBar">
    <param name="ios-package" value="CDVStatusBar" onload="true"/>
  </feature>
</widget>

When I debug it, I never get to the $ionicPlatform.ready:

angular.module('starter', ['ionic', 'starter.controllers', 'ngCordova'])
    .run(function($ionicPlatform, $cordovaAdMob) {
        $ionicPlatform.ready(function() {
            // this point is never reached
        });
    })

Whats wrong here?

Upvotes: 0

Views: 3870

Answers (1)

Nurdin
Nurdin

Reputation: 23883

You need to set config.xml manually inside iOS platform folder, not the outside.

enter image description here

config.xml

<?xml version='1.0' encoding='utf-8'?>
<widget id="com.revivalx.cordova.todomobile" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <preference name="AllowInlineMediaPlayback" value="false" />
    <preference name="AutoHideSplashScreen" value="true" />
    <preference name="BackupWebStorage" value="cloud" />
    <preference name="DisallowOverscroll" value="false" />
    <preference name="EnableViewportScale" value="false" />
    <preference name="FadeSplashScreen" value="true" />
    <preference name="FadeSplashScreenDuration" value=".25" />
    <preference name="KeyboardDisplayRequiresUserAction" value="true" />
    <preference name="MediaPlaybackRequiresUserAction" value="false" />
    <preference name="ShowSplashScreenSpinner" value="true" />
    <preference name="SuppressesIncrementalRendering" value="false" />
    <preference name="TopActivityIndicator" value="gray" />
    <preference name="GapBetweenPages" value="0" />
    <preference name="PageLength" value="0" />
    <preference name="PaginationBreakingMode" value="page" />
    <preference name="PaginationMode" value="unpaginated" />
    <feature name="LocalStorage">
        <param name="ios-package" value="CDVLocalStorage" />
    </feature>
    <name>YourProjectName</name>
    <description>
        Your project description.
    </description>
    <author email="[email protected]" href="http://revivalx.com">
        Mohammad Nurdin bin Norazan
    </author>
    <content src="index.html" />
    <access origin="*" />
    <feature name="Device">
        <param name="ios-package" value="CDVDevice" />
    </feature>
</widget>

Upvotes: 1

Related Questions