Search code examples
iosapple-push-notifications

Showing push notifications while using Airplay on iOS?


I use airplay to test, demo and develop an iOS device, especially using push notifications. This is because although you can drag .apns files onto a simulator, simulators don't work with APNs.

In iOS 15, they've made macOS devices running Monterey able to connect as an Airplay receiver. You can show your iOS screen on macOS using Airplay. (previously you needed AirServer). However, now all push notifications seem to be hidden when airplay is being used.

When looking at the Console.app:

com.apple.pushLaunch.com.apple.mobilenotes:AC2295:[
    {name: ApplicationPolicy, policyWeight: 50.000, response: {Decision: Absolutely Must Not Proceed, Score: 0.00, Rationale: [{[pushDisallowed]: Required:1.00, Observed:0.00},]}}
 ], FinalDecision: Absolutely Must Not Proceed}

This happens consistently when Airplay is being used by the device, and immediately stops being a problem when Airplay is turned off. I don't have any "focus" modes enabled.

I tried quicktime player, but I just get a black screen when selecting the device. This method has always been very buggy.

There seems to be no way to develop, test or demo push notifications without using another camera to record the iOS screen...


PS: Even though macOS Monterey adds support as an airplay receiver, it is annoying to use compared to AirServer for a developer. The screen must be full screen, and all other screens go black except for the device screen.


Solution

  • same probs here, but I've played around iOS settings and got it sorted. Try to set Settings/Notifications/Screenshare then enable notifications with the slider. That's all.

    Greetz Tom