1
Vote

recommend bug fix for ApnsNotification.ToByteArray

description

/Notifications/ApnsNotification.cs line 46
 
/*2011-11-23 gateway.push.apple.com did not return an error code when the ApnsNotification.Expiry = 2012-1-1. Message wasn't delivered to client
 
 
 
http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingWIthAPS/CommunicatingWIthAPS.html#//apple_ref/doc/uid/TP40008194-CH101-SW1
 
 
Expiry is supposed to be 4 bytes, but ToEpochTime() returns a double
 
replace line
 
outputStream.Write(BitConverter.GetBytes(Expiry.ToEpochTime()));
 
 
 
with */
 
 
 
 

 

 
   outputStream.Write(BitConverter.GetBytes(IPAddress.HostToNetworkOrder(Convert.ToInt32(Expiry.ToEpochTime()))));

comments