In this article, I will explain as simply as possible how to activate Push Notification notifications in our Flutter applications when we publish our app to the App Store, and what precautions need to be taken. often, they show the necessary settings on the code side, but they don’t generally share detailed information on how to make settings during the installation phase and on the market side.
Here, I will try to show, in English, as simply and step-by-step as possible.
Enjoy reading in advance.
Before start you can find my mobile udemy course
https://www.udemy.com/course/cursor-ai-ile-flutter-mobil-uygulama-gelistir-ve-yayinla/learn/lecture/48922133?couponCode=E8BED2A9B6EABBA256CB#overview

Yes, first of all, the points we will discuss here will include detailed information on what needs to be done after defining our project on the Firebase Console using the Firebase CLI.
Nevertheless, if I need to summarize,
Firstly, we need to create a project on the Firebase console and then add it to our project using Firebase CLI. We must log in to Firebase console and create a new project.
After creating our project, we should integrate Firebase into our project using CLI.
What is Firebase CLI?
Firstly, to benefit from Firebase features (push notification, database, analytics, remote config) in our projects, we need to add Firebase to our mobile project. Some files and settings that we previously did manually can now be done more easily using Firebase CLI. If you are wondering where to find and install Firebase CLI, detailed documentation is available here.
firebase.flutter.dev
The link I shared above already explains how to install CLI with very simple steps. After integrating Firebase into our project using Firebase CLI; We go to project settings by clicking on the Settings icon. In the General — Cloud Messaging tab, click on the Cloud Messaging area where you see the Cloud Messaging tabs.

Below, you will see a field called “Apple App Configuration.” It looks like this:

In the example we’ve shown here, an APN key is displayed, but you probably won’t have this. You need to obtain this key number by entering the Certificates section in your Apple Developer account, like this:

You need to log into your account and create a key for your application in the Keys section, as indicated by the underline. The key we added to the area mentioned earlier will be the one we create here. Congratulations! You have created a key and added it to your project on the Firebase side. Now it’s time to determine what needs to be activated when building our project.
By the way, let me remind you that such events can change over time as versions and new rules can be added over time. This is because of security measures and so on. 🙂
What do I need to activate when building my project? When building our project, we need to enable certain features on the Xcode side. If we don’t activate them, we won’t receive notifications in our project. If you’re like me and don’t have much experience on the mobile side, it can be quite challenging. Read the documentation.
When we open our project on the Xcode side, we click on the Signing & Capabilities tab in the above tabs. Here, we need to click on the place that says capability with a plus sign and add the following by clicking there.

We’re adding the Background Modes and Push Notifications capabilities.

After adding these, you need to select Background Fetch and Remote Notifications in the Background Modes section.

After selecting these, you can build your project and upload it to the market.
These were the steps to pay attention to when uploading to the market.
When we do these carefully, we’ll be able to send push notifications to users via the Firebase Console.
Finally, I didn’t dwell too much on the code side, but it’s worth mentioning, especially for iOS. For the iOS side, you need to request permission from the user to send notifications when the application is opened. After the user grants these permissions, you can proceed with the sending. You can do this simply as follows.

Our code will look like this.
By paying attention to the points we’ve covered so far, we’ve provided a general overview of what should be considered for push notification notifications when uploading Flutter-developed projects to the iOS market.
If you would like us to cover Firebase Analytics and Remote Config using Firebase in our next article, we would appreciate it if you like and support us in the comments.
Thank you for reading.

How to Activate Flutter iOS Push Notifications