Skip to content
This repository was archived by the owner on Oct 20, 2020. It is now read-only.

Commit 80107b3

Browse files
committed
Enhancement: APNPayload support category
1 parent 11a8dba commit 80107b3

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ Getui::pushMessageToApp($data);
151151
'is_content_available' => false, // 推送是否直接带有透传数据(默认否), boolean
152152
'badge' => '', // 应用icon上显示的数字,int
153153
'sound' => '', // 通知铃声文件名,string
154+
'category' => '', // 在客户端通知栏触发特定的action和button显示,string
154155
'custom_msg' => [
155156
'key1' => 'value1',
156157
'key2' => 'value2',

src/sdk/igetui/template/GetuiTemplate.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,10 @@ private function IGtTransmissionTemplate()
230230
$apn->sound = $sound;
231231
}
232232

233+
if (isset($category)) {
234+
$apn->category = $category;
235+
}
236+
233237
if (isset($custom_msg) && count($custom_msg) > 0) {
234238
foreach ($custom_msg as $key => $value) {
235239
$apn->add_customMsg($key, $value);

0 commit comments

Comments
 (0)