How to test Push Notification is working in my application
Solution 1
Very cool guide is posted here: Programming Apple Push Notification Services
And an application named PushMeBaby Mac Os App which you can download and use for sending push-notifications to your devices from a Mac.
APNS will send the push notification to your device as soon as your device will become available. If I've not mistaken your device pings APNS every minute.
Solution 2
I tried all 3 of the above suggestions with no success. In case someone else is ends up here looking for a solution to this, I found this and it works great:
Pusher https://github.com/noodlewerk/NWPusher
Solution 3
If you want to support both Certificate and Token based authentication with APNS, then you can try Push Notifications
Solution 4
What about curl
:
curl -d '{"aps":{"alert":"This is a test notification"}}' --cert YourCertificate.pem:YourPassword -H "apns-topic: com.example.yourapp" --http2 https://api.development.push.apple.com/3/device/YourDeviceToken
First you need curl
with http2
support.
And you need to convert your push certificate to pem
format using openssl
.
Solution 5
You should try the the branch of PushMeBaby, it worked for me.
Related videos on Youtube
Naved
I have been working in IT industry since 2000. In my 20 years of experience, I have worked on Java, C#, C++, Android, Objective-C and VB. Currently, I am working as a Project Manager/Branch Manager in Unikaihatsu Software Pvt. Ltd. (Head Office in Mumbai, India and Branch Office in Indore). I am currently working on Java, Struts, IPhone (Objective-C) and Android technology.
Updated on July 09, 2022Comments
-
Naved almost 2 years
In my application I am implementing the Push Notification Service.
I have a Content Provider server, which contains some products in it.
I have generated the SSL Client Certificate and attached it to my development Provisioning profile. This profile is also added to my application.
I have written the code inside the delegate methods (guided by Apple guideline for implementing the Push Notification). All set.Now I want to test my application whether it is handing the push notification as per the requirement. Any idea on how can I test it would help me a lot.
Should I have to add new product to the content provider server to test this?If yes, how much will APNS take to send the push notification to my device?
-
Naved almost 13 yearsI am running PushMeBaby application, but it does not load the certificate causing not to send any push notification. I have added that certificate as guided in the tutorial, but still it is not working. any idea? Is the certificate for sandbox or production?
-
Nekto almost 13 yearsAs is said in tutorial - you should use for sandbox and input your device token in PushMyBaby.
-
Naved almost 13 yearsI did it so. I have added the certificate in resources using "Copy items into destination group folders" too. but still it is not working
-
Naved almost 13 yearsSolved: Mine certificate name was "aps_developer_identity-1.cer" and not "aps.developer.identity-1.cer". Thank you for your support.
-
Oleg Trakhman about 10 years+1 Worked for me too; Original PushMeBaby didn't send pushes from accepted answer
-
Viral Narshana over 7 yearsThis app worked for me. itunes.apple.com/us/app/easy-apns-provider-push-notification/…
-
shim over 6 yearsNote this appears to be a more recently updated version.
-
Dhruv Sangvikar almost 6 yearsThe only problem with NWPusher is that it will not support HTTP/2
-
Augusto Gonzalez over 5 yearsThis should be marked as the right answer. The app is soo cool. I was afraid I had to use node-apn, so I have to spend one day more debugging.
-
double-beep over 5 yearsWhile this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.
-
phil over 5 yearsvery straightforward for simple testing
-
Amarjeet Singh Rai about 5 yearsThank you! Very simple to do
-
jeet.chanchawat about 5 yearslink to "PushMeBaby Mac Os App" is dead