title: apple push notification not working in production
body: <p>We are totally stucked, please help.</p>
  
  <p>I and my team made a iPhone application, and this is the first time we try on iOS.</p>
  
  <p>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. </p>
  
  <p>These are what we did:</p>
  
  <ol>
  <li><p>We build the application, suppose it's named "AppMaster".</p></li>
  <li><p>We created AppId on iOS Provisioning Portal called: "pushtest". This ID enabled the Push Notification on both development and production. </p></li>
  <li><p>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.</p></li>
  <li><p>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. </p></li>
  <li><p>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.</p></li>
  <li><p>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.</p></li>
  <li><p>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.</p></li>
  <li><p>We installed the app from App Store. sadly, the notification was never delivered.</p></li>
  </ol>
  
  <p>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?</p>
  
  <p>any idea is welcomed.</p>
  
  <p>please be our saver. thanks.</p>