Closed DosangGu closed 5 months ago
Review the README instructions at https://github.com/AdamEssenmacher/GoogleApisForiOSComponents and report back.
Should have checked the instruction. It worked fine. Thanks for your reply.
No problem. We didn't add the new instruction note in the 3.0.0 section and there's a lot in the README. Glad you got it sorted out.
Should have checked the instruction. It worked fine. Thanks for your reply.
Hi @DosangGu, can you share what did workout for you?
I already tried the README that @AdamEssenmacher mentioned before
Firebase Analytics On .NET 6+, FirebaseAnalytics 10.17+ requires this target be added to your app's .csproj:
<!-- Target needed until LinkWithSwiftSystemLibraries makes it into the SDK: https://github.com/xamarin/xamarin-macios/pull/20463 -->
<Target Name="LinkWithSwift" DependsOnTargets="_ParseBundlerArguments;_DetectSdkLocations" BeforeTargets="_LinkNativeExecutable">
<PropertyGroup>
<_SwiftPlatform Condition="$(RuntimeIdentifier.StartsWith('iossimulator-'))">iphonesimulator</_SwiftPlatform>
<_SwiftPlatform Condition="$(RuntimeIdentifier.StartsWith('ios-'))">iphoneos</_SwiftPlatform>
</PropertyGroup>
<ItemGroup>
<_CustomLinkFlags Include="-L" />
<_CustomLinkFlags Include="/usr/lib/swift" />
<_CustomLinkFlags Include="-L" />
<_CustomLinkFlags Include="$(_SdkDevPath)/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/$(_SwiftPlatform)" />
<_CustomLinkFlags Include="-Wl,-rpath" />
<_CustomLinkFlags Include="-Wl,/usr/lib/swift" />
</ItemGroup>
</Target>
Additionally, you may be required to include also the Firebase Installations package reference.
xcode: 15.3 dotnet sdk: 8.0.101 RuntimeIdentifier: iossimulator TargetFramework: net8.0-ios
Tool xcrun execution finished (exit code = 1).
ld: warning: Could not find or use auto-linked framework 'GoogleAppMeasurement'
Undefined symbols for architecture x86_64:
"_APMAnalyticsConfiguration", referenced from:
+[FIRAnalytics startWithConfiguration:options:] in FirebaseAnalytics(FIRAnalytics.o)
"_APMAppMeasurementOriginFirebase", referenced from:
+[FIRAnalytics startWithConfiguration:options:] in FirebaseAnalytics(FIRAnalytics.o)
"_APMConsentSettings3P", referenced from:
+[FIRAnalytics setConsent:] in FirebaseAnalytics(FIRAnalytics.o)
"_APMFormattedEventName", referenced from:
+[FIRAnalytics logEventWithOrigin:name:parameters:] in FirebaseAnalytics(FIRAnalytics.o)
"_APMFormattedUserPropertyName", referenced from:
+[FIRAnalytics setUserPropertyString:forName:] in FirebaseAnalytics(FIRAnalytics.o)
"_APMIsAnalyticsCollectionDeactivated", referenced from:
+[FIRAnalytics startWithConfiguration:options:] in FirebaseAnalytics(FIRAnalytics.o)
"_APMIsAnalyticsCollectionEnabled", referenced from:
+[FIRAnalytics startWithConfiguration:options:] in FirebaseAnalytics(FIRAnalytics.o)
"_APMMonitorLogTagOptionKey", referenced from:
+[FIRAnalytics startWithConfiguration:options:] in FirebaseAnalytics(FIRAnalytics.o)
"_APMUserDataFieldEmailAddress", referenced from:
+[FIRAnalytics initiateOnDeviceConversionMeasurementWithEmailAddress:] in FirebaseAnalytics(FIRAnalytics.o)
"_APMUserDataFieldHashedEmailAddress", referenced from:
+[FIRAnalytics initiateOnDeviceConversionMeasurementWithHashedEmailAddress:] in FirebaseAnalytics(FIRAnalytics.o)
"_APMUserDataFieldHashedPhoneNumber", referenced from:
+[FIRAnalytics initiateOnDeviceConversionMeasurementWithHashedPhoneNumber:] in FirebaseAnalytics(FIRAnalytics.o)
"_APMUserDataFieldPhoneNumber", referenced from:
+[FIRAnalytics initiateOnDeviceConversionMeasurementWithPhoneNumber:] in FirebaseAnalytics(FIRAnalytics.o)
"_OBJC_CLASS_$_APMAdExposureReporter", referenced from:
_OBJC_CLASS_$_FIRAAdExposureReporter in FirebaseAnalytics(FIRAAdExposureReporter.o)
"_OBJC_CLASS_$_APMAnalytics", referenced from:
objc-class-ref in FirebaseAnalytics(FIRAnalytics.o)
"_OBJC_CLASS_$_APMConditionalUserProperty", referenced from:
_OBJC_CLASS_$_FIRAConditionalUserProperty in FirebaseAnalytics(FIRAConditionalUserProperty.o)
"_OBJC_CLASS_$_APMConditionalUserPropertyController", referenced from:
_OBJC_CLASS_$_FIRAConditionalUserPropertyController in FirebaseAnalytics(FIRAConditionalUserPropertyController.o)
"_OBJC_CLASS_$_APMEvent", referenced from:
_OBJC_CLASS_$_FIRAEvent in FirebaseAnalytics(FIRAEvent.o)
"_OBJC_CLASS_$_APMIdentifiers", referenced from:
_OBJC_CLASS_$_FIRAIdentifiers in FirebaseAnalytics(FIRAIdentifiers.o)
"_OBJC_CLASS_$_APMIdentity", referenced from:
objc-class-ref in FirebaseAnalytics(FIRAnalytics.o)
"_OBJC_CLASS_$_APMMeasurement", referenced from:
objc-class-ref in FirebaseAnalytics(FIRAnalytics.o)
objc-class-ref in FirebaseAnalytics(FIRAMeasurement.o)
_OBJC_CLASS_$_FIRAMeasurement in FirebaseAnalytics(FIRAMeasurement.o)
"_OBJC_CLASS_$_APMScreenViewReporter", referenced from:
objc-class-ref in FirebaseAnalytics(FIRAScreenViewReporter.o)
_OBJC_CLASS_$_FIRAScreenViewReporter in FirebaseAnalytics(FIRAScreenViewReporter.o)
"_OBJC_CLASS_$_APMUserAttribute", referenced from:
_OBJC_CLASS_$_FIRAUserAttribute in FirebaseAnalytics(FIRAUserAttribute.o)
"_OBJC_CLASS_$_APMValue", referenced from:
_OBJC_CLASS_$_FIRAValue in FirebaseAnalytics(FIRAValue.o)
"_OBJC_METACLASS_$_APMAdExposureReporter", referenced from:
_OBJC_METACLASS_$_FIRAAdExposureReporter in FirebaseAnalytics(FIRAAdExposureReporter.o)
"_OBJC_METACLASS_$_APMConditionalUserProperty", referenced from:
_OBJC_METACLASS_$_FIRAConditionalUserProperty in FirebaseAnalytics(FIRAConditionalUserProperty.o)
"_OBJC_METACLASS_$_APMConditionalUserPropertyController", referenced from:
_OBJC_METACLASS_$_FIRAConditionalUserPropertyController in FirebaseAnalytics(FIRAConditionalUserPropertyController.o)
"_OBJC_METACLASS_$_APMEvent", referenced from:
_OBJC_METACLASS_$_FIRAEvent in FirebaseAnalytics(FIRAEvent.o)
"_OBJC_METACLASS_$_APMIdentifiers", referenced from:
_OBJC_METACLASS_$_FIRAIdentifiers in FirebaseAnalytics(FIRAIdentifiers.o)
"_OBJC_METACLASS_$_APMMeasurement", referenced from:
_OBJC_METACLASS_$_FIRAMeasurement in FirebaseAnalytics(FIRAMeasurement.o)
"_OBJC_METACLASS_$_APMScreenViewReporter", referenced from:
_OBJC_METACLASS_$_FIRAScreenViewReporter in FirebaseAnalytics(FIRAScreenViewReporter.o)
"_OBJC_METACLASS_$_APMUserAttribute", referenced from:
_OBJC_METACLASS_$_FIRAUserAttribute in FirebaseAnalytics(FIRAUserAttribute.o)
"_OBJC_METACLASS_$_APMValue", referenced from:
_OBJC_METACLASS_$_FIRAValue in FirebaseAnalytics(FIRAValue.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
@aandino-dev
I encoutered same issue.
After deleting XamarinBuildDownload caches at ~/Library/Caches/XamarinBuildDownload
and build succeed.
Hello, I'm having the same problem as @aandino-dev, I already followed the readme mentioned by @AdamEssenmacher, I added the following to my csproj:
`
<ItemGroup>
<_CustomLinkFlags Include="-L" />
<_CustomLinkFlags Include="/usr/lib/swift" />
<_CustomLinkFlags Include="-L" />
<_CustomLinkFlags Include="$(_SdkDevPath)/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/$(_SwiftPlatform)" />
<_CustomLinkFlags Include="-Wl,-rpath" />
<_CustomLinkFlags Include="-Wl,/usr/lib/swift" />
</ItemGroup>
`
`
@aandino-dev I encoutered same issue. After deleting XamarinBuildDownload caches at
~/Library/Caches/XamarinBuildDownload
and build succeed.
@DosangGu Thanks worked as a charm.
@elvato87 do you try this, Windows 11 long path issue?
@elvato87 your project should no longer have any direct or transitive references to any packages prefixed with Xamarin.Firebase.iOS.*
, including Xamarin.Firebase.iOS.Installations
. Microsoft abandoned them and I've published upgraded replacements prefixed with AdamE.Firebase.iOS.*
. They are not compatible with each-other.
@aandino-dev @AdamEssenmacher I already had long path enabled, but ran the command again just to be sure, then I deleted all of Xamarin.Firebase.iOS.*
and added AdamE.Firebase.iOS.Installations
, deleted all the files again from the cache and restarted the laptop, and now when I try to build the app using the command line I get an error indicating that could not find 7zip.exe
I think I will try with a new project and see what happens, thanks
@AdamEssenmacher
Sorry for writing to this closed issue however your earlier statement matches my question perfectly. You state there should be no reference to Xamarin.Firebase.iOS.*
however in the readme says that we should add the package Xamarin.Firebase.iOS.Core
to the csproj file (by cli).
Can you explain?
The documentation is stale.
Environment
machine: mac mini (M2) xcode: 15.4 dotnet sdk: 8.0.301 RuntimeIdentifier: iossimulator TargetFramework: net8.0-ios
logs
iossimulator-x64
iossimulator-arm64