Push notification for an app already in the store - ios

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.

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.

Enabling APNs in iOS app after it was created

I am developing an iOS app which uses Push Notifications. I recently uploaded the first version to the App Store and I have turned on the Push Notifications in the Application Services in the app's App ID in Apple Developer Console. It says "Configurable" now. After that I got an email from Apple with a warning:
Missing Push Notification Entitlement - Your app includes an API for
Apple's Push Notification service, but the aps-environment entitlement
is missing from the app's signature. (...)
Then I found out that in XCode, on the Capabilities tab I need to enable Push Notifications. I did it, then created a new version and uploaded it, then I didn't get such a warning. Looks promising so far.
My problem is that I don't quite know where are the certificates for the APNs. I am using Firebase Cloud Messaging which requires to upload a development and a production certificate.
The internet is full of ways to create these certificates manually. Although Apple says always that XCode can do it automagically, which I'd prefer too. I just don't know where those are and whether created or not yet.
In Apple Developer console, I have two certificates created when I uploaded the first version of the app: a development and a distribution certificate. If I click on the APNs Auth Key, there's nothing displayed (not sure if it's a problem)
What do I need to do to automatically generate (or just find if done already) the certificates by XCode?
Any help is really appreciated.
For Push Service you have to create certificates manually and upload them to Firebase Console.

Push notifications works fine in development, but device not getting notification in production

Ok, so I have an app that is in the app store. In development everything works fine I get all of the notifications that I send. I should mention that we are using Firebase for analyics and push notifications as we have a iOS and Android version of the app. Firebase account has both the correct development and correct production apns cert, the app's capabilities are set correctly to include push notifications and remote notifications in the background.
In the organizer window the entitlement for apns-environement is set to production whenever uploading to the app store or when exporting the app. Whenever the app is first installed and ran the alert to allow push notifications is shown. So my apns certs have to be configured correctly.
I am a working on contract for this company, just started 3 months ago, I would hate for these people to look at me in a bad light but I really don't know where the issue is. I am also using Xcode's automatic code signing option, with the correct provisioning profile and developer account signed in the Xcode on this mac.
Just went through this and I do not know if you solved this,
I turned push off and deleted the certs from apple dev center and created them all over again and this made everything work as it should.
I also had this line of code set to,
FIRInstanceID.instanceID().setAPNSToken(deviceToken as Data, type: FIRInstanceIDAPNSTokenType.sandbox)
I will change it to .prod when I push to the app store.

change ssl certificate for push notifications for active apps in App Store

I have two apps in App Store. When I published the app, push notifications were active but currently, however they are now not active as I am unable to receive notifications in apps which are downloaded from stores. So I thought of revoking the certificates and then make new one for both of the apps.
So I had a question in mind if this will have any effect on provisioning profile or not ? Do I have to download the profile again?
Do I have to resubmit the app or simply putting .pem file on server will do the act?.
Need some guidacne. Thanks.
You can revoke the old certificates and make new ones. That will be fine with this. And make sure you check the Push Notification Configurations for them. Resubmitting the app wont be needed as everything regarding Push notifications is handled through certificates and your profile.
For safety and remembrance, download the newly made certificates onto your machine and stote them safe.
Other than the new changes in certifications and push notification confidurations, this will not have much major change on your profile.
Hope this helps.

iOS -Urbanairship push notification on production not working

I'm trying to implement push notification for an iPhone app using Urbanairship.
So, when I'm using ad hoc build (which is a different cert file), when I go to settings > notification, it is showing up there just fine.
However, with the app version that I put up on iTunes, I don't see my app name when I go to settings > notification. Neither did I get the popup that says, "Hey this app is going to send push notification, allow or disallow".
The only thing I can think off that might cause it is that, while in review, the SSL certificate expired. We have renewed that, but still no luck.
According to this link, How do I renew the SSL certificate for my ios push notification provider?, I don't have to resubmit. Or do I?
Thank you,
Tee
You need to create and issue a Production push cert. Then upload that to urban airship, and switch everything to use that cert for production mode.

Resources