Adding push notification functionality to an existing app - iphone

Hey,
Is it possible to add push notification functionality to an already existing app?
Will it be possible if I have to change the appID?
I am asking this because I am about ready to submit my app, and currently don't require push notifications. In the provisioning portal I have already created default appID, with a wildcard Bundle Identifier.
I will however need the push notification service in the future - And for that I will need to use a non-wildcard Bundle Identifier. Will it be possible to easily change in the future? I prefer not to go through the push notification service certification right now.

You can not change the bundle id of your app (inside the info.plist and iTunesConnect). So choose your bundle id now currectly for later usage.
You can sign you app with other certificates (without wildcard) on an update.

Related

Push notification service that allows multiple certificates

I always used Parse for my applications and I cannot seem to find a service anywhere that allows for multiple apps to utilize one backend (multiple .p12s uploaded to utilize push app to app). Does Firebase, Kinvey, or any service not allow this yet?
push notification certificate create by Bundle ID,the bundle ID is unique about the app.so the push notification certificate can't allow multiple certificates.

Do i need create new certificates to update/upgrade a app in appstore?

I have a application in the appStore that use push notifications.
I've generated a new version of this app, and using the same certificates that I used the first time that I submitted the app in the market, I have submitted the update to appStore.
After approve the app, I've noticed the push notification doesn't work after updated the app in the devices.
Could be this wrong behavior done for using the same certificates than before???
Thanks in advance!
Updating an application using same certificates as before won't change the working status of push notification.
Maybe your problem is on server side and your push notification certificate is out of date and need to be regenerated. Push certificates have a validity of about one year.

Reusing a wildcard appId to enable push notifications

I have recently taken over an iPhone project and I have never used objective-c before.
I have to get the application to use push notifications, but the first appId is already live and uses a wildcard (so no push notifications).
I created another appId with an identifier and got push notifications to work.
However my workplace would like me to get notifications to work for the wildcard app (since we already have lots of customers using that app).
So how can I make the wildcard app update and use a unique identifier without creating a new appId (even with the same bundleId).
I am very new to all of this, so a step by step process is greatly appreciated (ELI5).
For reference I used keychain to get the private .p12 file and I use that on a windows server that runs a console app that generates the push notifications (sent to Apples apns server).
EDIT: I have done the following steps, can someone tell me what im missing?
1) Create new bundleId (using the same AppId).
2) Configure that AppId to use push notifications.
3) Create the CSR in keychain.
4) upload that to the portal and create a production cert.
5) Download that cert and export the private key.
6) Create a provisioning profile using the same bundleId as 1 (e.g. au.com.website).
7) Download that provisioning profile, put it in x-code and on my iPhone device.
8) In the build settings of x-code use the bundle Id and use the provisioning profile I created in step 6.
9) Archive the app, deploy by ad hoc, save the file to the desktop.
10) put that file in TestFlight, download the app from testFlight on my iPhone.
11) put the private key on my windows server and send the push notifications (they send w.o errors).
I don't get push notifications (the iPhone is set to revive them).
Once again this is working with another appId someone else made, so I know the code works.
Do not confuse the app identifier and the bundle identifier. The bundle identifier is something like: com.company.appname and is defined by an app's info.plist
The app identifier has an additional prefix (usually the team prefix) and can be containing wild cards. The app identifier is used to match bundle identifiers to provisioning profiles. A profile is only valid for that app that matches (excluding the prefix)
Now what you want is to keep the bundle identifier the same, because if you change that it becomes a new app. But you can change the provisioning profile and app identifier with every update.
I was in a similar situation a while ago when I had published an app with wildcard app id and I added an IAP to it.
You just create a new (non-wildcard) app id that matches the bundle id.
You enable the Apple services (IAP, GC, APNS) you require on the app id.
You create new provisioning profiles to suit your needs (App Store, Ad Hoc, Development)
You can then submit an update for your app with the new profile but unchanged bundle id.
As far as I know, what you ask is not possible.
https://developer.apple.com/library/ios/#documentation/ToolsLanguages/Conceptual/DevPortalGuide/CreatingandConfiguringAppIDs/CreatingandConfiguringAppIDs.html#//apple_ref/doc/uid/TP40011159-CH18-SW1
Here is an older question, that may have an answer...
Updating live App ID for Push notifications
For Push Notification an appId is must.
For a step by step process Use the two part tutorial of raywenderlich. Hope this will help you.

Push Notifications on existing app. Trouble with certificates

I'm working on a large app. In the middle of development we decided to add push notifications. I created a new App ID in the Apple Developer Site.
The App ID is: 8NG823UBLP.com.mobiikk.ServicioDeAdministracionTributaria
Push is enabled for Production and Development.
Certificates were downloaded for both and the .p12 created too.
.p12 files are on the server and everything looks good on server side but the app is not receiving push notifications.
The app is granted push notifications and they are set to ON in settings.
The bundle ID was changed to com.mobiikk.ServicioDeAdministracionTributaria in the info.plist
The team has been looking for an answer for this without any luck. Help will be very much appreciated.
If you switch on notifications for existing app, you'll have to recreate the provisioning profile (better clear old profiles from Xcode organizer and then refresh them or shut down xcode and replace them via iphone configuration utility - be sure to get rid of older provisioning profiles)(you can still keep the same old appID, just refresh that AdHoc/Enterprise/AppStore profile - it contains note about being APNS-enabled)
Otherwise your serverside may look great, but app will never get successful notification of registering your device and could not pass token to your server side ,
but you would get failure notifications warning you about wrong entitlements and missing APNS profile in device console log
As you did not state what are you doing in the app side it's hard to tell where is your problem exactly.
Just in case someone has the same problem. The only way around this was to create a brand new project. I copied every file in the old one to the new one. Gave it a new Bundle ID, created a new provisioning profile, new App ID, and downloaded new certificates. So in summary, there was no easy way to transfer an existing project to one that accepted push notifications.

Push notifications work for Ad Hoc, but not when downloaded from the Apple store

My app just got approved for the apple store. I downloaded it an installed it on my iPhone - but it looks like push notifications are broken!
I was successfully testing push notifications in production using an adHoc provisioning profile. I had no problems. The only thing I did differently when I submitted to apple was using an app store distribution profile.
The application never asks me (or anyone else who has downloaded it) if I want to receive push notifications. Consequently, the phone never talks to my server to send the push token (because application:didRegisterForRemoteNotificationsWithDeviceToken: is presumably never called). Also the application does not appear in the settings app under the notification settings.
What could I be doing wrong??
EDIT: While the app was awaiting approval, I was having some trouble generating my production push certificate. Could this be relevant?
Problem generating APN SSL certificate after submitting to apple store
Be sure you've created your production App ID and have enable push notifications upon it. Then create the provisioning profile for that app. Download and open the file with a text editor to MUST make sure that the profile contains this key and value:
aps-environment
production
If not, then make sure you really have enabled the app ID for production push before you generated your provisioning profile.
After you make your build, you can check the final build to verify it has the aps-environment entitlement (you're looking for the aps-environment code signing entitlement under "Internal requirements):
codesign -dvvvv --entitlements - MyCoolApp.app
Did you use the same Application ID for both the ad-hoc and the distribution mobileprovision files? It needs to be a complete identifier, rather than just partial.