title: Devices are not registered in azure push notification hub in xamarin forms
body: <p>I am trying to register device token with tag in azure push notification hub in development mode but in azure portal it shows 0 active devices registered, when I check with notification hub it will show one registration is occur.</p>
  
  <p>Here is my sample code:</p>
  
  <p>App delegate:</p>
  
  <pre><code>      var deviceTokenDes = deviceToken.Description;
  
          if (!string.IsNullOrWhiteSpace(deviceTokenDes))
          {
              deviceTokenDes = deviceTokenDes.Trim('&lt;');
              deviceTokenDes = deviceTokenDes.Trim('&gt;');
              deviceTokenDes = deviceTokenDes.Replace(" ", "");
  
              DeviceToken = deviceTokenDes.Trim('&lt;');
              DeviceToken = deviceTokenDes.Trim('&gt;');
              DeviceToken = deviceTokenDes.Replace(" ", "");
          }
  
          Hub = new SBNotificationHub(myapp.ListenConnectionString, myapp.NotificationHubName);
  </code></pre>
  
  <p>Login view model:</p>
  
  <pre><code>   var tags = new List&lt;string&gt; { userId };
  
          AppDelegate.Hub?.UnregisterAllAsync(AppDelegate.DeviceToken, error =&gt;
          {
              if (error != null)
              {
                  Console.WriteLine("Error calling Unregister: {0}", error);
              }
  
              AppDelegate.Hub.RegisterNativeAsync(AppDelegate.DeviceToken, new NSSet(tags.ToArray()), errorCallback =&gt;
              {
                  if (errorCallback != null)
                  {
                      Console.WriteLine("RegisterNativeAsync error: " + errorCallback.ToString());
                  }
              });
  </code></pre>
  
  <p>I have registered device token with tag after user successfully login in to the application. Can you please suggest idea on.<a href="https://i.stack.imgur.com/e01Tb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/e01Tb.png" alt="enter image description here"></a></p>