我试图从pipe理设备发送推送通知到所有设备(段:“ALL”)。 我似乎无法得到它与这个代码的工作。 let data = [ "contents": ["en": "\(message)"], "included_segments": ["All"], "excluded_segments": ["None"], "ios_badgeType": "Increase", "ios_badgeCount": 1 ] OneSignal.defaultClient().postNotification(data) “无”段存在,其中有0个用户。 “全部”拥有所有活跃的用户。 当我发布通知时,我得到一个错误 错误:创build通知失败 虽然这工作没有任何问题: let data = [ "contents": ["en": "\(message)"], "include_player_ids":["20a32b7a-4254-4e03-a24c-13fe8bd91fff"], "ios_badgeType": "Increase", "ios_badgeCount": 1 ] OneSignal.defaultClient().postNotification(data)
我们从UA迁移到了One Signal。 我们正在从云代码推送像 var pushInfo = { "app_id" : "xxxxxx", "data": { "objectId": objectId, "placeId": placeId, }, "included_segments": ["All Users"], "contents": {"en": message} }; var headers = { "Content-Type": "application/json; charset=utf-8", "Authorization": "Basic XXXXX" }; var options = { host: "onesignal.com", port: 443, path: "/api/v1/notifications", method: "POST", headers: headers, }; var https = require('https'); var […]