chvanikoff / apns4ex

APNS for Elixir
MIT License
70 stars 23 forks source link

alert-message string for Localizable.strings #15

Open jeandavid opened 8 years ago

jeandavid commented 8 years ago

I think there might be an issue with sending alert-message string for Localizable.strings.

Apple docs never clearly say it's an exclusive or between the 'body' key and the 'loc_key' + 'loc_args' keys. However, my tests show that in alerts including a 'body' key != nil, iOS seems to ignore the 'loc_key' + 'loc_args' keys.

Your private function 'format_loc' in the APNS.Worker module returns an alert with a body never nil (at minimum an empty string). I think this prevents any alert-message string for Localizable.strings from being activated on the user device.

chvanikoff commented 8 years ago

@jeandavid as per this table the "body" key is not optional (value type is string). But I've reviewed the doc more carefully and found examples of using "alert" without "body" key specified. I think you might be right, I will test it. Thank you!