Documentation
¶
Overview ¶
Command pushprobe is the live-verify harness for iOS remote push (#1517, bellui.PushApp): permission, the APNs device token, a tapped push on a cold launch and while running, and a push that arrives in the foreground.
At start it asks for permission and registers, and prints each answer. The tapped-push callback is set two seconds after the app starts, so a tap that launched the app has to be held for it. A foreground push is shown when its payload has "show": true, and hidden otherwise.
Every event is a "pushprobe:" line on stdout (`xcrun simctl launch --console`, `devicectl device process launch --console`) and in $TMPDIR/pushprobe.log inside the app's container.
Simulator:
bellui package -os iossimulator -app-id com.trendvidia.pushprobe xcrun simctl install booted pushprobe.app xcrun simctl launch --console booted com.trendvidia.pushprobe xcrun simctl push booted com.trendvidia.pushprobe payload.apns
payload.apns: {"aps":{"alert":{"title":"T","body":"B"},"sound":"default"},"show":true,"data":{"k":"v"}}
With -local (`xcrun simctl launch … com.trendvidia.pushprobe -local`) it also sends one of the app's own rich notifications three seconds after start, with a body tap and a "Reply" action. Those taps reach the app's callbacks through the same app delegate since #1517, and must not reach the push callbacks.
With -locals N it sends N rich local notifications at once at start, each asking for authorization itself (#1519); with -asks 0 nothing else asks.
hack/pushprobe/simtest/run.sh drives all of it on a simulator, with taps.
A device build needs a provisioning profile with Push Notifications, and a push sent through APNs's sandbox with the app's key.