Emojis support in Apple push notification

前端 未结 2 675
滥情空心
滥情空心 2021-02-09 02:58

I am working on iPhone app named \"INTERSTIZIO\".In this I have implemented functionality like chat between users.In this user can send text,location and text with emojis symbol

2条回答
  •  太阳男子
    2021-02-09 03:40

    you shouldn't need to mess about with html decoding. As you say the code point for smiling face is \u263A. In PHP you can represent that in a UTF8-encoded string as "\xE2\x98\xBA"

    Lightning bolt (actually 'high voltage sign') is \u26A1 or "\xE2\x9A\xA1" in UTF-8.

    Both these characters are present in some non-emoji fonts as regular Unicode symbols. You can see with:

    I don't know where you got ; from, but that would be \ue13d which is in an empty private use Unicode range, and not an Emoji within the Unicode standard Check it here Possibly it's from some other Japanese mobile carrier standard, but for iOS you should use Unicode.

    You can get my above encodings from this table or use this Emoji search tool.

    As for Apple push. This note says you can send emoji as UTF-8 encoded strings, so a json object like {"alert":"\u26A1SHOCKER\u26A1"} sounds like it will work.

提交回复
热议问题