navigator.notification.alert() is working in Android but not in IOS (Phonegap)

1,431 views
Skip to first unread message

amit kumar Sinha

unread,
Dec 5, 2013, 8:06:39 AM12/5/13
to phon...@googlegroups.com

Folloning code is working in android but not in Ios through phone gap? Why


  function btncancelprofclick() {

document.getElementById('user_loged_in').value=1;

     localStorage.user_loged_in = document.getElementById('user_loged_in').value;

var flage=document.getElementById('checkout_account').value;


if(flage==1)

{

$.mobile.changePage("#dialog-box");

}

else

{

                

    navigator.notification.confirm(

             'You have not completed your profile',

            onConfirm,

            'Note',

            'Shop Now,Complete Profile'

        );   

}

function onConfirm(button) {

 

           if(button==1)

    {

                }


}

Thanks

Raj

Richard Ortiz

unread,
Dec 8, 2013, 2:01:59 AM12/8/13
to phon...@googlegroups.com
Did you make sure to install the NOTIFICATION api on both IOS and Android platform? Check your config.xml and make sure the feature is included.

<feature name="Notification">

        <param name="ios-package" value="CDVNotification" />

</feature>

Charles Bourasseau

unread,
Dec 9, 2013, 10:41:54 AM12/9/13
to phon...@googlegroups.com
Same problem here.

$ cordova plugin add org.apache.cordova.dialogs
$ cordova prepare ios

Then start xcode5 and deploy to the ipad (ios7).

I get this error in logs:
  1. 2013-12-09 16:36:02.280 Pidoco[357:60b] CDVPlugin class CDVNotification (pluginName: Notification) does not exist.
  2. 2013-12-09 16:36:02.281 Pidoco[357:60b] ERROR: Plugin 'Notification' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
  3. 2013-12-09 16:36:02.282 Pidoco[357:60b] -[CDVCommandQueue executePending] [Line 127] FAILED pluginJSON = [
  4.  "INVALID",
  5.  "Notification",
  6.  "alert",
  7.  [
  8.    "J",
  9.    "Alert",
  10.    "OK"
  11.  ]
  12. ]

The plugin is defined in the config.xml and everythig seams to be ok in the project.

Charles Bourasseau

unread,
Dec 9, 2013, 11:43:54 AM12/9/13
to phon...@googlegroups.com
Now I get this error:

Undefined symbols for architecture armv7s:


  "_AudioServicesPlaySystemSound", referenced from:


      -[CDVVibration vibrate:] in CDVVibration.o


ld: symbol(s) not found for architecture armv7s


clang: error: linker command failed with exit code 1 (use -v to see invocation)

AlejandroH

unread,
Mar 26, 2014, 1:15:03 PM3/26/14
to phon...@googlegroups.com
I have the same problem. Plugins is configurated in ios config.xml

 <feature name="Notification">

       <param name="ios-package" value="CDVNotification" />

   </feature>


This you solved this issue?
Reply all
Reply to author
Forward
0 new messages