Push Notification In React Native Using Firebase - Android & IOS Tutorial 2023
Вставка
- Опубліковано 5 лют 2025
- Hey this is Sheikh Adnan, In this tutorial you’re going to learn how to implement push notifications in IOS as an app feature using React Native and Firebase.
#pushnotification #ios #reactnative #codewithadnan
What Are Push Notifications?
Push notification is a small message that users receive on a device. They differ from regular pop-ups because they will appear on the device whether or not the user is currently using the site or app that the notification is tied to.
Push notifications work for both browsers and apps. For browsers, push notifications can show up no matter what site a user is on, as long as they’ve opted in to push notifications. They work very similarly for apps, however, they can pop up on a mobile device at any time, regardless of whether the user is on the app.
Notification In Android Link:
• Push Notification In R...
Github Repo Link:
github.com/she...
Follow me on Facebook:
/ 12cadeveloper
Follow These Steps:
Step1:
yarn add @react-native-firebase/app
yarn add @react-native-firebase/messaging
cd ios/ && pod install
Step2:
Configure firebase in IOS side.
Download the GoogleService-Info.plist file
Right click on the project name and "Add files" to the project.
Configure Firebase with iOS credentials
Step3:
Add firebase.json file
and add these lines of code
{
"react-native": {
"analytics_auto_collection_enabled": false,
"messaging_auto_init_enabled": false,
"messaging_ios_auto_register_for_remote_messages": true
}
}
Step4:
Add Developer account
//Add two Capability
Step5:
Add Background Modes and check
1.Background fetch
2.Remote Notification
Step6:
Add notification capability
Step7:
Add APNs Auth key
key Id --------
Team Id --------
Upload file .p8
Step8:
//Install these packages
yarn add @react-native-firebase/messaging
yarn add @notifee/react-native
yarn add react-native-permissions
Step9:
Make fcm Method helper Class
If you like this video, Please Likes, Comments, Subscribe to support us...
Thanks.
Starting with React Native #codewithadnan @code with adnan
Thanks, it is wokrking well !
this is good one
I implenemt it as you said but I am getting error when I am trying fetch token for ios
error message : The operation couldn’t be completed. No APNS token specified before fetching FCM Token
Android is working
To be able to develop for IOS, the issue of notification and testing, do you need to have a paid APPLE account? Because mine doesn't work, the notification part doesn't work, I can't get the token, but on Android it works normally
yes you must have an apple developer account
Bhai, thanks for the tutorial. Yehi notification agar app clip target me implement karni ho to, kese karenge ?
what to do with "no permission handler detected" ? you also have this error in the video
I also faced the same issue. But further resolve it by changing some thing in node module Files.
In node_module go to React-native persmission then IOS -> RNPermissions.m search No permission handler detected and then and comment this line "RCTLogError(@"%@", message)".
I hope this will resolve the issue.
which version of node ur using
Thank you, it's working well, Can you create a video on firebase in-app messaging for react native ios and android
@@tirumalreddy3693 sure
Hi, notifications test works, but I have an error in the development build that I can't dismiss. "There was a problem loading the project" No permission handler detected. Check that you are correctly calling setup_permissions in your Podfile.
I have same problem. How do you fix it
how to config in expo project sir? please show me 🙏🙏
Awesome Understanding thing ❤
Thanks! Helped a lot!!!
😊
animations pr bhi video bnao, full course , from beginner to PRO.
Okay
Bhai ios me setbackground handler chalraha hai apke pass app ke quit state me. Mujhe notifications aaraha hai lekin setbackgroundhandler ios app k quit state me trigger nahi horaha hai
Same instructions follow karo
there was error while pod install, it can be solved by adding the following script in `PodFile` under `target 'AppName' do` line script -
pod 'Firebase', :modular_headers => true
pod 'FirebaseCoreInternal', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true
pod 'FirebaseCore', :modular_headers => true
Actually you can `move use_frameworks! :linkage => :static` to right before `target 'App' do` without adding modular_headers
if that works on my ios device, i will subscribe bro
but how create sticker notification for launcher?
Insane complex...
"there's no apps in this project", and I can't add one cause I don't know what my package name is
Do you know how to update the app badgecount when the app is closed in react native ios app?
Thanks for asking yes you can update your badge count using Notification.Push.setBadgeCount(11);
It will help me to solve
@@CodeWithAdnan it used when the app is open state I was asking that when it is closed or when we kill the app
@@shashikumar-vi3sz Then you should handle it on the server side and manage it using payload.
Okay got it Thank You
Will this work on a simulator?
No work this in real device
Hope this will work in TestFlight version@@CodeWithAdnan
Allo need help please i did everything but notification never show on my device (ios) i have a paid account PLEASE HELP i'm working on a project
did you find a solution? stucked too. did everything as in tutorial, but not getting notifications
Thanks You
Hai I am using react native expo and the push notifications is working fine for 1st few minutes of login(registering token to my backend) after few minutes notification not working help me please( notification always working fine in my web application) help me struggling for a month
Does anyone having problems with iOS?. I've tried with an emulator and it worked , but when i use my iphone i don't see the notification
No test in real device
in Capabilty dont show me Push Notifications in xcode helppppppppp
Brother it’s impossible
its already enabled by default. just scroll down in signing and capabilities
because somehow this guy doesn't want you to know that you need to pay Apple Development certificate before you can have that functionality enabled in your xcode unless maybe asks him first about it?
that's wrong If i want this then why I creating this video.@@fpgghos
Is it possible to combine the codes with the tutorial you give for android?
Yes you can be use this same code for android but need to configure firebase in android
firebase.h file not found
Do I need a paid apple developer account for this?
Yes Its compulsory 😊
Bhai sirf IOS ke liye dikha rha hai to Android kyu likh rhkha hai
Bro apna first part dakha kia wo Android ka hi hai
Adnan selam Turk musun?
No I am from Pakistan
i am facing 'FirebaseStorage/FirebaseStorage-Swift.h' file not found error