Sample Code problems for Messaging from Swift

The sample code won’t compile because PublishOptions doesn’t have a ‘headers’ property. I changed it to use the assignHeaders function.
The second problem is that the post will fail if you pass zero into the seconds parameter. I had guessed that passing zero would mean send immediately but I guess by the time it gets to the server that time is in the past.
It would probably be better if you changed the sample code to:

if seconds > 0 { deliveryOptions.publishAt = NSDate(timeIntervalSinceNow: seconds) }

— Steven

Hi Steve,

We are working for this issue