Short answer
Turn on the Push Notifications capability for the app target in Xcode, under Signing & Capabilities, and make sure the App ID has Push Notifications enabled. Then build with a provisioning profile created after that change. In Expo, Flutter or other generated projects, check the entitlement survives the build, then build and install again.
Why the entitlement is missing
01
The Push Notifications capability isn’t on
“To add this entitlement to your app, enable the Push Notifications capability in Xcode.” Apple, APS Environment Entitlement
The entitlement comes from the capability. Add it in Xcode for the main app target, not only for an extension.
02
The provisioning profile is older than the change
“Xcode sets the value of the entitlement based on your app’s current provisioning profile.” Apple, APS Environment Entitlement
A profile made before push was enabled for the App ID doesn’t carry the entitlement. With automatic signing, Xcode refreshes it; with manual signing or a CI builder, regenerate the profile and use the new one.
03
A generated project drops the setting
Expo, Flutter and other tools can regenerate the iOS project, so a capability added by hand in Xcode can disappear on the next build. Check the entitlements of the app you actually built, not just the project.
04
After the fix: development and production
“Production provisioning profile and Prerelease Versions and Beta Testers use production.” Apple, APS Environment Entitlement
Builds with a development profile use the sandbox; TestFlight and App Store builds use production. Once the entitlement is fixed, make sure your server sends to the environment that matches the build.
Checked against the vendor’s docs on : Apple docs: APS Environment Entitlement; Apple docs: Registering your app with APNs.
Rather hand it over?
Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.
Related: Expo push notifications not working · Flutter APNS token has not been set · Xcode signing requires a development team