title: Apple push notifications from PHP roadblock
body: <p>I've been fighting objective c for some time now.
  Finally I'm back with familiar PHP. I used the great tutorial at <a href="http://www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12" rel="nofollow">http://www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12</a>.
  The app is ready and tested as much as I could.</p>
  
  <p>My certificates and everything is in orders, tested with ssl. </p>
  
  <p>However, when trying to send push notification to a sandbox server, nothing gets delivered to the phone.</p>
  
  <p>All I get is </p>
  
  <pre><code>Connected to APNS
  Message successfully delivered
  </code></pre>
  
  <p>sample_feedback.php from ApnsPHP shows following:</p>
  
  <pre><code>php sample_feedback.php
  Tue, 05 Mar 2013 10:22:46 +0100 ApnsPHP[10294]: INFO: Trying     ssl://feedback.sandbox.push.apple.com:2196...
  Enter PEM pass phrase:
  Tue, 05 Mar 2013 10:22:49 +0100 ApnsPHP[10294]: INFO: Connected to ssl://feedback.sandbox.push.apple.com:2196.
  Tue, 05 Mar 2013 10:22:49 +0100 ApnsPHP[10294]: INFO: Reading...
  Tue, 05 Mar 2013 10:22:49 +0100 ApnsPHP[10294]: INFO: 38 bytes read.
  Tue, 05 Mar 2013 10:22:49 +0100 ApnsPHP[10294]: INFO: New feedback tuple: timestamp=1362473808 (2013-03-05 09:56:48), tokenLength=32,     deviceToken=xxxxxfd75e9bf7d13324xxx1f6cc8e885a7c3a5fbba9234546715208cdxxx.
  array(1) {
    [0]=&gt;
    array(3) {
      ["timestamp"]=&gt;
      int(1362473808)
      ["tokenLength"]=&gt;
      int(32)
      ["deviceToken"]=&gt;
      string(64) "xxxxxfd75e9bf7d13324xxx1f6cc8e885a7c3a5fbba9234546715208cdxxx"
    }
  }
  </code></pre>
  
  <p>My appdelegate has</p>
  
  <pre><code>- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
  //store message in db for now
  }
  </code></pre>
  
  <p>I'm not even sure where to start debugging at this point...</p>