title: Azure Mobile Services Push not working
body: <p>I am trying to implement push to my app.</p>
  
  <p>I've followed this guide:
  <a href="http://azure.microsoft.com/en-us/documentation/articles/mobile-services-javascript-backend-ios-get-started-push/" rel="nofollow">http://azure.microsoft.com/en-us/documentation/articles/mobile-services-javascript-backend-ios-get-started-push/</a></p>
  
  <p>However, I am using API's instead of the Data-scripts, so in one of my API methods I am doing this:</p>
  
  <pre><code>   var push = request.service.push;
  
  
     push.apns.send(null, {
      alert: "Alert",
      payload: {
          inAppMessage: "Hey, a new item arrived"
      }
     }, {
      success: function(resp) {
          console.log(resp)
      },
      error: function(err) {
          console.error(err)
      }
     });
  </code></pre>
  
  <p>My log is showing this (So I land in the success-method [Also I know that I should never land in error for iOS due to apples push server not responding with error]):</p>
  
  <pre><code>{ isSuccessful: true,
    statusCode: 201,
    body: '',
    headers: 
     { 'transfer-encoding': 'chunked',
       'content-type': 'application/xml; charset=utf-8',
       server: 'Microsoft-HTTPAPI/2.0',
       date: 'Mon, 20 Oct 2014 11:31:21 GMT' },
    md5: undefined }
  </code></pre>
  
  <p>My app is registered correctly like this, I see the callback message and no error:</p>
  
  <pre><code>- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken: (NSData *)deviceToken
  {
      [client.push registerNativeWithDeviceToken:deviceToken tags:@[@"uniqueTag"] completion:^(NSError *error)
      {
          NSLog(@"registerNativeWithDeviceToken callback");
          if (error != nil)
          {
              NSLog(@"Error registering for notifications: %@", error);
          }
      }];
  }
  </code></pre>
  
  <p>But no push message land in my iphone! Nothing is happening.</p>
  
  <p>Im trying to check for errors in my Notification Hub but I see no log there.</p>
  
  <p>What am I missing? I really don't get it where my actual device id is stored server side anyway. I must be missing something.</p>
  
  <p>Thank you!</p>