Responding to an iOS app's push notifications by starting a script on my computer in real time

I'd like to automatically start a script on my computer (a mac) within 1 second of receiving a push notification from a specific app on my iPhone.

Solutions I've looked into are IFTTT and PushBullet, but these offer no way of acting on push notifications received from another app. The app is also available for Android, and I've considered running the iOS or Android app in a simulator on a server / my computer which might allow monitoring of push notifications, but have no experience with this approach.

The actual contents of the push notification are not important, I only need to be able to respond quickly to any notification received from this specific app.