firebase-kotlin-sdk
firebase-kotlin-sdk copied to clipboard
Analytics linking issues
trafficstars
When adding analytics to project, there is some linking issue with Xcode. My setup works fine for other libraries (like auth, firestore, storage even messaging), but not for analytics. Any help would be greatly appreciated.
My configuration looks something like this:
build.gradle.kts:
kotlin {
cocoapods {
framework {
isStatic = false
}
pod("FirebaseCore") {
version = "11.1.0"
linkOnly = true
}
pod("FirebaseAnalytics") {
version = "11.1.0"
linkOnly = true
}
}
sourceSets.commonMain.dependencies {
implementation("dev.gitlive:firebase-common:2.1.0")
implementation("dev.gitlive:firebase-analytics:2.1.0")
}
}
Podfile:
pod 'FirebaseCore', '11.1.0'
pod 'FirebaseAnalytics', '11.1.0'
Error:
e: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld invocation reported errors
The /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld command returned non-zero exit code: 1.
output:
ld: warning: ignoring duplicate libraries: '-ldl'
Undefined symbols for architecture arm64:
"_FIRInstallationIDDidChangeNotification", referenced from:
+[FIRAnalytics observeFirebaseInstallationIDChanges] in FirebaseAnalytics[10](FIRAnalytics.o)
"_GULIsLoggableLevel", referenced from:
-[APMMonitor isLoggableLevel:] in GoogleAppMeasurement[69](APMMonitor.o)
"_GULOSLogBasic", referenced from:
-[APMASLLogger logMessage:logTag:messageCode:withLogLevel:] in GoogleAppMeasurement[12](APMASLLogger.o)
"_GULOSLogError", referenced from:
-[APMPersistentDictionary initWithFileName:] in GoogleAppMeasurement[262](APMPersistentDictionary.o)
_APMWriteDictionaryToURL in GoogleAppMeasurement[262](APMPersistentDictionary.o)
-[APMUserDefaults synchronize] in GoogleAppMeasurement[316](APMUserDefaults.o)
"_GULOSLogInfo", referenced from:
___44+[UIViewController(APMScreenClassName) load]_block_invoke in GoogleAppMeasurement[335](UIViewController+APMScreenClassName.o)
"_GULOSLogWarning", referenced from:
+[APMMeasurement sharedInstance] in GoogleAppMeasurement[62](APMMeasurement.o)
-[APMPersistentDictionary objectForKey:] in GoogleAppMeasurement[262](APMPersistentDictionary.o)
-[APMPersistentDictionary setObject:forKey:] in GoogleAppMeasurement[262](APMPersistentDictionary.o)
-[APMUserDefaults objectForKey:] in GoogleAppMeasurement[316](APMUserDefaults.o)
-[APMUserDefaults setObject:forKey:] in GoogleAppMeasurement[316](APMUserDefaults.o)
-[APMUserDefaults synchronize] in GoogleAppMeasurement[316](APMUserDefaults.o)
___44+[UIViewController(APMScreenClassName) load]_block_invoke in GoogleAppMeasurement[335](UIViewController+APMScreenClassName.o)
...
"_GULSetLoggerLevel", referenced from:
-[APMMonitor setDebugModeEnabled:] in GoogleAppMeasurement[69](APMMonitor.o)
-[APMMonitor setDebugModeEnabled:] in GoogleAppMeasurement[69](APMMonitor.o)
-[APMMonitor setVerboseLoggingEnabled:] in GoogleAppMeasurement[69](APMMonitor.o)
"_OBJC_CLASS_$_FIRInstallations", referenced from:
in FirebaseAnalytics[10](FIRAnalytics.o)
"_OBJC_CLASS_$_GULAppDelegateSwizzler", referenced from:
in GoogleAppMeasurement[7](APMAnalytics.o)
"_OBJC_CLASS_$_GULAppEnvironmentUtil", referenced from:
in GoogleAppMeasurement[5](APMAEU.o)
"_OBJC_CLASS_$_GULMutableDictionary", referenced from:
in GoogleAppMeasurement[35](APMEExperiment.o)
"_OBJC_CLASS_$_GULNetwork", referenced from:
in GoogleAppMeasurement[7](APMAnalytics.o)
"_OBJC_CLASS_$_GULSwizzler", referenced from:
in GoogleAppMeasurement[335](UIViewController+APMScreenClassName.o)
"_kGULNetworkHTTPStatusCodeCannotAcceptTraffic", referenced from:
-[APMETaskManager handleFetchingExperimentsResponse:data:error:] in GoogleAppMeasurement[42](APMETaskManager.o)
-[APMMeasurement networkUploadCompletionHandlerWithResponse:error:] in GoogleAppMeasurement[62](APMMeasurement.o)
-[APMMeasurement networkRemoteConfigFetchCompletionHandler:data:error:] in GoogleAppMeasurement[62](APMMeasurement.o)
"_kGULNetworkHTTPStatusCodeNotFound", referenced from:
-[APMMeasurement networkRemoteConfigFetchCompletionHandler:data:error:] in GoogleAppMeasurement[62](APMMeasurement.o)
"_kGULNetworkHTTPStatusCodeNotModified", referenced from:
___37-[APMMeasurement retrievePSMResponse]_block_invoke in GoogleAppMeasurement[62](APMMeasurement.o)
-[APMMeasurement networkRemoteConfigFetchCompletionHandler:data:error:] in GoogleAppMeasurement[62](APMMeasurement.o)
-[APMMeasurement(SKAN) handleSKANFetchResponse:data:error:] in GoogleAppMeasurement[67](APMMeasurement+SKAN.o)
___46-[APMMeasurement(URL) requestDeferredDeepLink]_block_invoke in GoogleAppMeasurement[68](APMMeasurement+URL.o)
"_kGULNetworkHTTPStatusCodeUnavailable", referenced from:
-[APMETaskManager handleFetchingExperimentsResponse:data:error:] in GoogleAppMeasurement[42](APMETaskManager.o)
-[APMMeasurement networkUploadCompletionHandlerWithResponse:error:] in GoogleAppMeasurement[62](APMMeasurement.o)
-[APMMeasurement networkRemoteConfigFetchCompletionHandler:data:error:] in GoogleAppMeasurement[62](APMMeasurement.o)
"_kGULNetworkHTTPStatusNoContent", referenced from:
-[APMETaskManager handleFetchingExperimentsResponse:data:error:] in GoogleAppMeasurement[42](APMETaskManager.o)
-[APMMeasurement networkUploadCompletionHandlerWithResponse:error:] in GoogleAppMeasurement[62](APMMeasurement.o)
___37-[APMMeasurement retrievePSMResponse]_block_invoke in GoogleAppMeasurement[62](APMMeasurement.o)
-[APMMeasurement networkRemoteConfigFetchCompletionHandler:data:error:] in GoogleAppMeasurement[62](APMMeasurement.o)
___46-[APMMeasurement(URL) requestDeferredDeepLink]_block_invoke in GoogleAppMeasurement[68](APMMeasurement+URL.o)
"_kGULNetworkHTTPStatusOK", referenced from:
-[APMETaskManager handleFetchingExperimentsResponse:data:error:] in GoogleAppMeasurement[42](APMETaskManager.o)
-[APMMeasurement networkUploadCompletionHandlerWithResponse:error:] in GoogleAppMeasurement[62](APMMeasurement.o)
___37-[APMMeasurement retrievePSMResponse]_block_invoke in GoogleAppMeasurement[62](APMMeasurement.o)
-[APMMeasurement networkRemoteConfigFetchCompletionHandler:data:error:] in GoogleAppMeasurement[62](APMMeasurement.o)
-[APMMeasurement(SKAN) handleSKANFetchResponse:data:error:] in GoogleAppMeasurement[67](APMMeasurement+SKAN.o)
___46-[APMMeasurement(URL) requestDeferredDeepLink]_block_invoke in GoogleAppMeasurement[68](APMMeasurement+URL.o)
"_pb_decode", referenced from:
_apmpb_decode_ad_campaign_info in GoogleAppMeasurement[79](apmpb_ad_campaign_info_decoder.o)
_apmpb_decode_app_property in GoogleAppMeasurement[82](apmpb_app_property_decoder.o)
_apmpb_decode_audience in GoogleAppMeasurement[85](apmpb_audience_decoder.o)
_apmpb_decode_audience in GoogleAppMeasurement[85](apmpb_audience_decoder.o)
_apmpb_decode_audience_leaf_filter_result in GoogleAppMeasurement[88](apmpb_audience_leaf_filter_result_decoder.o)
_apmpb_decode_audience_leaf_filter_result in GoogleAppMeasurement[88](apmpb_audience_leaf_filter_result_decoder.o)
_apmpb_decode_client_property in GoogleAppMeasurement[91](apmpb_client_property_decoder.o)
_apmpb_decode_client_property in GoogleAppMeasurement[91](apmpb_client_property_decoder.o)
...
"_pb_decode_varint", referenced from:
_nano_decode_repeated_uint64 in GoogleAppMeasurement[320](decoder_common.o)
"_pb_encode", referenced from:
_nano_two_pass_encoding in GoogleAppMeasurement[321](encoder_common.o)
_nano_two_pass_encoding in GoogleAppMeasurement[321](encoder_common.o)
"_pb_encode_string", referenced from:
_nano_encode_string in GoogleAppMeasurement[321](encoder_common.o)
"_pb_encode_submessage", referenced from:
_apmpb_encode_repeated_ad_campaign_info in GoogleAppMeasurement[80](apmpb_ad_campaign_info_encoder.o)
_apmpb_encode_repeated_app_property in GoogleAppMeasurement[83](apmpb_app_property_encoder.o)
_apmpb_encode_repeated_audience in GoogleAppMeasurement[86](apmpb_audience_encoder.o)
_apmpb_encode_repeated_audience_leaf_filter_result in GoogleAppMeasurement[89](apmpb_audience_leaf_filter_result_encoder.o)
_apmpb_encode_repeated_client_property in GoogleAppMeasurement[92](apmpb_client_property_encoder.o)
_apmpb_encode_repeated_consent_config in GoogleAppMeasurement[95](apmpb_consent_config_encoder.o)
_apmpb_encode_repeated_consent_default_entry in GoogleAppMeasurement[98](apmpb_consent_default_entry_encoder.o)
...
"_pb_encode_tag_for_field", referenced from:
_apmpb_encode_repeated_ad_campaign_info in GoogleAppMeasurement[80](apmpb_ad_campaign_info_encoder.o)
_apmpb_encode_repeated_app_property in GoogleAppMeasurement[83](apmpb_app_property_encoder.o)
_apmpb_encode_repeated_audience in GoogleAppMeasurement[86](apmpb_audience_encoder.o)
_apmpb_encode_repeated_audience_leaf_filter_result in GoogleAppMeasurement[89](apmpb_audience_leaf_filter_result_encoder.o)
_apmpb_encode_repeated_client_property in GoogleAppMeasurement[92](apmpb_client_property_encoder.o)
_apmpb_encode_repeated_consent_config in GoogleAppMeasurement[95](apmpb_consent_config_encoder.o)
_apmpb_encode_repeated_consent_default_entry in GoogleAppMeasurement[98](apmpb_consent_default_entry_encoder.o)
...
"_pb_encode_varint", referenced from:
_nano_encode_repeated_uint64 in GoogleAppMeasurement[321](encoder_common.o)
"_pb_istream_from_buffer", referenced from:
_apmpb_decode_ad_campaign_info in GoogleAppMeasurement[79](apmpb_ad_campaign_info_decoder.o)
_apmpb_decode_app_property in GoogleAppMeasurement[82](apmpb_app_property_decoder.o)
_apmpb_decode_audience in GoogleAppMeasurement[85](apmpb_audience_decoder.o)
_apmpb_decode_audience in GoogleAppMeasurement[85](apmpb_audience_decoder.o)
_apmpb_decode_audience_leaf_filter_result in GoogleAppMeasurement[88](apmpb_audience_leaf_filter_result_decoder.o)
_apmpb_decode_audience_leaf_filter_result in GoogleAppMeasurement[88](apmpb_audience_leaf_filter_result_decoder.o)
_apmpb_decode_client_property in GoogleAppMeasurement[91](apmpb_client_property_decoder.o)
_apmpb_decode_client_property in GoogleAppMeasurement[91](apmpb_client_property_decoder.o)
...
"_pb_ostream_from_buffer", referenced from:
_nano_two_pass_encoding in GoogleAppMeasurement[321](encoder_common.o)
"_pb_read", referenced from:
_apmpb_decode_repeated_ad_campaign_info in GoogleAppMeasurement[79](apmpb_ad_campaign_info_decoder.o)
_apmpb_decode_repeated_ad_campaign_info in GoogleAppMeasurement[79](apmpb_ad_campaign_info_decoder.o)
_apmpb_decode_repeated_app_property in GoogleAppMeasurement[82](apmpb_app_property_decoder.o)
_apmpb_decode_repeated_app_property in GoogleAppMeasurement[82](apmpb_app_property_decoder.o)
_apmpb_decode_repeated_audience in GoogleAppMeasurement[85](apmpb_audience_decoder.o)
_apmpb_decode_repeated_audience in GoogleAppMeasurement[85](apmpb_audience_decoder.o)
_apmpb_decode_repeated_audience_leaf_filter_result in GoogleAppMeasurement[88](apmpb_audience_leaf_filter_result_decoder.o)
_apmpb_decode_repeated_audience_leaf_filter_result in GoogleAppMeasurement[88](apmpb_audience_leaf_filter_result_decoder.o)
...
ld: symbol(s) not found for architecture arm64
Edit: I did find an issue related to it, where it was suggested that moving analytics into separate module could fix the issue. But I was not able to replicate that setup