Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase Analytics on iOS Share Extension

Can Firebase Analytics events be logged from iOS App Extension such as Share Extension? I've added analytics on the main app and they are working fine and can be viewed from debug view.

For share extension I have added new app on firebase with the different bundle id and configured and added events. However I cannot see any events being logged into firebase console. Is there anything special I have to do to enable support for events from extensions? For debugging I enabled the debug mode using

FirebaseConfiguration.shared.setLoggerLevel(_:) 

After that I could see console messages that were saying events logged or so, but however none of the events are being sent to the console nor they are leaving the app (Checked through Charles Proxy App). Not sure what I've missed out on. Any help is appreciated.

I can post the code but not sure how helpful that would be as it's just calling below after the viewDidLoad is called on Extension.

FirebaseApp.Configure()

Then using

Analytics.logEvent("name", parameters: [:])

Xcode console output looks as follows with Logger Level set to .debug

[FirebaseAnalytics][I-ACS023007] Analytics v.9.4.0 started
[FirebaseAnalytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see website link removed)
[FirebaseAnalytics][I-ACS023009] Debug logging enabled
[FirebaseInstallations][I-FIS002001] -[FIRInstallationsIDController installationWithValidAuthTokenForcingRefresh:0], appName: __FIRAPP_DEFAULT
[FirebaseAnalytics][I-ACS002002] APMExperimentAlarm scheduled to fire in approx. (s): 2754.831679821014
[FirebaseAnalytics][I-ACS800023] No pending snapshot to activate. SDK name: app_measurement
[FirebaseAnalytics][I-ACS029014] Successfully parsed a configuration. Version: XXXX
[FirebaseAnalytics][I-ACS023016] Analytics is ready to receive events
[FirebaseAnalytics][I-ACS023087] User property set. Name, value: _sid, XXXXX
[FirebaseAnalytics][I-ACS023051] Logging event: origin, name, params: auto, _s, { ... }
[FirebaseAnalytics][I-ACS023072] Event logged. Event name, event params: _s, { ... }
[FirebaseAnalytics][I-ACS012018] Saving bundle. size (bytes): 639
[FirebaseAnalytics][I-ACS023116] Bundle added to the upload queue. BundleID, timestamp (ms): 14, 1661233218364
[FirebaseAnalytics][I-ACS023103] Event is under real-time event count daily limit. Marking the event as real-time. Event name, parameters: _s, { ... }
[FirebaseAnalytics][I-ACS900000] Uploading data. Host: https://app-measurement.com/a
[FirebaseAnalytics][I-ACS901006] Received SSL challenge for host. Host: https://app-measurement.com/a
[FirebaseAnalytics][I-ACS023044] Successful upload. Got network response. Code, size: 204, 0
... 
like image 392
nsuinteger Avatar asked Oct 30 '25 21:10

nsuinteger


1 Answers

Firebaser here.

Currently, Firebase Analytics does not support iOS extensions. There's already an internal request for this for our engineers to support this feature in the future. I've filed this case as another vote in favor of its implementation. However, I can't provide any details or timelines on when this might be addressed. For now, I suggest keeping an eye out for updates on our official blog and release notes for any updates.

like image 154
dani Avatar answered Nov 01 '25 10:11

dani



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!