We have a Cordova app and are upgrading from Cordova 4 straight to version 6.1.1. In the original project we have the plugin com.pushwoosh.plugins.pushwoosh (version 3.4.2) and this has been redirected to pushwoosh-cordova-plugin (version 4.2.2).

The upgrade has gone OK except that we are receiving deprecation warnings such as:

/Users/JeremyB/engage-ui-cordova-upgrade/platforms/ios/Workplace/Plugins/pushwoosh-cordova-plugin/ios/PushNotification.m:279:45: warning:
      'enabledRemoteNotificationTypes' is deprecated: first deprecated in iOS 8.0 - Please use -[UIApplication isRegisteredForRemoteNotifications], or
      -[UIApplication currentUserNotificationSettings] to retrieve user-enabled remote notification and user notification settings
                type = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];
In module 'UIKit' imported from /Users/JeremyB/engage-ui-cordova-upgrade/platforms/ios/build/emulator/include/Cordova/CDVAvailabilityDeprecated.h:20:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:193:1: note:
      'enabledRemoteNotificationTypes' has been explicitly marked deprecated here
 - (UIRemoteNotificationType)enabledRemoteNotificationTypes NS_DEPRECATED_IOS(3_0, 8_0, "Please use -[UIApplication isRegisteredForRemoteNotification...

I can't relate this back to any of our code in the app - seems to be in the plugin's code. We do seem to receive notifications but with no sound on IOS devices which have previously registered with the old app, but no registrations on new devices. Are there any breaking changes between 3.4.2 and 4.2.2 of pushwoosh that would require code changes, config changes, or build changes?

asked 12 Apr '16, 14:41
jbradshaw7's gravatar image


edited 14 Apr '16, 16:56

Our code that worked with 3.4.2 (of com.pushwoosh.plugins.pushwoosh) had this to get the pushNotification object:

var pushNotification = window.plugins.pushNotification;

Whereas now the docs suggest:

var pushNotification = cordova.require("pushwoosh-cordova-plugin.PushNotification");

If I try that though (after injecting cordova into my factory), I get an error that cordova.require is not a function. With the old code, I do get success, but no notifications are received.

(14 Apr '16, 16:54) jbradshaw7 jbradshaw7's gravatar image
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 12 Apr '16, 14:41

question was seen: 2,303 times

last updated: 14 Apr '16, 16:56