From 65619139149ca6a1b0f0e28ef8a46d2f86399c3c Mon Sep 17 00:00:00 2001 From: thibauddavid Date: Mon, 18 Sep 2017 10:55:19 +0200 Subject: [PATCH] `include_ios_tokens ` is a legacy key which should be replaced by `include_player_ids`. As an alternative to embedding iOS SDK to get player_ids, docs specifies that in an ios_token `All non-alphanumeric characters must be removed`. Please consider the warning: "Only works with Production tokens" --- src/OneSignalPushAdapter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OneSignalPushAdapter.js b/src/OneSignalPushAdapter.js index bb75fe2..f890106 100644 --- a/src/OneSignalPushAdapter.js +++ b/src/OneSignalPushAdapter.js @@ -161,7 +161,7 @@ export class OneSignalPushAdapter { this.sendNext = function() { post['include_android_reg_ids'] = []; tokens.slice(offset,offset+chunk).forEach(function(i) { - post['include_android_reg_ids'].push(i['deviceToken']) + post['include_android_reg_ids'].push(i['deviceToken'].replace(/[^0-9a-z]/gi, '')) }) offset+=chunk; this.sendToOneSignal(post, handleResponse);