gpt4 book ai didi

ios - 表情符号不显示在推送通知中

转载 作者:行者123 更新时间:2023-11-28 20:58:59 27 4
gpt4 key购买 nike

我在我的应用程序中实现了推送通知的功能。这会在推送通知中显示文本消息,但不会显示表情符号。它显示像 '\u270c' 这样的 ascii 代码而不是表情符号。

谁能告诉我如何在推送通知中显示表情符号

最佳答案

要在推送通知中显示表情符号,请在服务器端使用 JSON 解码。它为我解决了这个问题在 APNS 推送通知代码的服务器端执行此操作,并且会像魅力一样工作

$payload['aps'] = array('alert' => json_decode('"'.$pushMsg['message'].'"'), 'badge' => 0, 'sound' => 'default', 'passcode' => $pushMsg);

关于ios - 表情符号不显示在推送通知中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50793342/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com