I have a strange issue about iOS push notification and my django app.
In my djnago application I integrated django-scarface
to send push notification to iOS and Android device using Amazon AWS SNS service
.
In my test I can send push notifications to a generic device using a string message. I can receive correctly all notifications on my devices.
Now, if I change the text of notification like this:
notification_message = notifications.settings.REQUEST_RECEIVED_NOTIFICATION_MESSAGE % sender.from_user.first_name
REQUEST_RECEIVED_NOTIFICATION_MESSAGE = "%s sent you a request!"
notification_message is correctly generated... for example I read u"Safari sent you a request!"
(in debug mode) but, when I receive the notification on iOS device I have something like this:
"Safari sent you...."
For some strange region my message is trimmed...
But, If I set hardcoded the name all works well: for example, if I have:
notification_message = notifications.settings.REQUEST_RECEIVED_NOTIFICATION_MESSAGE % "SAFARI"
Have you some suggestion about this strange problem?
Aucun commentaire:
Enregistrer un commentaire