Reputation: 1105
I'm setting up my notification with 8 keys, that are the information that i need in the other device that will receive this notification. The problem is that the Documentation says that it's only possible to set 3 keys. Some of the information from this keys i can extract from the message, but I dont think thats it's the best way of doing that, such because this message can be in 8 different languages. How can i send this information with the push notification?
Upvotes: 0
Views: 169
Reputation: 16563
I solved this problem by using alertLocalizationArgs. I was able to create 19 of them.
Upvotes: 0
Reputation: 1862
When you prepare your notification, take a look at CKNotificationInfo. In this class you will find these properties:
You have to set properties above with an key of your localization strings file.
//In your .strings file...
"NOTICATION_BODY" = "¡Hola mundo!";
"NOTIFCATION_ACTION" = "Cerrar";
"NOTICATION_BODY" = "Hello world!";
"NOTIFCATION_ACTION" = "Close";
// In your CKNotificationInfo object...
notificationInfo.alertLocalizationKey = "NOTICATION_BODY"
notificationInfo.alertActionLocalizationKey= "NOTIFCATION_ACTION"
Upvotes: 1