Exemple #1
0
        /// <summary>
        /// DEBUG-ONLY: Unregister any registrations with given deviceToken
        /// </summary>
        /// <param name="deviceToken">The device token</param>
        /// <returns>Task that completes when unregister is complete</returns>
        public Task UnregisterAllAsync(NSData deviceToken)
        {
            if (deviceToken == null)
            {
                throw new ArgumentNullException("deviceToken");
            }

            return(this.RegistrationManager.DeleteRegistrationsForChannelAsync(ApnsRegistration.ParseDeviceToken(deviceToken)));
        }
Exemple #2
0
 /// <summary>
 /// DEBUG-ONLY: List the registrations made with the service for a deviceToken
 /// </summary>
 /// <param name="deviceToken">The deviceToken to check for</param>
 /// <returns>List of registrations</returns>
 public Task <List <Registration> > ListRegistrationsAsync(NSData deviceToken)
 {
     return(this.RegistrationManager.ListRegistrationsAsync(ApnsRegistration.ParseDeviceToken(deviceToken)));
 }
Exemple #3
0
 /// <summary>
 /// Create a default Registration for a deviceToken with specific tags
 /// </summary>
 /// <param name="deviceToken">The device token</param>
 /// <param name="tags">The tags to register to receive notifications from</param>
 public ApnsRegistration(NSData deviceToken, IEnumerable <string> tags)
     : base(ApnsRegistration.ParseDeviceToken(deviceToken), tags)
 {
 }