ios - Localizing timestamps in APN alerts -
my server needs send apple force notification alert goes like, "your driver arrive @ 2:45pm." nice not have pull user's time zone , time formatting preferences server, , instead pass kind of universal point-in-time indicator (e.g. epoch seconds or utc timestamp) , have ios device turn timestamp in user's preferred format.
is possible?
short reply - 'no.' here apple documentation:
if target application isn’t running when notification arrives, alert message, sound, or badge value played or shown. if application running, ios delivers application delegate nsdictionary object.
since application not running, don't chance interpret contents of apn package. if however, expect apns when running, have chance application specific actions.
noting - have issue of user's language. you've selected english language "your driver ..."
the typical approach record user's timezone , language (and other locale information) on server, @ time of registration. then, when server generates apn customizes user's locale.
ios localization apple-push-notifications
No comments:
Post a Comment