Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

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

Closed
chumstech opened this issue Oct 12, 2015 · 40 comments
Closed
Milestone

Comments

@chumstech
Copy link

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
Copy link
Member

@chumstech give me a reproduction scenario.

@bottasergio
Copy link

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 ( <gap:plugin name="phonegap-plugin-push" source="npm" version="1.2.3" /> ) 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 #222 )

@jvjvjv
Copy link

jvjvjv commented Oct 14, 2015

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
Copy link

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
Copy link

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

@macdonst
Copy link
Member

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 macdonst added this to the Release 1.4.0 milestone Oct 14, 2015
@macdonst
Copy link
Member

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
Copy link

@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
Copy link
Member

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

@bottasergio
Copy link

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

@bottasergio
Copy link

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

@macdonst
Copy link
Member

@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
Copy link

jvjvjv commented Oct 15, 2015

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
Copy link
Member

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
Copy link

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

@Alexintosh
Copy link

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

@bottasergio
Copy link

No news... this issue remains active.

@macdonst
Copy link
Member

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
Copy link
Member

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
Copy link

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

@macdonst
Copy link
Member

@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
Copy link

@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
Copy link

@Alexintosh What do you use to send notifications?

@Alexintosh
Copy link

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

  • (void)notificationReceived { is never called.

@macdonst
Copy link
Member

What payload are you sending to the device?

@Alexintosh
Copy link

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
Copy link
Author

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
Copy link

jvjvjv commented Oct 20, 2015

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
Copy link

jvjvjv commented Oct 20, 2015

@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
Copy link

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

@karvapallo
Copy link

@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
Copy link

@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
Copy link

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
Copy link

Taewa commented Jan 24, 2016

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
Copy link

Taewa commented Jan 25, 2016

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
Copy link

rkj1515 commented Feb 16, 2016

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

1.Upload Valid certificate on Google
2. 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
Copy link

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

@srameshr
Copy link

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

@andymurakami
Copy link

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
Copy link

lock bot commented Jun 3, 2018

This thread has been automatically locked.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests