title: Unity3D iOS device token is always null
body: <p>I am trying to get push notifications to work on iOS, but I can not get access to the device token!</p>
  
  <p>My Unity version is 5.4.1f1.</p>
  
  <p>I have enabled the Push Notifications capability in XCode and all the certificates are setup correctly:
  <a href="https://i.stack.imgur.com/Ph6yt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ph6yt.png" alt="enter image description here"></a></p>
  
  <p>In my script in the start method I call this:</p>
  
  <pre><code>UnityEngine.iOS.NotificationServices.RegisterForNotifications
      (UnityEngine.iOS.NotificationType.Alert | UnityEngine.iOS.NotificationType.Badge
      | UnityEngine.iOS.NotificationType.Sound, true);
  </code></pre>
  
  <p>Then from the update method I call this method:</p>
  
  <pre><code>private bool RegisterTokenWithPlayfab( System.Action successCallback,
      System.Action&lt;PlayFabError&gt; errorCallback )
  {
      byte[] token = UnityEngine.iOS.NotificationServices.deviceToken;
      if(token != null)
      {
          // Registration on backend
      }
      else
      {
          string errorDescription = UnityEngine.iOS.NotificationServices.registrationError;
          Debug.Log( "Push Notifications Registration failed with: " + errorDescription );
          return false;
      }
  }
  </code></pre>
  
  <p>The token keeps being empty, so the else-branch is entered every call. Also, the registrationError keeps being empty.</p>
  
  <p>Can someone point me in the right direction on this? What else can I try or how can I get more infos on what is going wrong??</p>