Most Flutter push tutorials start with “add Firebase.” That is fine for many apps, but some teams want fewer third-party SDKs, a smaller privacy label, or a backend they fully control. This post shows what you can do without Firebase on each platform, where the hard limits are, and how to test it.
The short version: iOS is easy to do without Firebase. Android is not, unless you accept real trade-offs.
How push works without a middleman
Every push system has three parts:
- The app asks the operating system for a push address (a token or endpoint) and sends it to your server.
- Your server stores that address next to the user.
- The platform push service receives a request from your server and delivers it to the device.
Firebase Cloud Messaging sits between your server and the platform service. Remove it and your server talks to the platform service directly. On iOS that service is APNs. On Android the picture is different, which we cover below.
iOS: talk to APNs directly
Apple’s docs describe the flow plainly: “At launch time, your app communicates with APNs and receives its device token, which you then forward to your provider server. Your server includes that token with any notifications it sends.”
Set up the app
- In Xcode, enable the Push Notifications capability on the Runner target. Apple says this adds the required entitlement.
- In your developer account, enable push for the App ID.
- Register on every launch. Apple is firm about this: “Never cache device tokens in local storage. APNs issues a new token when the user restores a device from a backup, when the user installs your app on a new device, and when the user reinstalls the operating system.”
- Expect more than one token per user. Apple notes: “Because a user can have multiple devices, prepare your app to handle multiple device tokens.”
In Flutter you have two routes. You can write a small platform channel that calls the native registration API and passes the token to Dart. Or you can use a package. The push package on pub.dev is built for this case, for teams that “do not / cannot use FCM on iOS.” It exposes requestPermission(), a new-token callback, foreground and background message handlers, and notification tap handlers.
Set up the server
Apple recommends token-based authentication. You create a signing key in your developer account and receive “A 10-character string with the Key ID” and “An authentication token signing key, specified as a text file (with a .p8 file extension).” Your server signs a JWT with it. Apple says you “must also update and encrypt your tokens at least once an hour.”
Then send an HTTP/2 POST. Apple says to “Use HTTP/2 and TLS 1.2 or later” and to use the development server for testing and the production server for shipping apps. The hosts are api.sandbox.push.apple.com and api.push.apple.com, and the path is /3/device/<device_token>.
curl --http2 \
--header "authorization: bearer $JWT" \
--header "apns-topic: com.example.myapp" \
--header "apns-push-type: alert" \
--data '{"aps":{"alert":{"title":"Order shipped","body":"Your order is on its way"}},"orderId":"123"}' \
https://api.sandbox.push.apple.com/3/device/$DEVICE_TOKEN
A few rules from Apple’s payload docs:
- APNs refuses payloads over “4 KB (4096 bytes)” for normal notifications.
- Put your own keys next to
aps, not inside it. “APNs ignores custom keys” placed in theapsdictionary. - “Don’t include customer information or any sensitive data, like a credit card number, in a notification’s payload.”
apns-push-type“must accurately reflect the contents of your notification’s payload.”
Delivery is best effort. Apple says APNs “may reorder notifications” and, when a device is offline, “APNs stores only one notification per bundle ID.” Do not use push as your source of truth. Store the data on your server and let the app sync when it opens.
Android: the honest answer
On a normal Android phone from the Play Store, push messages arrive through Google’s push channel. Firebase’s own client docs say “FCM clients require devices running Android 7.0 or higher that also have Google Play services installed.” The push package mentioned above states the limit directly: “Users can avoid using Firebase on all platforms except Android.” Its Android setup still needs a Firebase project and a google-services.json file.
So for mainstream Android users you have three realistic choices.
1. Use FCM on Android only
Keep APNs direct on iOS and use FCM only for Android delivery. Your server then has two senders: one for APNs, one for the FCM v1 API. This keeps Firebase out of your iOS build and your Apple privacy label, while Android works the standard way. Many teams that say “without Firebase” end up here.
2. UnifiedPush
UnifiedPush describes itself as “a decentralized push notification system that lets you choose the service you want to use.” The unifiedpush Flutter package supports Android and Linux. Your app registers, gets an endpoint in onNewEndpoint, and the docs say “You should send the endpoint to your application server.” Messages arrive in onMessage and are decrypted for you.
The catch is in the package docs: “users must have a dedicated application, a distributor, installed on their system.” Distributors include ntfy and others listed on the UnifiedPush site. That suits privacy-focused apps and users on de-Googled phones. It is a hard ask for a general consumer app.
3. No remote push at all
Ask what the notification is for. If it is a daily reminder, a streak nudge or a timer, you do not need a server. Local notifications scheduled on the device cover it. The flutter_local_notifications package describes itself as “a cross platform plugin for displaying and scheduling local notifications.” If the content only matters when the user opens the app, sync on launch instead of pushing.
Permissions still apply
Skipping Firebase does not skip the permission prompts. On Android 13 (API level 33) and higher, Google says apps need the POST_NOTIFICATIONS runtime permission and that on new installs your app’s “notifications are off by default.” Ask in context, after the user does something that makes notifications useful. Google’s examples include when “The user taps an ‘alert bell’ button.” On iOS, you request authorization before registering. Our push notification best practices post covers timing and copy.
Test without a device farm
The iOS Simulator can receive a simulated push. Run xcrun simctl help push on a Mac with Xcode and you get the usage:
xcrun simctl push booted com.example.myapp payload.json
The built-in help says the payload must “Contain an ‘aps’ key with valid Apple Push Notification values” and “Be 4096 bytes or less.” This tests your handling code, not your server. For the full path, send a real request to the sandbox APNs host from a development build on a physical device.
On Android 13+, you can reset the permission state with the adb commands on Google’s notification permission page, such as adb shell pm revoke PACKAGE_NAME android.permission.POST_NOTIFICATIONS, to replay the first-run prompt.
A checklist before you ship
- Token or endpoint is sent to the server on every launch, and the server replaces stale values.
- The server supports several devices per user and deletes tokens APNs rejects.
- Payloads stay well under 4 KB and contain no personal data.
- Tapping a notification opens the right screen. Pair this with deep links in go_router.
- The permission prompt appears after a user action, not on first launch.
- Your privacy policy and store labels match what you actually collect. See the App Store privacy labels guide.
Which route should you pick?
- iOS-only app: go direct to APNs. It is less code than it sounds and removes a dependency.
- Both stores, mainstream users: APNs direct on iOS, FCM on Android, or just use Firebase with Flutter on both if you already use it for auth or data.
- Privacy-first Android audience: UnifiedPush, with clear onboarding that explains the distributor app.
- Reminders only: local notifications and no server.
If you are building the Flutter app with Claude Code or another AI agent, write the choice into your project rules so it does not quietly add firebase_messaging the first time you say “push.” MobileKit’s build skills record decisions like this in the spec before any code is written.
Sources read on the day this post was written: Apple: Registering your app with APNs, Apple: Sending notification requests to APNs, Apple: Establishing a token-based connection to APNs, Apple: Generating a remote notification, pub.dev: push, pub.dev: unifiedpush, UnifiedPush, pub.dev: flutter_local_notifications, Firebase: Set up an FCM client app in Flutter and Android Developers: Notification runtime permission.