Parse Push Notification iOS - ios

I had the Push thing done over with at Parse.com (It was working and all) and then I was asked to create an account on parse for the company and set them up so they can manage it on their own. Well, not realizing that there was a Export button on the website, I deleted the app on my account and created an account for them and added the app to their account. I added all of the correct Certs and updated the App and Client keys and it wouldn't send it,and On the Push Notifications tab, it will show that i have recipients (My test Devices) but when I hit send, it will say Done, but nothing will appear on my device. So, being not too smart, I deleted that app and recreated it on my account (Thinking there might be something wrong with the other account). Well now it won't even work on my account. I have created all new certs and everything and i can't figure out why it is not working.And again, On the Push Notifications tab, it will show that i have recipients (My test Devices) but when I hit send, it will say Done, but nothing will appear on my device. Help?
My thought about what it might be is that the device is remembering the APNS Permission from the old account, Could I be Right?

I ran into this a while back. For me it was the difference between developer builds and release builds. You'll see in Apple's provisioning portal that there are 2 push certificates you can set up for your app. One is for production release and the other is for developer testing. When you build your app for testing it automatically looks for the developer cert. When you do a release build it looks for the release cert.
So... Make sure you have uploaded the correct push certificate to Parse. In my case Parse would say that messages had been sent to devices but I never saw them come through because Parse was sending them to Apple with a certificate that did not match my particular build type.

Related

Push notification issue with Firebase in IOS 10?

I am using Firebase server to send Push Notification to Live App Store build. I in following situations:
I was getting notification some period of time and stop from day.
But, i am getting all Push on my iPhone(By App Store Build) but my clients not getting notification.
My Questions:
I got some Push on Device and stop now,Does it mean my .p12 certificates wrong?
2.I think i submitted build to App Store using Ad Hoc Provisioning profile this could cause issue to some devices to stop notification?
My server team using Python language to send Push something use of Lamda causing issue(Server Side)?
Is this DeviceToken/ FCM issue?
5.How to make work the notification to Live App Store build install by customer?
How to fix this? Any help will much much appriciated.
Generate new certificates, add them to firebase, fix them within the app ,submit new build.
1) The push certificate expires after a year. Have you been to the Apple provisioning portal to see if it is still valid? If not, regenerate new ones for use with the server. You do not need to rebuild the app.
2) There is only one type of build provisioning that can be submitted to the App store. You think Apple will not check what is being submitted? You cannot have submitted anything that is not intended to be submitted
3)How can we possibly speculate on your server code. If they changed something on the server then of course they could have broken something. Whats Lamba got to do with anything
4) If the push token becomes invalid and your app does not send the new one to the server then push would not work for whatever devices have stale tokens
5) How can this be answered when you have not yet determined the cause.
If push has suddenly stopped for every device then either the push certificate is invalid or the server code has changed and broken something.
If push has stopped for just some devices then its likely that either your app is not sending a new token to the server when the token changes, or it is but your server is ignoring it and using old tokens.
If push has never ever worked for an app store build (which you are positively sure is an app store build) then either your server is sending pushes on the sandbox environment and not the production environment, or apns is not enabled for production and neither your nor anybody in your company ever tested pushes with a production build and production push environment before submitting to the app store.

iOS - Parse Push Notifications, some Users wont receive push

I have currently set up Parse Push notifications. I am running a beta with a few of my friends, and it seems that I am the only iPhone is that able to receive push notifications. The badge increments, sound and message, all is there for me.
On the Push tab in Parse the "Pushes Sent" column shows "1" for pushes sent to my iPhone, and "0" for Pushes sent from my iPhone.
We are all using the same build. And all have set notifications on in settings.
Any ideas why this is happening?
First of all, as your app is in Development Mode you should register your friends UDID'S in the Apple Developer Portal Devices Section.
Once you have done that, you should generate a new Development certificate now including your friends devices so they are also signed to receive the same services as you.
Check out one more time the Parse Certificates Tutorial and make sure you are signing your app with the correct certificate and uploading the correct one to Parse Push Settings.
When installing the app please also make sure the certificate is the updated one and you are signing with it.
Hope it Helps.

Push notifications suddenly stopped being delivered in production

