Reputation:
I am trying to enable push notifications on my cordava iOS application.
I am following this tutorial : Apple Push Notifications with PhoneGap .
The sample code on it works well but the problem is it uses and old version of cordova (2.1.0).
When i try to use the latest version 2.5.0 there are some problems.
1) There is no JSONKit.m/h class in the Cordova project. The pushnotifications plugin seems to need this class to work. However if i comment the line where this class is imported i solve the error of the non existing file. However i get some warnings...
2) After i ve commented the #import <Cordova/JsonKit.h>
line the pushnotifications work only when the application is on the background. If the app is on the foreground and i send a push , the app with crash.
Any ideas?
Upvotes: 3
Views: 3233
Reputation: 1750
Cordova 2.4+ doesn't have JSONKit.
What you should do is change this line :
#import <Cordova/JSONKit.h>
to
#import <Cordova/CDVJSON.h>
and it should work.
Upvotes: 9