From 261a680e6c1c4e1fb44d5ac10e37102630c6cb9d Mon Sep 17 00:00:00 2001 From: Jeroen Peters Date: Wed, 8 Dec 2021 01:40:39 +0100 Subject: [PATCH] try to use ancsGetAppInfo --- apps/ios/boot.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/ios/boot.js b/apps/ios/boot.js index 6e8c864a8..6821b9549 100644 --- a/apps/ios/boot.js +++ b/apps/ios/boot.js @@ -91,6 +91,14 @@ E.on('notify',msg=>{ // could also use NRF.ancsGetAppInfo(msg.appId) here }; + + var aName = ''; + NRF.ancsGetAppInfo( msg.appId ).then( ai => { + aName = ai.title; + }).catch(error => { + aName = appNames[msg.appId] || msg.appId; + }); + var unicodeRemap = { '2019':"'" }; @@ -99,7 +107,7 @@ E.on('notify',msg=>{ require("messages").pushMessage({ t : msg.event, id : msg.uid, - src : appNames[msg.appId] || msg.appId, + src : aName, title : msg.title&&E.decodeUTF8(msg.title, unicodeRemap, replacer), subject : msg.subtitle&&E.decodeUTF8(msg.subtitle, unicodeRemap, replacer), body : msg.message&&E.decodeUTF8(msg.message, unicodeRemap, replacer)