I am urbanAir for push notification,but i am not getting notification when I placed app on store for approval - iphone

I am us urbanair for push notification ,I tested application on developer profile it was working fine but when I used distribution profile ,now I am not getting any notification though chrone job is running on server

You must create a new app (on Urban AirShip) that contains a new Application Secret key.
You must also remember to replace the secret keys in the code of the Release build.
You also must upload the Distribution Certificate you used to sign the Release (App Store version) build.

Production (Ad Hoc & App Store) and development binaries require different APNs certificates. You may need to change your certificates.

Related

apple push notification not working in production

We are totally stucked, please help.
I and my team made a iPhone application, and this is the first time we try on iOS.
Everything is fine, until we submitted our app and became available on app-store -- the push notification service is not working. I searched around the web and tried double check on our app by people's advices, but I couldn't find what's wrong. so this question is posted here.
These are what we did:
We build the application, suppose it's named "AppMaster".
We created AppId on iOS Provisioning Portal called: "pushtest". This ID enabled the Push Notification on both development and production.
We created a Provisioning for development named "AppMasterPushTest" from the appId above. This provisioning is for inside test, everyone of the team installed it on their mac.
Our server is implemented by Java and we used the java-apn package. during the test, We downloaded the certification file for development and write out the .p12 file, and pushed our message to the "sandbox" server by using the package's api -- withSandboxDestination() with that .p12 file. test goes fine, notifications are received.
I thought we were ready, so we created another AppId called "AppMaster", and enable Push Notification only for production. This Id is written in the app's bundle identifier.
We made another Provisioning for production named "appMaster" from AppId in step 5, with distribution method set as "App Store". downloaded it and rebuild app. This one was submitted to apple, and goes alive on app-stroe.
Server side, We downloaded the certification for production and write out the .p12 file again. and made program to push message to production server by using the api -- withProductionDestination(), with the .p12 just been write out.
We installed the app from App Store. sadly, the notification was never delivered.
Is there something we missed? BTW, the id we created in step5 was looks like "XXX.com.company.appname", but in the app's bundle identifier, we just set "com.company.appname" part without prefix. is this could be the problem?
any idea is welcomed.
please be our saver. thanks.
The comment above is incorrect. The app ID has a prefix before the bundle ID :
An application ID consists of an application’s bundle ID prefixed with
a ten-character code generated by Apple. The team admin must enter the
bundle ID. For a certificate, it must incorporate a specific bundle
ID; you cannot use a “wildcard” application ID.
You should check your provisioning profile, to make sure it contains the correct aps entitlement :
Verify that the entitlements in the provisioning-profile file are
correct. To do this, open the .mobileprovision file in a text editor.
The contents of the file are structured in XML. In the Entitlements
dictionary locate the aps-environment key. For a development
provisioning profile, the string value of this key should be
development; for a distribution provisioning profile, the string value
should be production.
You should make sure you are using production device tokens when sending push notifications to the production APNS server (device tokens that works in the sandbox environment don't work in the production env).
You should have tested your app with an AdHoc provisioning profile prior to releasing it to the app store. The AdHoc profile works with the production push environment.
EDIT :
Some quotes regarding device tokens :
From the Local and Push Notification Programming Guide :
Take note that the device token in the production environment and the
device token in the development (sandbox) environment are not the same
value.
From Technical Note TN2265 :
Handling Malformed Notifications
The simple binary interface drops the connection if the push service
receives a notification that is incorrect in some way. Your provider
may see this as an EPIPE or broken pipe error in response to sending a
notification. On the other hand, the enhanced binary interface will
send an error response with more detailed information about what was
wrong with the notification before dropping the connection. Be sure
your provider catches and handles these conditions properly.
The most common problem is an invalid device token. If the token came
from the sandbox environment, such as when you are testing a
development build in house, you can't send it to the production push
service. Each push environment will issue a different token for the
same device or computer. If you do send a device token to the wrong
environment, the push service will see that as an invalid token and
discard the notification.
Finally, this article has a good explanation of how sending multiple notifications to Apple when some of the notifications are invalid (the most common cause being invalid device tokens), can cause some of the valid notifications not to arrive as well.

Sandboxed APNS environment & .mobileprovision file

Anyone know the details of .mobileprovision file? I have an app which I want to point to sandbox APNS environment, I believe I need to create a .mobileprovision file for sandbox environment. Do all the devices which will use my distribution build needs to install some provision profile in order to receive the Pushes from sandbox APNS environment?
You need to have a separate development and distribution certificate for you push server as well as signing the app with different development and distribution certificates that are associated with an appID that has push notifications enabled.
Note that if you are testing (Ad Hoc) then you also need a distribution certificate specifically for ad hoc distribution (you can generate this from you apple developer site).
Finally, this guide helped me create the certificates I needed for my push server.
http://code.google.com/p/apns-php/wiki/CertificateCreation
Also, here is the apple developer page talking specifically about the different certificates required for sandbox and distribution builds for push notifications:
https://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ProvisioningDevelopment/ProvisioningDevelopment.html

Provisioning Profiles + Push Notifications + Production vs Development

I'm building an iOS app that uses push notifications, and I'm finally ready to submit it. Before I do, I'd like to test out push notifications off the Production server, to make sure everything is working correctly. Thus far, the sandbox environment has been working fine.
After doing quite a bit of searching, I learned that switching the servers over from ssl://gateway.sandbox.push.apple.com:2195 to ssl://gateway.push.apple.com:2195 wasn't enough, and that production push tokens are different from sandbox push tokens. Instead, apparently I need a new provisioning profile with Production entitlements, new certs installed on my server, and to re-build my app with said profile so that it knows to create the correct push tokens.
So, after going through all the steps, I can't even make a build run on my phone; XCode says
This profile cannot be installed on devices
Here are the steps I've taken. If I'm missing something please let me know:
In my iOS Developer Center, I've made sure that my AppID is "enabled for production" under the Apple Push Notification Service.
Also in my iOS Developer Center, I've created my Production Push SSL Certificate, gone through the necessary conversion steps, and installed the resulting .pem on my server.
Per the instructions, I've create "a new provisioning profile containing the App ID you wish to use for notifications." I've done this by going to Provisioning, and clicking on the "Distribution" tab, and making a new profile. I've confirmed that "production" is set under the "entitlements" section of this profile.
I've selected the provisioning profile in my project settings. I get the message
This profile cannot be installed on devices
and I'm stuck.
Build an ad-hoc distribution version of your app, and install it on your own device. That will use the production APN gateway and certs.
You cannot install an app compiled with a appstore distribution (production) profile on a device. Only Apple reviewers can do that. you can only test push on an app compiled in development mode and using sandbox server.
If you want to test production servers, you must compile the app using an AdHoc distribution profile enabling the devices you want to do the test. Clearly you must recompile and the send the app for review using the App Store distribution profile.

Push-Notification works on develpoment but not on production

So we have a problem with our app. We put push-notification in, and it works flawlessly in development. Then, once we got on the app store push no longer works. By looking at our server logs it looks like the the registration call is failing and not getting a device token.
Has anyone encountered this before?
Cheers,
Did you create a production push notification SSL certificate? This is most frequently the cause. Applications signed with a development provisioning profile will not work with a production push SSL cert and applications signed with a distribution provisioning profile will not work with a development push cert.
Also, you can create an ad-hoc distribution cert and use this to test your distribution provisioning profile. Since you can't run the build you send to Apple for distribution, I'd strongly encourage you to make an ad-hoc distribution build and confirm that push notifications work in that installation.

Not Receiving Push Notifications

previously i had configured my app id for development push notifications it was working fine.
But now i have changed my appid and i have followed the same procedure as stated in the apple docs and i have put newly generated .p12 file on the server side but i am not getting the push to my device now.
i have a doubt for an apple id i generate both development and production ssl certificates and in programme portal both environments shows green balls.
i have created development provision profile after doing as said above. in the sever side do i need to point to production ssl or development ssl for testing.
can anybody have any idea about this
It depends which server are you contacting.
If you are testing on the development side, you have to send requests to the sandbox (gateway.sandbox.push.apple.com) using the appropriate SSL certificate and the appropriated Device Token.
If you are on production/release mode, you have to use the correspondent info.
Another thing that you have to keep in mind is that, for each certificate you have to register your device for push notifications, and if you change the provisioning profile, you have to do everything again, because the Device Token will be different.
Cheers,
VFN
Make sure that the device which you are testing doesn't have both the development profile and the distribution profile. Only distribution (adhoc) profile must be there.