我使用Firebase管理軟件SDK從節點服務器發送推送通知。但在iOS上,我只想顯示應用程序在後臺/終止時的通知,而不是在前臺時顯示。目前它會一直顯示通知。在前臺不顯示通知
這是我的有效載荷:
const payload = {
data: {
data: 'data',
more: 'moreData',
},
notification: {
title: 'Incoming Call',
body: 'Someone is calling you',
text: 'This is some text',
sound: 'default',
click_action: 'com.example.INCOMING_CALL',
}
};
const options = {
priority: 'high',
time_to_live: 30,
collapse_key: 'Video Call',
content_available: true,
};
admin.messaging().sendToDevice(tokensList, payload, options);
有什麼事情跟我載荷抑或是我在AppDelegate.swift做些什麼?