Update:
Firebase confirms that a fix is targeted for 5.2.x version. Track the Github issue for latest updates.
It seems as Firebase is not officially supporting extensions in iOS. I have got that info from this GitHub issue (see paulb777's answer). Maybe someone from Firebase can also confirm this here. I am very surprised that we can't use Firebase SDK when creating extensions such as a Today widget.
The only workaround I had was reverting back to an earlier version of Firebase via:
pod 'Firebase', '4.9.0'
This uses the 4.9.0 version of the Firebase SDK and doesn't create compiler errors.