IOS Serevr Push Notification For .Net or C# - ios

I am new to IOS and want to create a server push notification. I had created the certificates and provisioning profiles for development and it is working fine.Now I want to create same for production to upload it to app store.Problem I am facing is :-
1) I am not able to get choose certificate for distribution(i.e APNS certificate for production SSL) while creating provisioning profile.I am only able to get the normal certificate which I am creating.
2)For which certificate I need to develop .p12 file i.e for APNS certi or for Normal certificate.
3)If we are uploading app with a normal certificate how will the apple distinguish whether the app is for Push Notification or for normal uses.
4)For uploading app where to put .p12 file for server side.
5)How to develop server side for free notification sending.

Related

Parse notifications not working with AdHoc provisioning profile

I know this question has been asked a few times but I am still having issues after trying all the suggested fixes.
I have an app that is being tested through Apple's TestFlight of which a number of External Users have downloaded. The app was built using an AdHoc Distribution Profile against the relevant App ID which has Push Notifications Enabled for Distribution and has the necessary Apple Push Services certificate. I am using Parse and am able to receive notifications on my test device (signed with the dev certificate and APN push cert), however the external testers are not receiving any notifications.
I am using Parse and can see in the logs that the notifications are being sent so I am assuming it is something with the devices themselves related to a problem with the provisioning profiles. I also followed the steps to uploading a new .p12 file to my Parse server for production notifications.
However, it seems that only the builds with the development profile are able to receive notifications. Am I correct in assuming that this is because the certificate used by Parse to sign the notification doesn't match that which was used in the adhoc build? I.e. Parse is still using the old .p12 certificate?
When I uploaded the new .p12 file to my Parse server I didn't explicitly remove the previous .p12 certificate, do I need to do this? Would revoking the dev APN certificate solve this?
Any help is much appreciated.
Thanks
The reason notifications were not being received was due to the production flag not being set to true when I uploaded the production certificate to my Parse server. I re-uploaded the certificate setting this to true and notifications began to work.

Which certificate I should use when submit to appstore

I have confused which certificate I should use in order to make apple push notification available for my app when my app accepted in appstore.
I was able to send and receive notification when I run app from xcode , but people download app from appstore only can get access token , but the can not receive notification .
I have confused about certificate App ids , provision ... distribution ... production .... etc .
Which certificate I should convert it as .pem file in my server ?
Which certificate I should put it as provision file in xcode ?
Please note that any application run from xcode can get notifications , any application run from appstore cannot.
You should use your "Distribution Certificate" for Appstore upload.
As of now I hope for testing you would have used development certificate. But while you push your app to Appstore you will be using "Distrubution Certificate" for uploading your app.
Like wise you have to create a push notification certificate for distribution(if in case you have it already make use of it) and convert that to .pem file to your server. Now push notification should work fine for AppStore upload.

Do I need to send an update to iOS app if I create Push Notification certificates afresh?

I had an app hosted in my organization's internal app store. The app has Push Notifications feature.
The distribution certificate (In-House type) using which the app was launched to internal store expires in Feb 2017.
However, the push notification certificates for the app got expired on August 15th, 2016 but we forgot to notice and came to know about this only yesterday. The users are not receiving any notifications post August 15th.
I have created new push notification certificates at the Member Center, .p12 of which I have shared with the application server team.
My questions are -
Do I need to regenerate the In-House Distribution certificate for the app at Member Center now?
If the answer to question 1 is Yes, do I need to send out an update to the app for the users to start receiving the push notifications again?
Thanks!!
You don't have to make a update for App. If certificate is expired, just generate the new certificate for development and production. Upload those certificates p12 to your server.
Generate a new certificate and replace the old one.
When your existing APNS certificate expired, if your server still uses it - existing iOS applications will not be able to receive any notifications from your server. But as soon as you regenerate certificate and update your server to use it - everything will be normal again without any changes to already installed apps.
You need to regenerate the certificate from member center and you need to update your server with new .pem/.p12 file used for sending push notifications
You need to generate .pem file by using your .p12 follow this - Generate .pem file Used to setup Apple PUSH Notification
Once you have .pem update your server with new .pem that's all. Now you should get notification.
Here is the answer.
1) Create new push certificate and .p12 file. Replace new .p12 file with the old one at the server.
2) You don't need to send update of your app.
Hope this helps!

Push notifications not coming when we download the build from testflight or diawi iOS

I have successfully created the .pem and .p12 file by
http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1
Tutorial.
We are using java as a server so I also exported my .p12 key using this link as there was an error of directly exporting the .p12 file
Cannot send push notifications using Javapns/Javaapns SSL handshake failure.
Everything is working great in debug mode. Whenever I install a build by xcode I receive the push notifications successfully everytime. But after archiving and uploading the build on testflight or diawi and then installing it on the device I didn't get any push notifications. I am successfully getting the device token from apns server. On debugging at server side we found that the device token they receive and send the notifications is invalid. This response is sent by the apns server to our java server. . I am using Xcode 6.0 or later and my app is compatible with ios7.0 or later. And yes I have made checks in registering for remote notifications for ios 8 and 7.Has anyone has faced this issue because earlier in xcode 5 series this hasn't happen. Please help
Any help will be appreciated. Thanks
If you followed Ray Wenderlich's tutorial and you made everything work in development mode, the issue most likely comes the fact that you now need to create a new .pem-file for production mode.
So, you need to perform exactly the same steps that you did with the development certificate (i.e. the .p12-file) you downloaded once more with the production certificate which you can obtain in the iOS dev center as well:
Here is the quote from the tutorial that you probably overread:
If you’re ready to release your app to the public, you will have to
repeat this process to make an Ad Hoc or App Store distribution
profile.
1.)Check if the pem file you have stored on your server is created by using a development certificate or distribution certificate, for push notifications to work through ttestflight you need to create a pem file in the distribution mode,
2.) also check if the gateway you are delivering to is gateway.push.apple.com:2195, and not the sandbox one,
3.)the notification tokens are also different for development and distribution profile, check all these scenarios and see
In order for push to work you have to use the exact same AppID for both creating APNs cert and Provisioning Profile. Wildcard profiles cannot be used for push notifications. May this be your problem(using wildcard or just different AppID for TestFlight/diawi)?

Push Notification Certificate

I have enable push and then created the distribution profile but not created push certificate, now i want to add push service in my app how can i do ??
if i create push certificate after uploading app on app store will this effect my live app.
i have followed following steps:
created distribution profile with push service enable.
i have not created push certificate and i have downloaded distribution certificate with push service enable flag.
uploaded app on app store (with push enable flag).
i have created pem file by my distribution profile (that is wrong one)
now my push notification is not working , i want to enable push services in my live app.
can i follow following steps for that :
create new APNS certificate for push service.
can we use this without resubmitting app to AppStore.
Or do i need to create new provisioning profile & resubmit app to appstore?
Help us....
No, You need to add a APNS distribution certificate for the App you created in your Developer account. Create push notification certificate (prod.pem) and pass to your backened.
It will work, no need to submit again.
Follow this link to create pem certificate.

Resources