UNNotificationServiceExtension not working on iPhone 5 (iOS 10)
Asked Answered
N

1

0

I am not able to intercept push notification via UNNotificationServiceExtension on iPhone 5 running on iOS 10.

The mutable-content flag is set as 1 inside the aps in payload. The same notification is getting intercepted in the extension for iPhone 6S.

Is Notification Service app extension not supported on iPhone5(because of 32-bit maybe)?

I have looked at the documentation and it is no where mentioned that it will work only on specific devices.

Asked the same question in Apple Developer forum as well.

Nonentity answered 3/8, 2017 at 11:34 Comment(6)
Check your deployment target for the extension. it should be same for test device and deployment target. After altering the deployment target to 10.0 the UNNotificationServiceExtension instance called perfectlyDittman
The same build is working on iPhone 6S. I dont think its an issue with deployment targets.Nonentity
May be your iPhone 6S device using 10.1 and match with your UNNotificationServiceExtension deployment target and iPhone 5 using lower version of deployment target.Dittman
@NikhleshBagdiya, let me test it out.Nonentity
It's solve your issueDittman
@NikhleshBagdiya: you were right. If you want you can write your comment as an answer and I will accept.Nonentity
D
2

Check your deployment target for the extension. it should be same for test device and deployment target. After altering the deployment target to 10.0 the UNNotificationServiceExtension instance called perfectly. May be your iPhone 6S device using 10.1 and match with your UNNotificationServiceExtension deployment target and iPhone 5 using lower version of deployment target. So will not work on iPhone 5.

Dittman answered 8/8, 2017 at 7:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.