开发者

APNS push notification, string key in loc-args

I'm trying to populate the 'alert' portion of a push notification with keys to some localized strings in an iOS app. Providing the key to the appropriate string in the 'loc-key' property does what it's supposed to and works great. However, I'd also like to provide a key to a localized string in the 'loc-args' property. When testing, putting the key in 'loc-args' displays the key in the notification on the phone, not the string that the key points at.

Here's an example payload:

{"aps":{"alert":{"loc-key":"STRING_KEY","loc-args":["ANOTHER_KEY"]}}}

Is what开发者_开发百科 I'm trying to accomplish possible at all? Been searching around and I haven't seen this discussed anywhere.


Nested localization is not supported.

You would need to have the STRING_KEY handle the mapping and pass two strings in the loc-args array.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