Testing push notifications on iPhone (APNS) - ios

I have uploaded my SSL certificates to my project, focusing on the aps_development.cer.
When I launch my app, I get prompted asking if I want to allow notifications, so that is working properly. It's that the actual notification is not passing through.
My server appears that it is able to send a notification, and I am sending it to my device token.
I'm assuming it might be something with my code signing in Xcode. Is there something different I should be doing?

Preparing your app for push notifications is a long task. With the information your are giving it is not clear that what you are doing wrong.
When I look at it at first I see that no provisioning profile selected. You can't send push notifications without selecting appropriate provisioning profile.
Also what about your pem files and other stuff like gateway url etc?
You can follow these instructions to make push notifications work.

Related

iOS Notifications are not receiving that are sent from the server

First of all may be it will be a duplicate question, but due to curiosity I have asked.
I have an application in which push notifications are used, I have prepared, created all the required things for it and at last I have checked the notifications on this link: https://pushtry.com/. All are working well. NOw the problem is that, when admin wants to send the notification from their admin panel the push notifications are not receiving in iOS device.
I have update all the necessary certificates, pem files, methods for iOS 10 etc, but I don't get received the notifictions from admin panel, as per backend, when we send notifications it shows notification send successfully and showing no error for it. I don't know whats wrong going.
Any sugesstions....
First check all the validations or verifications like certificate, pem file and other things are updated on iOS and backend side. This will ensures that nothing error or fault at both ends.
Now reinstall the app in iOS, Clear all notification ids or apns token table from database. On installing the app, you will see there are few apis token available. Now open your admin panel and test again, it will works correctly.
Firstly I want to confirm which certificate you are used for the app developer or distribution.Because there are different ways for sending the notification for both(developer or distribution). Like I am using php services at backend.When I am using developer certificate my backend developer used 'ssl://gateway.sandbox.push.apple.com:2195', $err,
and when I used distribution certificate he used
//'ssl://gateway.push.apple.com:2195', $err.
Thanks

Cant get QuickBlox Sample Modules to work in iOS

I managed to get the SimpleSample Message to work in Android, but cant get it to work in iOS. I am using the injoituser1 and created a provisioning profile incl. APNs. I dont get error messages in the Console, but when I activate the app only the QuickBlox SplashViewController.xib with a spinning loading wheel appears. Same happens withModuleLocator`. It asks for permission to use my location and then only the SplashViewController.xib appears. Had someone the same issues? What could be wrong please?
You can choose what kind of push notification you will generate: android or ios. To send push notification, go to Admin Panel / your App / Messages and choose APNS or GCM. It sends push notification to all ios or all android users, not both. Also you can add tag for group of users you want to send push notifications.
The SimpleSample Message also shows how to send push notifications from user to user.
For correct work of push notifications on QuickBlox:
It doesn't work on simulator.
You must create application in Admin Panel and put your APNS or GCM certificate in: "yourApp/Messages/Settings/".
Put your app credentials from Admin Panel to AppDelegate.
You should have provisioning profile/certificate with enabled Push notifications.
Good luck!

iOS 6- APNS issues

I have implemented APNS in my iOS application project (by following Ray Wenderlich's tutorial).
After installing app on my device I am getting an alert that "AppName" would like to send you Push Notification". press "OK" or "Don't allow". I pressed OK.
Now after running code I successfully get device token and then send that device token to my server.
The server guy is saving my device token and sends me a push message, and then he is getting message message sent successfully, but my device is not receiving any message.
It's really becoming difficult for me to figure out where I am going wrong. Some say your certificate might be corrupt. If my certificate is corrupt then how is my app getting a device token?
I am using iPhone3GS(iOS6) device (I know it's really old model).
I have been trying to figure this out for more than a week, but no success.
So guys I need your help to figure where I am going wrong.
Thanks
The app doesn't use the certificate in order to register to APNS and get a device token. Only the server uses the certificate. Therefore it is possible the certificate is corrupt or expired.
It's also possible the server is trying to push to on push environment (sandbox or production) while the app was built with a provisioning profile that contains push entitlements for the other environment.
In addition, make sure the certificate being used by the server belongs to the same push environment that the server is connecting to.

I need to test if I have registered for push notification correctly and I receive remote notification

I need to test if device token is received properly (if registration is successful), notification is received and badge count is updated in simulator. I know that we cant use push notification from simulator and check if badge count is updated from simulator. But my question is, will I be able to test by connecting with my device and debug from Xcode. Or Is there any other way to check before giving a beta test.
I have got the development and distribution (ad hoc) provisioning profiles.
I checked if push notification is enable in these profiles.
I use development to debug from simulator using device.
I followed all the steps required to set push notification from app side.
Is there a way to send notification manually and check if its received properly. Since the changes in the server are not yet completed I need to check it from app side.
Somebody please help me out.
Thanks in advance.
Yes, you can connect your device and debug from Xcode. You'll be able do see if the registration to APNS succeeded or failed based on the callback method being called (either the one that returns the device token or the one that indicates an error).
However, you can't send a notification without the server side. Well, technically you can, but it will be as complicated as implementing the push at the server side (you'll have to establish a TLS connection with APN server and send a notification in the binary format that Apple expects), and probably more complicated, since you'll have to implement it in Objective C.

Push Notifications are not received sometimes

I have this strange problem with iOS Push Notifications:
I configured my server to send push notifications, yet sometimes they are not delivered.
In order to get them back to work on a specific device, I have to turn OFF the Wi-Fi and switch it back ON. After that the message is received.
I'm still trying to put my finger on that issue, without luck.
More Info:
1.Server is working in sandbox mode.
2.Development certificates are in use.
3.Other notifications still works while mine won't (Facebook, Whatsapp).
In my theory, there are some differences between test APNS server, and real APNS server.
I do not think that is your problem.
Log something after send a message to APNS server
Try to take off the sandbox and set it to false.
Check your certificates.. if you have ad hoc certificate, notifications will only work when you create an IPA and install it on your device. Or if you download the app from the applestore.
Another issue can may cause your problem is the Data traffic.
If your phone does not have internet unless it connects to wifi, the device doesn't recive the push notification until it is not connected to wifi.
Hope it helps.

Resources