问题详述
iOS端如何让推送内容自动换行?
示例图如下:
问题解答
在 body 里的字符串中添加 \n
达到换行的效果 ,代码示例如下 :
{
"aps": {
"alert": {
"title": "title",
"subtitle": "subtitle",
"body": "This is some fancy message. \nThis is some fancy message. \nThis is some fancy message. \nThis is some fancy message. "
},
"badge": 1,
"sound": "default",
"category": "test_category",
"mutable-content": 1
},
"key1":"value1",
"key2":"value2"
}
文档内容是否对您有帮助?