I added push notifications to one of my apps using Parse about a month ago, and it went through the review process fine and was pushed as an update through the App Store. Since then, everything has been going fine I've been using the REST API to send the notifications to all users.
Yesterday, I added push notifications to one of my other apps, following more or less the same process, and was able to get them up and running (while I have not yet submitted the update to the App Store, I have set up the production push provisioning profile).
Today, push notifications for the former app in production stopped working; the pushes successfully send through Parse, and they are delivered to my test device, but they are delivered to my test device only. That is, no production apps are receiving push notifications.
I suspect it is something to do with provisioning profiles, but I don't know how to fix it. I've looked around and everything I could find was related to production vs. development provisioning profiles for the app having the issue, which is not the case here since it was already working in production up until this point.
I have no idea how to go about finding the source of this issue (let alone solving it); any ideas?
So, I think you can probably make use of the Parse platform to check whether the certificate you exported is valid or not. If that's valid, that means that you don't have problem on the exportation.
Then, go check the the App ID you create in the Apple Developer Program whether it's enabled the production version and match the identifier you set in Xcode. In the same time, check whether the provisioning profile is from that App Id. If so, go ahead and open Xcode.
When you deploy to your test device, remember to change to the release mode instead of development mode. Also, better to change the code signing manually.
If the problem is still existing, I think you can probably delete all of your provisioning profiles in Xcode and do the process again.

Push notification for an app already in the store

I'm fairly new and this was the first time i submitted an app.
So i have an app thats already in the app store. I had push notifications set up and it work when i tested it for the ad hoc distribution using the production certificate.
I did another provisioning profile for the app store and submitted it. Strangely after the app got approved some provisioning profiles disappeared . After being in there for awhile they came back but the push notification setting was turned off even the production ssl certificate for push notif was gone.
Now, Push notifications are not working.
Tried generating another ssl cert and the whole keychain exporting stuffs but it still doesnt work.
I don't know if the app, submitted has the profile with the push notification settings on.
Is it possible to add push notifications to that app? If not what is my best solution here?
No if the App submitted has not been signed with a Push Notifications Profile , then you pretty much can't do any thing about it, You may have to resubmit an entire new Version with a different Provisioning Profile with Push Notifications enabled,
Did you check the server you are trying to connect to when you send the push notifications?
Remember that there are more than 1 server :
ssl://gateway.push.apple.com:2195
ssl://gateway.sandbox.push.apple.com:2195
ssl://feedback.push.apple.com:2196
ssl://feedback.sandbox.push.apple.com:2196
It seems that some migration script went wrong on Apple's server. Your best bet would be to contact Apple support and explain your problem to them. May be they can do something for you.
Even after creating a new push notification certificate you would not be able to enable the push notification for the app already present on app store. Since the certificate is regenerated, you would need to update your profiles too and then use them to prepare a new version for app store.
I think the problem was that the devices that i tried had the app built on them from xcode. Because it worked for other devices that i never used xcode with. After removing all the related provision profile from the device itself, located in the settings menu of the phone, reinstall the app from the store then it started to work.

How to test push notifications in iOS?

We have a live app which sends push notifications just fine.
New version of the app, not yet released - we want to test that push notification works, but it seems all we can test is that the service is working. This test version which uses the 'sandbox' doesn't actually send a push to a development phone ....
Is this right? Is there a way I can test this new version of the app AND receive push notifications to my device?
Been trying to crack it for several days now.
Thanks in advance!
Andy
You need distribute the Distribution version of your app using ad hoc.
When your application ready for submission, you create an ad hoc provisioning profile specifying an App ID that matches one or more of your apps, a set of test devices, and a single distribution certificate.
Here is an image to illustrate how the provision profile works:
You need to first test the app in isolation to check that is working, then when it is move on to testing the app and server in combination.
To test your app in isolation run it in Xcode and put in a breakpoint or NSLog to find out what the APN token is.
Then use the php script from here
http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1
using your APN token and credentials.
It should work, and it should work in the sandbox, if it doesn't then your app isn't correctly configured so work at investigating why it doesn't work until you can send it a push manually.
THen once you can send a push manually test you can send one using your server, if you can't then it must be due to a problem with the server as you have just confirmed the app is working. If the server isn't working its probably not using the credentials or applying the password to the credentials, something like that

Resources