Skip to content
This repository has been archived by the owner on Mar 9, 2018. It is now read-only.

Commit

Permalink
Merge pull request #47 from tompesman/missing_payload_fix
Browse files Browse the repository at this point in the history
Fixed packing of the array to allow the 256 byte length in big endian
  • Loading branch information
ileitch committed Jun 19, 2012
2 parents 83b0011 + 1b5ade6 commit 12eec1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rapns/notification.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def payload_size
# http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingWIthAPS/CommunicatingWIthAPS.html#//apple_ref/doc/uid/TP40008194-CH101-SW4
def to_binary(options = {})
id_for_pack = options[:for_validation] ? 0 : id
[1, id_for_pack, expiry, 0, 32, device_token, 0, payload_size, payload].pack("cNNccH*cca*")
[1, id_for_pack, expiry, 0, 32, device_token, payload_size, payload].pack("cNNccH*na*")
end
end
end

0 comments on commit 12eec1f

Please sign in to comment.