I want to use localizable strings in push notificaitons like this example
“alert” : { “loc-key” : “GAME_PLAY_REQUEST_FORMAT”,“loc-args” : [ “Jenna”, “Frank”]}
but getting it like this.How can I specify for alert key to be dictionary and not a string[aps: {
alert = “{“loc-key”:“NOTIFICATION_BET_ACCEPTED”}”;
“content-available” = 1;
}, betId: D9B3B8FF-373E-1339-FF79-5E93B7212000, ios-content-available: 1]
We need some time to investigate this issue.
Internal task BKNDLSS-13235 is created.
Are there any news?
Will you finish it until tomorrow evening?
No, this task has a low level (this is free support).
You can require a paid support (to support@backendless.com)
Narek, you can publish a dictionary now, but you will receive a string with pair options, for example:
func publishObject() {
let publishHeaders = [
"ios-badge":"1",
"ios-sound":"default"
]
let contact = [
""loc-key" : ""GAME_PLAY_REQUEST_FORMAT",
""loc-args" : " 'Jenna, Frank' "
]
let publishOptions = PublishOptions()
publishOptions.assignHeaders(publishHeaders)
let deliveryOptions = DeliveryOptions()
deliveryOptions.pushPolicy(PUSH_ONLY)
deliveryOptions.pushBroadcast(FOR_IOS.rawValue)
backendless.messaging.publish(
"testing",
message: contact,
publishOptions: publishOptions,
deliveryOptions: deliveryOptions,
response: {(status: MessageStatus!) -> () in
print("Message has been sent: \(status)")
},
error: { (fault : Fault!) -> () in
print("Server reported an error: \(fault)")
})
}
Here a received message:
{loc-args=‘Jenna, Frank’, loc-key=GAME_PLAY_REQUEST_FORMAT}
You could use this feature, if you would like.