3

Is it possible to use the firebase cocoapods from within a share extension to check the current logged in user and make an upload to firebase storage?

It all works from the main app just trying to make this possible from an extension as well?

russell
  • 176
  • 1
  • 12

2 Answers2

0

I believe so--I got Firebase working in a keyboard extension, so I assume if you set app entitlements properly (sharing the keychain, which allows auth to work), it should Just Work™.

Mike McDonald
  • 15,609
  • 2
  • 46
  • 49
  • Thanks! so I just had a quick look and in the Podfile you have the firebase pods set for the extension only, so i suppose i'll just need to add another target for the extension rather than try to reference from the ones used in the main app – russell Nov 11 '16 at 17:52
  • You seem to just be "signing-in" anonymously rather than using the auth from the parent app - which is what was asked by @russell. Do you have a solution for that? – siburb Oct 18 '17 at 03:22
  • 1
    @siburb This way the way I worked around it in the end, creating a separate user for accessing the extension but saved a reference of the active users userid to use. – russell Oct 18 '17 at 14:53
0

It is possible, I have a share extension working with firebase storage. Unfortunately I haven't been able to get the database working with extensions. I think this might be because some API's don't work in extensions and maybe the one that deals with firebase database isn't availible.