Swift Tutorial: How to integrate Firebase Push Notification | FCM | Part 2

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 พ.ย. 2018
  • In this tutorial we will see how to integrate Firebase Cloud Messaging push notifications in our iOS Swift project.
    It is pretty straight forward and easy to implement however it requires a paid developer Apple account.
    This is the Part 2 of the series
    Part 1 - • Swift Tutorial: How to...
    Please leave comment for any iOS Swift topic that you wish to learn about and don't forget to Subscribe my channel.
    BE MY FRIEND:
    / sanamsuri369
    / sanamsuri369
    Support Channel - www.paypal.me/sanamsuri

ความคิดเห็น • 81

  • @parcoco2971
    @parcoco2971 4 ปีที่แล้ว

    You are a life saved man, thanks. Just a reminder for all to always check the reversed client id and check if it matches the one present in your applications url scheme.

  • @benjaminsmallsonjackson7805
    @benjaminsmallsonjackson7805 3 ปีที่แล้ว

    You are a legend! The best! Second to none! You are a king amongst peasants! Thank you so much for the tutorial it is incredible

  • @RippleClips
    @RippleClips 4 ปีที่แล้ว

    Great video, the Firebase documentation was fairly vague, but this cleared it right up.

  • @mustafammq4989
    @mustafammq4989 4 ปีที่แล้ว +1

    I fucking love you bro!
    i have been trying to fix this shit for 2 days until i found you.

  • @oonegan
    @oonegan 5 ปีที่แล้ว +1

    Helped!
    Thank you so much!

  • @derencewalk
    @derencewalk 5 ปีที่แล้ว

    Amazing tutorial. Thank you, sir!

  • @flawtista
    @flawtista 5 ปีที่แล้ว

    Congratulations on the video. Helped me a lot. As they say here in Brazil: Show de bola! (cool/awesome)

  • @susindangol8803
    @susindangol8803 4 ปีที่แล้ว

    Thanks bro, helped me alot. Developer looking for PN tutorial with firebase, you are at the right place :D

  • @erinfalconer1139
    @erinfalconer1139 5 ปีที่แล้ว

    Brilliant Video mate! helped me immensely.... thank you !

  • @paypointdigitalexperience2373
    @paypointdigitalexperience2373 5 ปีที่แล้ว

    Thanks a lots Part 1 and Part2 are really awesome !!!

  • @sonyalfa2269
    @sonyalfa2269 5 ปีที่แล้ว

    Thanks for the video. Its great tutorial, can follow and implement successfully.

  • @davidchopin6583
    @davidchopin6583 5 ปีที่แล้ว

    Phenomenal Video. Simplified the process for me.

  • @sarangborude8260
    @sarangborude8260 4 ปีที่แล้ว +1

    Awesome explanation!!!! You rock!

  • @ruxindiao4683
    @ruxindiao4683 5 ปีที่แล้ว

    Thanks so much, you saved my day!

  • @TomerHY
    @TomerHY 5 ปีที่แล้ว +1

    good job you saved me tones of time

  • @juanseherrera8616
    @juanseherrera8616 5 ปีที่แล้ว

    Thank you man!!!! Awesome video

  • @charleshe4887
    @charleshe4887 4 ปีที่แล้ว

    Thank you so much!! Best tutorial ever! Much appreciated from chinese developer

  • @shxrpe3646
    @shxrpe3646 5 ปีที่แล้ว +1

    I spent 3 hours trying to make this work, but I only ever got the notification in the console. I watched your video and it worked instantly, thank you so much!!!

  • @angelomeloin1
    @angelomeloin1 5 ปีที่แล้ว +1

    Thanks very much!

  • @willasaskara
    @willasaskara 4 ปีที่แล้ว

    thanks man!

  • @teamchang4894
    @teamchang4894 3 ปีที่แล้ว

    Thank you!!!

  • @user-zp4jz5cr8x
    @user-zp4jz5cr8x 3 ปีที่แล้ว

    Thank you so much for your work, sir! I had been struggling with FCM for a whole day yesterday due to a lack of explanation on the firebase doc but your tutorial totally solved the issue!! Now, I can send Push notification whenever I want easily from Firebase console!!!! Much appreciation from Japan!

  • @shakhzodurinboev9643
    @shakhzodurinboev9643 4 ปีที่แล้ว

    good tutorial
    thanks for your help

  • @aniltodkar6199
    @aniltodkar6199 4 ปีที่แล้ว

    Thanks Helpful Video

  • @whatinthai
    @whatinthai 5 ปีที่แล้ว

    Great deep detail. This is save me to finish my IOS FCM project. Also this vdo is clear for background, foreground messaging.
    I have finished project for Android FCM and got painless about foregound messaging.
    Thank u very much Sanam.

  • @AmitPant05
    @AmitPant05 5 ปีที่แล้ว

    Really helpful video... I appreciate your effort

  • @Provaplaylist
    @Provaplaylist 5 ปีที่แล้ว

    Massive thanks !!

  • @gouravpatil7949
    @gouravpatil7949 5 ปีที่แล้ว

    Thank you very much we need more videos...

  • @rapidmon17
    @rapidmon17 3 ปีที่แล้ว

    Thank you for doing god's work. I got this working thanks to you. Thank you.

  • @gulfamkhan4743
    @gulfamkhan4743 5 ปีที่แล้ว

    Awesome work man cheers

  • @zulhilmizamri8529
    @zulhilmizamri8529 5 ปีที่แล้ว +1

    Many Thanks Bro

  • @cieltelecom
    @cieltelecom 4 ปีที่แล้ว

    Thanks Bro!!!!!

  • @drengin777
    @drengin777 4 ปีที่แล้ว

    Thanks a lot Bro..

  • @rishavsaxena3136
    @rishavsaxena3136 5 ปีที่แล้ว

    chaa gaye sanam bhai

  • @MrZekado
    @MrZekado 5 ปีที่แล้ว

    Thank you! I have done myself all the code well, but I forgot to enable the Background Modes and nothing works! You have saved my day of work!

  • @aliasadi2550
    @aliasadi2550 5 ปีที่แล้ว

    thank you very much. i was looking for such a tutorial. there are many of this videos on youtube. i wish you could cover the all custom notification like changing the alert and the message.

  • @maazsiddiqui1804
    @maazsiddiqui1804 4 ปีที่แล้ว

    Thanks Bro..

  • @rohithsingh8040
    @rohithsingh8040 5 ปีที่แล้ว +6

    Thanks Bro.., Really this Video Helped me a lot.. I need one more help please post a video or tutorial how to call API using firebase

  • @ManishGupta-cn7ei
    @ManishGupta-cn7ei 5 ปีที่แล้ว

    Great video, did not even have to repeat once... just flowed through it... also you should make a video on how push notification can be sent using node.js function in firebase... for example when users interact in the app like sending a chat message or something...

  • @explosionradical
    @explosionradical 3 ปีที่แล้ว

    wonderful video, By any chance can you make a video showing how to pass the notification data and display in view controller. Thanks.

  • @rancreation2012
    @rancreation2012 5 ปีที่แล้ว +1

    Your tutorial is good. I hope you to blur content if nessasary way..
    Please do it for nessasary things. otherwize viewers can't get good
    attantion with your app.. thanks and God luck..

  • @joshw7129
    @joshw7129 5 ปีที่แล้ว

    I really
    Need help on taking the push notifications from Firebase and posting them into a tableView. Could you do a video on that?

  • @michonhundman3846
    @michonhundman3846 5 ปีที่แล้ว

    Great video! But I was wondering if you could create another video explaining how to use an action and publish a push notification within the app instead of going to firebase push notification composer. Thanks

  • @DanKardell
    @DanKardell 2 ปีที่แล้ว

    Great job, but how do you generate push messages programmatically vs the console?

  • @NadaALbahri95
    @NadaALbahri95 4 ปีที่แล้ว

    please, explain how to change app language according to language of the device system.

  • @chandanamadusanka955
    @chandanamadusanka955 4 ปีที่แล้ว

    Thanks for the video. Its great tutorial, This works for me, but I have one question. When the app is in the background, push notification receive call back functions are not triggering. It works perfectly when the app is in the foreground. Is there any other call back function to call when the app is in the background mode?

  • @lalitwartiz9087
    @lalitwartiz9087 4 ปีที่แล้ว

    hey hi sanam greate tutorial now next step is that how to enable notification form api?

  • @brandondoggett2775
    @brandondoggett2775 4 ปีที่แล้ว

    Great video - just one issue:
    I get the error: Use of unresolved identifier 'gcmMessageIDKey'
    thanks for your help

  • @NadaALbahri95
    @NadaALbahri95 4 ปีที่แล้ว

    Could you please explain how to fetch video from firebase to the app in random.

  • @deweygaedcke7350
    @deweygaedcke7350 5 ปีที่แล้ว

    I did not receive APNS msgs until I actually set the received APSN toke onto the Messaging() instance. Swizzling is ON but this was still necessary & I don't know why. People on SO were saying you must update FCM with the APNS token whenever it changes.

  • @alimorsel2229
    @alimorsel2229 5 ปีที่แล้ว

    thanks very much .. but how to get message data in background ??

  • @ikennaudokporo6061
    @ikennaudokporo6061 4 ปีที่แล้ว

    great video but no sound with notification

  • @faizalm3040
    @faizalm3040 5 ปีที่แล้ว

    Need help with receiving url from push notification and display to app

  • @niteshkumar2133
    @niteshkumar2133 4 ปีที่แล้ว

    How to send notification to particular user. As per your demo it is for everyone who has this application.

  • @charlesleota7513
    @charlesleota7513 4 ปีที่แล้ว

    Amazing tutorial, however, I'm getting an error with Type 'Notification' has no member 'Name' from the line of code below... thoughts?
    let dataDict:[String: String] = ["token": fcmToken]
    NotificationCenter.default.post(name: Notification.Name("FCMToken"), object: nil, userInfo: dataDict)...

  • @Provaplaylist
    @Provaplaylist 5 ปีที่แล้ว

    I was wondering to know how we redirect user to a specific page of the app once a notification is delivered and opened by the users??

  • @khaledbohout3227
    @khaledbohout3227 4 ปีที่แล้ว

    Say i have a chatting app and i want to notify a user that he received a message ..how can go about doing that?
    Thanks alot

  • @aidenchan2292
    @aidenchan2292 4 ปีที่แล้ว

    can you show how to push notification by using swift code no using firebase web?

  • @snowcycle7
    @snowcycle7 4 ปีที่แล้ว +1

    The like to dislike ratio says it all.

  • @bluekaioken5924
    @bluekaioken5924 5 ปีที่แล้ว

    Hey man, Thanks, you seem to know this stuff good, one question, how do I send a notification from my phone to someone else's phone using the app ? say I send him a message and he gets notification that it was me, thanks in advance

    • @hfshan
      @hfshan 4 ปีที่แล้ว

      We can't send notification directly to some other device. We have to use a server that to push the notification.

  • @ximenadelatijera
    @ximenadelatijera 5 ปีที่แล้ว +2

    I don't receive the notifications, not even in the log. What do you think might be the problem?

    • @amerhadi8546
      @amerhadi8546 5 ปีที่แล้ว

      did you fix it out ?! because I have the same issue!

    • @bergetun
      @bergetun 4 ปีที่แล้ว

      I have he same problem

  • @ComRads7channel
    @ComRads7channel 5 ปีที่แล้ว

    Use of unresolved identifier 'gcmMessageIDKey'

  • @norberthaubner9515
    @norberthaubner9515 5 ปีที่แล้ว

    For some reason the "Send your first message" button on the firebase website is not working, it's like it's an image instead of a button. Any ideas what the issue could be?

  • @munnabandi1107
    @munnabandi1107 5 ปีที่แล้ว

    do we need an iphone device for this?

  • @MultiDesignWork
    @MultiDesignWork 5 ปีที่แล้ว +1

    Hello, I have one question, how do I get fcmToken in Swift?

    • @gulfamkhan4743
      @gulfamkhan4743 5 ปีที่แล้ว +1

      func getToken() {
      InstanceID.instanceID().instanceID { (result, error) in
      if let error = error {
      print("Error fetching remote instange ID: \(error)")
      } else if let result = result {
      print("Remote instance ID token: \(result.token)")
      AppManager.shared.deviceToken = result.token
      }
      }
      }
      you can get token bu calling this method

    • @teamchang4894
      @teamchang4894 3 ปีที่แล้ว +1

      @@gulfamkhan4743 this method has been deprecated. Recommended method by firebase below:
      Messaging.messaging().token { token, error in
      if let error = error {
      print("Error fetching FCM registration token: \(error)")
      } else if let token = token {
      print("FCM registration token: \(token)")
      }
      }

  • @balkaransingh5919
    @balkaransingh5919 4 ปีที่แล้ว

    sir please help me I am add a notification text show
    0% of potential users are eligible for this campaign:0
    How to solve?

    • @PublicVoidGeek
      @PublicVoidGeek  4 ปีที่แล้ว

      That means your app on the device is not talking to the firebase. Make sure you are testing on a real device and not on an emulator.

  • @francescodesalvo5395
    @francescodesalvo5395 5 ปีที่แล้ว

    I did exactly the same as you, but the notifications do not arrive and i'm not using a virtual device

    • @PublicVoidGeek
      @PublicVoidGeek  5 ปีที่แล้ว

      Please make sure you are running it on real device and should establish connection flag is set to true.

    • @ximenadelatijera
      @ximenadelatijera 5 ปีที่แล้ว

      @@PublicVoidGeek I used the simulator AND my phone and am not getting the notifications. They also don't appear on the console log so I'm not receiving them from Firebase. What do you think might be the problem?

  • @madhuramarapu8823
    @madhuramarapu8823 5 ปีที่แล้ว

    Video is not playing.... Y so upto 1 minute video is playing. After that it shows loading. ...

    • @PublicVoidGeek
      @PublicVoidGeek  5 ปีที่แล้ว

      Must be youtube issue... Try to play on incognito

  • @pavelpavlov302
    @pavelpavlov302 5 ปีที่แล้ว

    BEISIKALLY

  • @rancreation2012
    @rancreation2012 5 ปีที่แล้ว

    Your tutorial is good. I hope you to blur content if nessasary way..
    Please do it for nessasary things. otherwize viewers can't get good
    attantion with your app.. thanks and God luck..