How to Fetch a User Profile Using Firebase Database

preview_player
Показать описание
How to Fetch a User Profile Using Firebase Database

Want to learn Firebase Database? Are you trying to learn firebase realtime database or firebase in general? Are you looking for a good swift firebase database video? Then you are in the right place because this swift 5 firebase video is perfect for you!
In this firebase swift episode I’ll guide you through creative coding, set up firebase ios, firebase rules, firebase updates and real-time database. This is a step by step tutorial on ios database, read data from firebase, realtime database, how to retrieve data from firebase and api ios. In this firebase tutorial we are going to fetch back our user profile data from Firebase Database and Firebase Storage. We will build out a simple User Profile with the help of LBTAComponents. We will even go for a small bug hunt at the end of this lesson. As always, we are going to build out everything in code and because we want a production state app. We will focus on firebase authentication, database as a service and fetch data from firebase in general. Don’t forget to subscribe to my channel for more ios firebase and swift database videos.
Because adding the progress huds is so time consuming I have left this part out, but you can still have it in your code if you take a look at the resources for this video here:
Let's dive into this realtime database firebase tutorial by Rebeloper!
Let’s get to work!

In the previous video in this all things Firebase Authentication series we have saved our user data into Firebase:

In the next episode I’ll show you how to sign in with Twitter:
____________________________________________________________________
Don’t forget to download the resources:

***VIDEOS I RECOMMEND***

UIKit Tutorial Swift 2020

DO YOU WANT TO BE MY APPRENTICE?

__________
Say hi on social:

Get in touch:

SUBSCRIBE to weekly tips & tutorials for building iOS apps!

_____

#rebeloper
Комментарии
Автор

What other data would you fetch for your user? Leave your comments down below.

rebeloper
Автор

That is a very neat - nice - cool - clean - best way to explain a very simple important function .

tariqAlmazyad
Автор

I went through your playlist and did not find how do I upload the data to database and the show the same data to the appropriate user so he can login from any device and have the same data. It probably has to do with the UID but I am not sure how to implement. Do you have a video covering that?

viktorkuzmanov
Автор

Hi there, first off this has helped me so much as I have found getting data from firebase to be so confusing for some reason so really thank you!!!. The only issue is that for some reason when I run the program I get a "Thread 1: Fatal error: init(coder:) has not been implemented" in the cachedImageView in the LBTAComponents... Is there a solution to this because I tried to just delete that line of code but nothing :/.

usmaanmahmood
Автор

video on how to change profile information
please!

videos are awesome

JTruth
Автор

Can you make a tutorial how to record audio / upload to firebase and retrieve it and play it .

tariqAlmazyad
Автор

Love the video but how could I fetch all of my registered users into a single table view ?

Thank you for your consideration.

tahjerelewis
Автор

i am using the same code, but its keep updating my data in firebase, with the same name email and phone, i did nothing extra, just fetching the data like you did in video, thanks in advance

kerrybiz
Автор

Hey there! - firstly great video...

I have followed your video in particular the way you fetch the info from Firebase and display the values. I am however getting a 'EXC_BAD_ACCESS' on this line of my code user.profilePictureURL)'

Here is my full function which uses a 'getLoggedinUserDetails()' to fetch the data and returns a CurrentUser object with the attributes required to display the 'name' and load the image.

Any ideas why I am getting this error?



import LBTAComponents

@IBOutlet weak var profileImg: CachedImageView!


//Displays the logged in user details eg; profile image and name
func displayUserDetails(){

if Auth.auth().currentUser != nil {

guard let uid = Auth.auth().currentUser?.uid else { return }
uid, currentUserHandler: { (user) in

self.nameLbl.text = user.name
user.profilePictureURL) //Thread 1: EXC_BAD_ACCESS (code=2, address=0x1b2baacc0)

})
}

}//end func

rigaldamez
Автор

You should re-do thi amazing video now with SwiftUI 🙏

ZaxyG
Автор

Hi I am receiving an error which I cannot get rid of. Listener at failed: permission_denied
Error Domain=com.firebase Code=1 "Permission Denied" Denied}


I have tried changing the database rules to {
"rules": {
".read": "auth != true",
".write": "auth != true"
}
}


But this does not fix it as I believe this is an old solution. Can you help me, please?

joshualatham
Автор

unable to download this code plz tell me how i can download this code ?

indoregallery
Автор

This method will only work for firebase Realtime database and will not work for FirebaseFIRESTORE i have tested it on both databases only works for firebase Realtime database @Rebeloper - Rebel Developer should have mentioned it in the title

haseebali
visit shbcf.ru