Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use google firebase analytics with iOS action extension

I want to gather some info of the users who are using the action extension of my iOS app with google firebase analytics. It works well with the main app. But how to make it work with the extension? Is there a way to do that? I tried to create 2 apps on google firebase console(since main app and the action extension have different bundle ids), seems don't work.

like image 679
jokeman Avatar asked Jul 13 '16 15:07

jokeman


1 Answers

According to an answer from Firebase support. What we should do is putting the [FirApp configure] at the entry point of the extension. For the action extension, I just put it at the first line under [super viewDidLoad] in viewDidLoad method.
And yes, a separate GoogleService-Info.plist file is needed.

like image 87
jokeman Avatar answered Oct 15 '22 01:10

jokeman