Firebase Tutorial: Real-time Chat

Hi ! Thanks for this very helpful tutorial :ok_hand:

I am now trying to build an app out of it and I was wondering how I could do to segue from the ChannelsViewController to another View. I tried from the LaunchScreen.storyboard but it seems that I have to do it programmaticallyā€¦

So is there a way to do it with the interface builder or programmatically from the toolbar or the navigation bar ? Itā€™s been 3 days Iā€™m searching a way to do it but didnā€™t found yet.

Thanks again :v:

Hello, Iā€™m glad you enjoyed the tutorial! I created the sample project for the tutorial without storyboards. To present the channels view or the char view you need to do it programmatically in code, instead of a segue. To present another view, like a settings view controller, from the channels view controller use UIViewController.present(_:animated:completion:). You can programmatically access a storyboard in code by setting an identifier inside the view controller. Then you can present another view from a button or whatever youā€™d like.

I hope that helps!

1 Like

Hello,

Okay Iā€™ll try that way ! Thank you :ok_hand:

if your are using swift 4 then you can use

private func registerForKeyboardNotifications() {
NotificationCenter.default.addObserver(self, selector: #selector(self.keyboardWillShow(_:)), name: NSNotification.Name.UIKeyboardDidShow, object: nil)

NotificationCenter.default.addObserver(self, selector: #selector(self.keyboardWillHide(_:)), name: NSNotification.Name.UIKeyboardDidShow, object: nil)

}

This wonā€™t work as expected. You need to call .UIKeyboardWillShow and .UIKeyboardWillHide respectively. Using .UIKeyboardDidShow to call self.keyboardWillHide will hide the UI when the keyboard is completely shown. You only need to use .UIKeyboardWillShow and .UIKeyboardWillHide.

Hello,

When trying to archive the finished tutorial, I get a code signing error. Any insight into this? I do not change anything about the project when archiving.16%20PM

I just checked and itā€™s working for me.

I downloaded a fresh copy of the tutorial materials, I ran pod install, I changed the bundle identifier, and I selected my team for the automatic code signing.

If you didnā€™t follow those steps, try doing so. If it still doesnā€™t work, please explain in detail all the steps you did and where you came across an issue.

I hope that helps.

Getting this error ā†’

Value of type ā€˜MessagesCollectionViewā€™ has no member ā€˜isAtBottomā€™

On ChatViewController

@naturaln0va Can you please help with this when you get a chance? Thank you - much appreciated! :]

Hello, Iā€™m sorry youā€™re having trouble. So I can help you out, at which point in the tutorial do you experience this issue? I just tried downloading the sample project and running the starter and everything seems fine. isAtBottom is a computed property that can be found in UICollectionView+Additions.swift. However, the description of your error makes me think that something isnā€™t right with the CocoaPods setup.

Hi,

Iā€™m not sure if this is an error on my end or what, but when I download the materials for this course I only get a few byte large .xcworkspace files that refuse to open. Everything else works fine (I assume) so Iā€™m not really sure whatā€™s up. Any ideas?

Dora

Hello Dora,

You have to run pod install to configure the project with the necessary libraries to connect to Firebase and such.

What step of the tutorial are you stuck on?

Iā€™m not actually able to open the project to begin the tutorial, this is the the error I get after trying to open the project after installing the pods

33%20PM

This is a strange error, it seems like something got corrupted. Can you re-download the materials, then try installing the pods again. Also make sure to open RWRC.xcworkspace and not RWRC.xcodeproj.

This tutorial is more than six months old so questions are no longer supported at the moment for it. Thank you!