Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Build fails after updating Plugin.FirebasePushNotifications to 3.0.17 #105

Open
Nandulucky opened this issue Jan 15, 2025 · 8 comments
Assignees
Labels
bug Something isn't working s/needs-info Issue needs more info from the author

Comments

@Nandulucky
Copy link

Description:

Summary:
After updating Plugin.FirebasePushNotifications to version 3.0.17, my iOS build fails with Undefined symbols for architecture x86_64 errors related to FirebaseAnalytics. I need guidance on resolving this and identifying the correct NuGet packages for Firebase Analytics compatibility.

Steps to Reproduce:

Update Plugin.FirebasePushNotifications from 2.5.13 to 3.0.17.
Retain Xamarin.Firebase.iOS.Analytics version 8.10.0.1.
Build the project targeting iOS.
Observe the build failure.

Expected Behavior:
The project should build successfully without errors.

Actual Behavior:
The build fails with errors like:

Undefined symbols for architecture x86_64: "_APMAnalyticsConfiguration", referenced from: +[FIRAnalytics startWithConfiguration:options:] in FirebaseAnalytics...

Environment Details:

OS: macOS Sonoma 14.6.1
IDE: Visual Studio 2022 (latest version)
Target Frameworks: .NET MAUI
NuGet Packages:
Plugin.FirebasePushNotifications: 3.0.17
Xamarin.Firebase.iOS.Analytics: 8.10.0.1

Additional Context:
The project worked fine with version 2.5.13 of Plugin.FirebasePushNotifications. The errors started after upgrading to version 3.0.17. I suspect compatibility issues between Plugin.FirebasePushNotifications and Xamarin.Firebase.iOS.Analytics

Thanks in Advance!

@Nandulucky Nandulucky added the bug Something isn't working label Jan 15, 2025
@thomasgalliker
Copy link
Owner

Thanks for the effort. I guess the remaining old nuget Xamarin.Firebase.iOS.Analytics version 8.10.0.1 could cause problems. I personally don't use Firebase Analytics so it's hard for me to give more info here.
Plugin.FirebasePushNotifications uses [AdamE.Firebase.iOS.CloudMessaging] (https://www.nuget.org/packages/AdamE.Firebase.iOS.CloudMessaging) for the iOS specific Firebase implementations. I see that AdamE also published an Analytics nuget. Maybe there is a chance that the CloudMessaging and the Analytics nuget work side-by-side? At least it's worth it to try.

Links:

@thomasgalliker thomasgalliker self-assigned this Jan 15, 2025
@thomasgalliker thomasgalliker added the s/needs-info Issue needs more info from the author label Jan 15, 2025
@Nandulucky
Copy link
Author

Nandulucky commented Jan 15, 2025

Hello @thomasgalliker

I tried resolving the Firebase Analytics build error by switching to the following NuGet packages:

AdamE.Firebase.iOS.Analytics Version="11.6.0" and
AdamE.Firebase.iOS.CloudMessaging Version="11.6.0"

However, I am still encountering the same build errors.

/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net8.0_18.0/18.0.8314/targets/Xamarin.Shared.Sdk.targets(3,3): Error: clang++ exited with code 1: Undefined symbols for architecture x86_64: "_APMAnalyticsConfiguration", referenced from: +[FIRAnalytics startWithConfiguration:options:] in FirebaseAnalytics[x86_64][10](FIRAnalytics.o) "_APMAppMeasurementOriginFirebase", referenced from: +[FIRAnalytics startWithConfiguration:options:] in FirebaseAnalytics[x86_64][10](FIRAnalytics.o) "_APMConsentSettings3P", referenced from: +[FIRAnalytics setConsent:] in FirebaseAnalytics[x86_64][10](FIRAnalytics.o) "_APMFormattedEventName", referenced from: +[FIRAnalytics logEventWithOrigin:name:parameters:] in FirebaseAnalytics[x86_64][10](FIRAnalytics.o) "_APMFormattedUserPropertyName", referenced from: +[FIRAnalytics setUserPropertyString:forName:] in FirebaseAnalytics[x86_64][10](FIRAnalytics.o) "_APMIsAnalyticsCollectionDeactivated", referenced from: +[FIRAnalytics startWithConfiguration:options:] in FirebaseAnalytics[x86_64][10](FIRAnalytics.o) "_APMIsAnalyticsCollectionEnabled", referenced from: +[FIRAnalytics startWithConfiguration:options:] in FirebaseAnalytics[x86_64][10](FIRAnalytics.o) (and more...)

@thomasgalliker
Copy link
Owner

Buh... difficult. I would search for "Undefined symbols for architecture x86_64" elsewhere on github (global search on github --> category issues). This looks to me like something in the build config (csproj) is wrong. Can you compare your csproj with the sample app's csproj in this repo? Especially the section with the iOS specific configurations (device vs simulator).

@Nandulucky
Copy link
Author

Nandulucky commented Jan 15, 2025

I tried sample app's csproj iOS sepcifications, having the same issue
I am providing my ios specifications.

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-ios|AnyCPU'"> <CreatePackage>false</CreatePackage> <UseSymbolStrip>false</UseSymbolStrip> <PublishTrimmed>true</PublishTrimmed> <CodesignProvision /> <CodesignKey>iPhone Distribution.</CodesignKey> <MtouchExtraArgs>-ObjC</MtouchExtraArgs> <MtouchInterpreter>all</MtouchInterpreter> <MtouchLink>SdkOnly</MtouchLink> </PropertyGroup>

@Nandulucky
Copy link
Author

Hello @thomasgalliker , Any update?

@thomasgalliker
Copy link
Owner

No update here. The sample app in this repository works on my machine. I'm using a macbook pro M3 with JetBrains Rider 2024.3.3 and all my apps are on .NET 8.

@Nandulucky
Copy link
Author

Now working, I updated nuget package AdamE.Firebase.iOS.Analytics version 11.4.0
Latest version is not supporting.

@thomasgalliker
Copy link
Owner

What is the difference between these versions? So maybe 11.6 is only for .net9? I cannot image this is true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working s/needs-info Issue needs more info from the author
Projects
None yet
Development

No branches or pull requests

2 participants