Lecture material: Present user information from Firebase auth data.

Previous chapter
https://fredriccliver.medium.com/lecture-material-google-sign-in-with-firebase-in-ios-256504d8deb5

After logged in, you can retrieve user information like email and name and profile picture.

You can find which items you can use, with the break point after you got the Auth.auth().currentUser value.

To update user profile picture, you'd be better to use KingFisher library

Add this line into your Profile, and install.

pod 'Kingfisher'

If you have still opened Xcode when you install a pod library, you’ll face this popup

Just select the above button ‘Read from Disk’

Import the Kingfisher library

It is enough with the user.photoURL value to load the profile picture. If you need to know more about the parameters, refer to the official git repository above.

Kingfisher make you write shorter lines to set and change images. And the placeholder option is good when you handle the error with a default image.

--

--

Majored in Physics, self-taught and worked in the IT industry as a Dev/Design/Planning for 11 years. And I had run my Startup for 3 years. I fancy a ☔️ 🇬🇧

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Fredric Cliver

Majored in Physics, self-taught and worked in the IT industry as a Dev/Design/Planning for 11 years. And I had run my Startup for 3 years. I fancy a ☔️ 🇬🇧