From 784a2627d062be950927ca3c11f738c77090b15a Mon Sep 17 00:00:00 2001 From: Florent Vilmart Date: Sat, 15 Jul 2017 19:25:37 -0400 Subject: [PATCH 1/3] Update APNS.js --- src/APNS.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/APNS.js b/src/APNS.js index 794a12e4..5fa40bea 100644 --- a/src/APNS.js +++ b/src/APNS.js @@ -178,7 +178,7 @@ export class APNS { notification.setAlert(coreData.alert); break; case 'title': - notification.setAlertTitle(coreData.title); + notification.setTitle(coreData.title); break; case 'badge': notification.setBadge(coreData.badge); From 8f647dee2e2d71757199175835b1720950f12ff5 Mon Sep 17 00:00:00 2001 From: Florent Vilmart Date: Sat, 15 Jul 2017 19:27:16 -0400 Subject: [PATCH 2/3] Update APNS.spec.js --- spec/APNS.spec.js | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/APNS.spec.js b/spec/APNS.spec.js index b75eb493..90fa787a 100644 --- a/spec/APNS.spec.js +++ b/spec/APNS.spec.js @@ -160,6 +160,7 @@ describe('APNS', () => { //Mock request data let data = { 'alert': 'alert', + 'title': 'title', 'badge': 100, 'sound': 'test', 'content-available': 1, From 71a449beb7e91ff46ae06cc7d8a6f88fcc5f1e63 Mon Sep 17 00:00:00 2001 From: Florent Vilmart Date: Sat, 15 Jul 2017 19:43:44 -0400 Subject: [PATCH 3/3] Update APNS.spec.js --- spec/APNS.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/APNS.spec.js b/spec/APNS.spec.js index 90fa787a..aec489f3 100644 --- a/spec/APNS.spec.js +++ b/spec/APNS.spec.js @@ -174,7 +174,7 @@ describe('APNS', () => { let notification = APNS._generateNotification(data, { expirationTime: expirationTime, collapseId: collapseId }); - expect(notification.aps.alert).toEqual(data.alert); + expect(notification.aps.alert).toEqual({ body: 'alert', title: 'title' }); expect(notification.aps.badge).toEqual(data.badge); expect(notification.aps.sound).toEqual(data.sound); expect(notification.aps['content-available']).toEqual(1);