I've released the app with push notifications based on insert in CloudKit public database. Everything was fine during TestFlight tests – devices received notifications (inluding my own).
After App Store release I've noticed that none of the devices that my friends and I own receive notifications. The app was already updated on more than 140K devices.
When I debug the app with the entitlement key com.apple.developer.icloud-container-environment
set to "Production" I receive notification only when I insert the key in... Development Environment.
My app uses silent push notification to fetch record from the database, but it looks for it in the Production Environment ;)
EDIT: Meanwhile, I've released an update to the app and now the app doesn't fetch anything from the database because all required fields from the entity are attached to the notification. I thought that, maybe public database request limits are exceeded.
Anyway I've checked the Telemetry section in the CloudKit Dashboard and it looks like it can sends max 500 notifications per some magical period of time:
Last 24h with many inserts in the database:
Some inserts didn't trigger push at all.
Of course none of the devices I have in my home received the notification. Any ideas why this happens? Are there any non-documented limits of CloudKit Push Notifications?