FirebaseAnalytics implementation with Carthage not uploading events succesfully - using SwiftPM Firebase is fine
Dear team, we are using the Carthage Firebase static libraries for iOS in our project. However, we have problems getting FirebaseAnalytics events to successfully upload to Firebase and see them in the DebugView. Using the same project and installing Firebase with Swift Package Manager works though. However, we currently depend on Carthage for dependencies.
-I updated the Carthage libraries to 9.4.0 and included the xcframeworks in the project.
The logs say: -[FirebaseAnalytics][I-ACS023007] Analytics v.9.4.0 started -[FirebaseAnalytics][I-ACS023009] Debug logging enabled -[FirebaseAnalytics][I-ACS029014] Successfully parsed a configuration. Version: 1659486786748774 -[FirebaseAnalytics][I-ACS031029] Logging screen view with screen name and screen class -[FirebaseAnalytics][I-ACS023028] Upload task scheduled to be executed in approx. (s): -628.996435046196
-[FirebaseAnalytics][I-ACS023012] Analytics collection enabled -[FirebaseAnalytics][I-ACS023027] Do not schedule an upload task. Task already exists. Will be executed in seconds: -629.1889350414276 -[FirebaseAnalytics][I-ACS023033] Starting data upload -[FirebaseAnalytics][I-ACS023034] Network operation is pending. Ignoring upload request
-[FirebaseAnalytics][I-ACS800016] Cannot find activated flag. Looking for launched flag. SDK name, flag name, launched flag: app_measurement, network_background_session_enabled, (nil)
-[FirebaseAnalytics][I-ACS900000] Uploading data.
-[boringssl] boringssl_metrics_log_metric_block_invoke(153) Failed to log metrics
logs.txt

I found a few problems with this issue:
- I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
- This issue does not seem to follow the issue template. Make sure you provide all the required information.
@frankdeboer1985 Thanks for the report. Is this a regression with 9.4.0 that used to work? Or is it a new integration?
Did you add $(OTHER_LDFLAGS) -ObjC flag to "Other Linker Flags" in "Build Settings"?
Does it help to add AdSupport.framework to the Link Binary with Libraries Build Phase?
Hi Paul, it's a new integration from our side. We were on 7.4.0 before. But also with that version the Analytics Debug didn't work. I can try what you mention here.
@paulb777 I did notice the versions and dependencies which I get using Swift Package Manager are a little different from the Carthage sources. The fix versions for some of the libraries are different. Do you have a working example using Carthage and Firebase Analytics where the events are visible in the Debug View?

@paulb777 after further investigation it seems that AppDynamics initialisation is interfering with Firebase Analytics to upload data. When AppDynamics is running then FirebaseAnalytics is not able to send events and this shows in the logs:
-[FirebaseAnalytics][I-ACS023034] Network operation is pending. Ignoring upload request
When AppDynamics is disabled then the log message Upload succeeded appears for FirebaseAnalytics and events are shown in the Debug View.
Frank.
@frankdeboer1985 Thanks for isolating the issue and sharing the results of your investigation.
I'm not sure we'll be able to do too much since the problem is related to the AppDynamics SDK interaction, but I can leave the issue open for now, if there are any ideas or suggestions.
Going to close since there is nothing actionable for Firebase