title: Azure Notifications to WP and iOS
body: <p>My app uses an Azure Notification Hub to send messages to both Windows Phone and iOS devices. The problem is that they work if one is called, but it doesn't work if both are called.</p>
  
  <p>For example, If I send a message to an iOS device from my iOS emulator, the following code works fine and the notification appears.</p>
  
  <pre><code>var toast = PrepareMpnsToastPayload("myapp", notificationText);
  var appleToast = PrepareAppleToastPayload("myapp", notificationText);
  
  //await NotificationHelper.Instance.Hub.SendMpnsNativeNotificationAsync(toast, userTag);
  await NotificationHelper.Instance.Hub.SendAppleNativeNotificationAsync(appleToast, userTag);
  </code></pre>
  
  <p>However, if I uncomment the SendMpns..() line, the notification never gets to the apple device.  When stepping through this code with remote debugging, the call to SendMpns..() doesn't seem to return. I step over it and it just resumes.. and the breakpoint on the SendApple..() call below it never gets hit.</p>
  
  <p>This works the same with the Windows Phone Mpns line (works fine without the apple call).</p>
  
  <p>How am I supposed to send an alert to a user when I don't know what device they are on? I just want to send the notification to all types. Any pointers would be greatly appreciated.</p>
  
  <p>EDIT:  The below answers of removing await() did work. However as I now have authenticated notification hub I need to capture the return value of the call so I can see if I need to get another auth token if it has expired!</p>