I'd personally hide Firebase behind abstraction layers too (would create AnalyticsProtocol in case you use it for analytics, etc.). That would address the issue automatically as you'd import your own Analytics Framework in this case. But anyway, I'm glad you don't have this problem anymore.
Honestly, it's hard to recommend something as the most knowledge I gained (and I still am gaining) was more by trial and error with real projects and when I work on real projects and have something new to learn, I just google several articles, read them and use something most convenient for me in each particular case.
And that's not very helpful advice.
However, I do find it helpful to read 'Clean Code' by Robert C. Martin that is relatively old book (more than 10 years old I believe) or watch the videos of the same name and author.
Also, I heard some good feedback on 'Code Complete' by Steve McConnell but couldn't finish it (I started reading it somewhere in 2010, years before Swift arrived, but gave up very quickly, can't remember why).
Finally, raywenderlich.com, both the website and their books are worth checking out. I used them a lot in the first couple years of my iOS development experience.
Hope that helps.