phonegap / phonegap-plugin-push

Register and receive push notifications
MIT License
1.94k stars 1.91k forks source link

Push Plugin registering on iOS 9 Devices but not showing Notification #216

Closed chumstech closed 9 years ago

chumstech commented 9 years ago

i installed this plugin and its working fine on iOS 8 devices but in iOS iPhone and iPad only registration is working and there is no notification neither in Background mode nor in Foreground mode of APP. Please help me to fix this

macdonst commented 9 years ago

@chumstech give me a reproduction scenario.

bottasergio commented 9 years ago

I have a similar problem. Works fine on Android. I have tested on iPad. Registration works because I get registration ID. But when I send notification it is not shown on device. I have implemented push plugin ( ) with Phonegap Build. I use PHP procedure shown in http://alfonsomarin.com/desarrollo-movil/tutoriales/ios-push-phonegap to send notifications. This procedure says that the notification was sent... but they are not shown in device...

( similar to https://github.com/phonegap/phonegap-plugin-push/issues/222 )

jvjvjv commented 9 years ago

OK, cool. I'm a bit new to reporting issues on GitHub, but I subscribed to this in the hopes that I'll receive notification when it gets fixed/closed. Also, if there's any way I can help out, I'm here.

vlaraort commented 9 years ago

I have a similar problem with an iPad 2 and IOS9 , it's unable to register. It works in an iPad 3 with IOS9

bottasergio commented 9 years ago

I can register but I don't receive notificarions. (iPad)

macdonst commented 9 years ago

Seems like folks are having problems with iPad's. Right now I don't physically have one but I will end up sourcing one.

macdonst commented 9 years ago

I have just tested this on an iPad Air 2 running iOS 9.0.2 and I can receive notifications when the app is in the foreground and background. Need more info on this issue in order to fix it.

bottasergio commented 9 years ago

@macdonst I use PHP procedure shown in http://alfonsomarin.com/desarrollo-movil/tutoriales/ios-push-phonegap to send notifications. This procedure says that the notification was sent. Would you please tell me how do you send notifications? Maybe the procedure I use is wrong and notifications are never sent. Is there any way to know if a notification was really sent?

macdonst commented 9 years ago

@bottasergio the PHP in that tutorial seems correct. I'm using Amazon's SNS to send pushes.

bottasergio commented 9 years ago

@macdonst Is it possible to use Amazon's SNS with PhoneGap Build?

bottasergio commented 9 years ago

I am having problems with iPad Mini MF432LL/A with iOS 8.0.2

macdonst commented 9 years ago

@bottasergio Yes, you can use Amazon's SNS with PGB.

Sadly, I don't have access to all the HW and SW versions but I'll see what I can do.

jvjvjv commented 9 years ago

Here's an odd question I'd like to ask.

Who among us are having troubles with iPad notifications and who aren't? Among those who are, is this a new iPad or one that you've had since iOS 8, or iOS 7?

Among those who are not having troubles, same question. Did you buy it new, or is it an iPad from last iOS, or two, or even three OS'es ago?

macdonst commented 9 years ago

My daughter has an old iPad 2 and if I can pry it out of her Minecraft playing hands I will attempt to test with it next week when I'm home.

bottasergio commented 9 years ago

@jvjvjv I am having problems with iPad Mini MF432LL/A with iOS 8.0.2. @macdonst I will really appreciate it!!!

Alexintosh commented 9 years ago

Hi guys, any news about this? I'm experiencing the same problem and I'm using this plugin in four apps.

bottasergio commented 9 years ago

No news... this issue remains active.

macdonst commented 9 years ago

Still can't reproduce but got approval to buy an iPad today which seems to be where most of the problems are coming from.

macdonst commented 9 years ago

I bought an iPad Air 2 this morning and upgraded it to iOS 9.0.2. Installed my test app on the device and was successfully able to register with APNS. Then I pushed messages to the device with the app in the foreground and background. Messages were received in both situations. I will try to post a video later.

Need some specific information on how to reproduce this issue as I'm not having any luck so far.

bottasergio commented 9 years ago

@macdonst I am having problems with iPad Mini MF432LL/A with iOS 8.0.2.

macdonst commented 9 years ago

@bottasergio understood but I don't have a that device or OS version to test. I have an iPhone 6+, iPad air 2 and a iPod touch running 8.4.1 or 9.0.2 for testing.

Alexintosh commented 9 years ago

@macdonst My situation is quite different: Both on iphone 4S 9.0.2 and iPhone 6 9.0.2 I can register the device on the APNS, I get the regId. Although the event "notification" or "error" is never received on devices with >= 9.0.

Everything works just fine on iOs 8.4

bottasergio commented 9 years ago

@Alexintosh What do you use to send notifications?

Alexintosh commented 9 years ago

I'm using baasbox, it works fine, I can see the apn targetting the right device but the plugin function

macdonst commented 9 years ago

What payload are you sending to the device?

Alexintosh commented 9 years ago

This is my payload: Payload={"aps":{"badge":0,"alert":{"loc-args":[],"action-loc-key":null,"loc-key":null,"body":"This is a test message!"}

I assume this is correct because as I mentioned before I can receive notification on iOs >= 8 <= 9.

Thanks for your commitment.

chumstech commented 9 years ago

My Problem Solved :-) there is no issue in Plugin its the issue of development and production Provisioning profile. because notification only sent to the devices by Apple Push Notification Service which have correct certificate and provisioning profile which we give in the form of .PEM file in server side code.

if anyone having such issue please follow the steps mentioned in this link http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1

Thanks

jvjvjv commented 9 years ago

OK that's great but my issue is not the same as yours.

One of my devices is receiving notifications, and the other isn't. They both are using dev certs and the server has a dev cert installed on it.

jvjvjv commented 9 years ago

@macdonst The person I'm working with sent me an example payload last night. Again, this payload works on my iPhone 6 at iOS 9.0.2, but not on my iPad Air. Same iOS.

It is:

{
  "aps": {
      "alert":"This is the example notification",
      "badge":1,
      "sound":"default"
    },
    "alertId":1539087,
    "gdsxPnrId":"24abcdf0",
    "segmentNumber":18
}

Simon, @chumstech may not be pleased that we've turned his issue into something much larger. Would you like to spin this off into a separate ticket, and bring along others for the discussion, or shall we ask him to unsubscribe from his own ticket so he stops getting the emails about it?

vlaraort commented 9 years ago

I tested again today, with the same IPad, same OS version, same certificate and same source code, and today it works. Really weird.

karvapallo commented 9 years ago

@jvjvjv Check with the offending device plugged in that both Push Notifications are enabled and Background Modes -> Remote notifications are enabled.

screen shot 2015-10-28 at 14 01 36

I had reinstalled the iOS platform via cordova platform remove ios && cordova platform add ios and somehow after doing this, my iPad which was initially compiled with those settings enabled, still worked with the push notifications, but the new iPhone I just started testing out, did not. So double check these settings just to be safe.

bottasergio commented 9 years ago

@jvjvjv Where did you enable "Remote notifications"? I can't find that option in DEVELOPER page (https://developer.apple.com/): Certificates, Identifiers & Profiles -> "Setup and configure services for this App ID"

clarklight commented 8 years ago

I am wondering if you guys are still having this issue, i am also facing the same thing. The Ipad mini retina does not buzz, it doesnt receive anything. But on my php script it says Message successfully delivered 122. I am not sure what 122 is, there is no APNS documentation for that.

When it was on IOS8 it worked, and i am not sure if it is because i updated to IOS9 or something with cert. problem that i changed, as some said it has to work on Production APNS cert to work??

Taewa commented 8 years ago

Hello guys. I tested with 4 iPhone.

  1. iPhone 5c (iOS 8.1)
  2. iPhone 5s (iOS 8.1)
  3. iPhone 5c (iOS 9.2)
  4. iPhone 5c (iOS 9.2)

I coud get push notification with 1,2. And no push notification with 3,4. I assume this is a problem of OS version.

All devices could get device token.

When I get any push notification from APNS, I can see through (on xcode)

push.on('registration', function(data) {}

Those iOS 9.2 devices don't get any message through 'registration' event.

We checked if actually APNS sends any push notification to iOS 9 with Wireshark and yes, APNS sent to iOS9 just device doesn't recognize.

I am using ionicm and updated all cli, cordova stuff as latest. Reinstalled iOS platform and phonegap-plugin-push too. (it often resolves problem!) Checked iOS setting>notification. Still not working.

I don't know where to start debug.

Taewa commented 8 years ago

I resolved my problem. I am not sure if it's going to work for the others who have same problem like me but hope it's going to work.

  1. In xcode, when you open your project, click 'Project navigator' ( document icon on left top )
  2. You will see blue icon just blow which is your project. Click this.
  3. Then you will see a lot of field on the center of xcode. Find 'Capabilities' tab.
  4. There is 'Push Notifications' row and enable it. ( You may be required something but I simply clicked 'fix issue' button )
  5. Build to phone. ( Don't forget 'bitcode' setting for iOS9 )

In my case, it worked for iOS8, iOS9.

rkj1515 commented 8 years ago

:+1: I fix issue and getting push from GCM on iPad Check List:

1.Upload Valid certificate on Google

  1. Merge Individual certificate this 3.Download info.plist file from developer console and add a target application follow this

4.your payload should be like I am testing using REST Client

{ "registration_ids":["XX"], "notification" : { "body":"YOUR BODY" ,"title" : "Hello, world!", "sound" : "default" ,"icon":"default"}, "content_available" : true }

nhoctanker commented 8 years ago

current not working when build with adhoc or production on iphone 5 9.0

srameshr commented 7 years ago

@rkj1515 Why should content_available be true if I have no content?

andymurakami commented 7 years ago

I have the same issue. On the Xcode appears: 2017-04-01 08:14:26.374331 ofertas[1178:1169264] Notification received 2017-04-01 08:14:26.374608 ofertas[1178:1169264] Push Plugin key: content-available

But not show the notification on iPhone. The function on('notification' are called but, the notification does not shoed on iPhone.

What is wrong ?

lock[bot] commented 6 years ago

This thread has been automatically locked.