Easy APNS Apple Push Notification Service using PHP & MySQL

31Dec/090

Installation: Production vs. Sandbox

Once you are successfully receiving registrations in your `apns_devices` MySQL table, you will need to make a manual change for devices that you wish to use your development certificate. By default all registered devices will have their 'development' column set to 'production'. This tells Easy APNS to use Apples production SSL and to load your production certificate.

So if you are using your development certificate here is what you will need to do:

  1. Open the `apns_devices` table
  2. Locate the Device you want to switch over to sandbox mode
  3. Change the `development` column from 'production' to 'sandbox'

That will allow your push notifications to be sent using the correct certificate if your device was provisioned using the development certificate.

I wish there was an easier way to make this automatic, but I can't think of any. I am currently looking for a way that during the device registration process, I can detect which build style you are using so the database will automatically know which certificate to use. But unless I also require you to manually add a bunch of compiling flags to each build style, then there is no easy way to do it that I know of... no automatic way... anyway.

If any of you know of one, please comment below ;)