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

Can't compile project with Plugin.Firebase.Analytics 3.1.0 release IPA (Undefined symbols for architecture arm64) #387

Open
gkmiel-hb opened this issue Dec 9, 2024 · 34 comments

Comments

@gkmiel-hb
Copy link

gkmiel-hb commented Dec 9, 2024

Hi,
I can't compile release ipa for iOS MAUI app (.NET8). I have tried different environments:

  • Windows + Visual Studio (Version 17.12.3) + MacinCloud (Mac Mini 2023 M2 16GB RAM
    macOS Sonoma XCode 16.1);
  • MacinCloud + Visual Studio (Version 17.6.14);
  • MacinCloud + Visual Studio Code (version 1.95.2).

Compiler works fine with debug configuration.
Compiler throws these errors for release configuration:

C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net8.0_18.0\18.0.8316\targets\Xamarin.Shared.Sdk.targets(1648,3): error : clang++ exited with code 1:
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net8.0_18.0\18.0.8316\targets\Xamarin.Shared.Sdk.targets(1648,3): error : Undefined symbols for architecture arm64:
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net8.0_18.0\18.0.8316\targets\Xamarin.Shared.Sdk.targets(1648,3): error : "_APMAnalyticsConfiguration", referenced from:
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net8.0_18.0\18.0.8316\targets\Xamarin.Shared.Sdk.targets(1648,3): error : +[FIRAnalytics startWithConfiguration:options:] in FirebaseAnalytics10
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net8.0_18.0\18.0.8316\targets\Xamarin.Shared.Sdk.targets(1648,3): error : "_APMAppMeasurementOriginFirebase", referenced from:
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net8.0_18.0\18.0.8316\targets\Xamarin.Shared.Sdk.targets(1648,3): error : +[FIRAnalytics startWithConfiguration:options:] in FirebaseAnalytics10
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net8.0_18.0\18.0.8316\targets\Xamarin.Shared.Sdk.targets(1648,3): error : "_APMConsentSettings3P", referenced from:
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net8.0_18.0\18.0.8316\targets\Xamarin.Shared.Sdk.targets(1648,3): error : +[FIRAnalytics setConsent:] in FirebaseAnalytics10
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net8.0_18.0\18.0.8316\targets\Xamarin.Shared.Sdk.targets(1648,3): error : "_APMFormattedEventName", referenced from:
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net8.0_18.0\18.0.8316\targets\Xamarin.Shared.Sdk.targets(1648,3): error : +[FIRAnalytics logEventWithOrigin:name:parameters:] in FirebaseAnalytics10
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net8.0_18.0\18.0.8316\targets\Xamarin.Shared.Sdk.targets(1648,3): error : "_APMFormattedUserPropertyName", referenced from:
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net8.0_18.0\18.0.8316\targets\Xamarin.Shared.Sdk.targets(1648,3): error : +[FIRAnalytics setUserPropertyString:forName:] in FirebaseAnalytics10
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net8.0_18.0\18.0.8316\targets\Xamarin.Shared.Sdk.targets(1648,3): error : "_APMIsAnalyticsCollectionDeactivated", referenced from:
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net8.0_18.0\18.0.8316\targets\Xamarin.Shared.Sdk.targets(1648,3): error : +[FIRAnalytics startWithConfiguration:options:] in FirebaseAnalytics10
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net8.0_18.0\18.0.8316\targets\Xamarin.Shared.Sdk.targets(1648,3): error : "_APMIsAnalyticsCollectionEnabled", referenced from:
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net8.0_18.0\18.0.8316\targets\Xamarin.Shared.Sdk.targets(1648,3): error : +[FIRAnalytics startWithConfiguration:options:] in FirebaseAnalytics10
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net8.0_18.0\18.0.8316\targets\Xamarin.Shared.Sdk.targets(1648,3): error : "_APMMonitorLogTagOptionKey", referenced from:
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net8.0_18.0\18.0.8316\targets\Xamarin.Shared.Sdk.targets(1648,3): error : +[FIRAnalytics startWithConfiguration:options:] in FirebaseAnalytics10
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net8.0_18.0\18.0.8316\targets\Xamarin.Shared.Sdk.targets(1648,3): error : "_APMUserDataFieldEmailAddress", referenced from:
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net8.0_18.0\18.0.8316\targets\Xamarin.Shared.Sdk.targets(1648,3): error : +[FIRAnalytics initiateOnDeviceConversionMeasurementWithEmailAddress:] in FirebaseAnalytics10
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net8.0_18.0\18.0.8316\targets\Xamarin.Shared.Sdk.targets(1648,3): error : "_APMUserDataFieldHashedEmailAddress", referenced from:
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net8.0_18.0\18.0.8316\targets\Xamarin.Shared.Sdk.targets(1648,3): error : +[FIRAnalytics initiateOnDeviceConversionMeasurementWithHashedEmailAddress:] in FirebaseAnalytics10
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net8.0_18.0\18.0.8316\targets\Xamarin.Shared.Sdk.targets(1648,3): error : "_APMUserDataFieldHashedPhoneNumber", referenced from:
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net8.0_18.0\18.0.8316\targets\Xamarin.Shared.Sdk.targets(1648,3): error : +[FIRAnalytics initiateOnDeviceConversionMeasurementWithHashedPhoneNumber:] in FirebaseAnalytics10
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net8.0_18.0\18.0.8316\targets\Xamarin.Shared.Sdk.targets(1648,3): error : "_APMUserDataFieldPhoneNumber", referenced from:
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net8.0_18.0\18.0.8316\targets\Xamarin.Shared.Sdk.targets(1648,3): error : +[FIRAnalytics initiateOnDeviceConversionMeasurementWithPhoneNumber:] in FirebaseAnalytics10

Testing project file is attached. I can add full project for testing.
MauiApp2.zip

Any help would be appreciated. Thank you.

@gkmiel-hb gkmiel-hb changed the title Can't compile release IPA (Undefined symbols for architecture arm64) Can't compile project with Plugin.Firebase.Analytics 3.1.0 release IPA (Undefined symbols for architecture arm64) Dec 9, 2024
@sokrog
Copy link

sokrog commented Dec 12, 2024

The same

@SOFSPEEL
Copy link

SOFSPEEL commented Dec 14, 2024

Have the same issue too, although my issue occurs in both Debug and Release configurations.

@gkmiel-hb the implication is that you have optimization turned on in your Release configuration and that is why you are getting undefined symbols, you can try turning linker optimization off to confirm that is the case for you.

One other difference with @gkmiel-hb is that my ios framework is targeted as follows:

<TargetFramework>net9.0-ios</TargetFramework>


sr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net9.0_18.1/18.1.9163/targets/Xamarin.Shared.Sdk.targets(1665,3): error : clang++ exited with code 1: [/Users/sf/RiderProjects/Mobile/Ios/Ios.csproj]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net9.0_18.1/18.1.9163/targets/Xamarin.Shared.Sdk.targets(1665,3): error : Undefined symbols for architecture arm64: [/Users/sf/RiderProjects/Mobile/Ios/Ios.csproj]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net9.0_18.1/18.1.9163/targets/Xamarin.Shared.Sdk.targets(1665,3): error :   "_APMAnalyticsConfiguration", referenced from: [/Users/sf/RiderProjects/Mobile/Ios/Ios.csproj]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net9.0_18.1/18.1.9163/targets/Xamarin.Shared.Sdk.targets(1665,3): error :       +[FIRAnalytics startWithConfiguration:options:] in FirebaseAnalytics[10](FIRAnalytics.o) [/Users/sf/RiderProjects/Mobile/Ios/Ios.csproj]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net9.0_18.1/18.1.9163/targets/Xamarin.Shared.Sdk.targets(1665,3): error :   "_APMAppMeasurementOriginFirebase", referenced from: [/Users/sf/RiderProjects/Mobile/Ios/Ios.csproj]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net9.0_18.1/18.1.9163/targets/Xamarin.Shared.Sdk.targets(1665,3): error :       +[FIRAnalytics startWithConfiguration:options:] in FirebaseAnalytics[10](FIRAnalytics.o) [/Users/sf/RiderProjects/Mobile/Ios/Ios.csproj]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net9.0_18.1/18.1.9163/targets/Xamarin.Shared.Sdk.targets(1665,3): error :   "_APMConsentSettings3P", referenced from: [/Users/sf/RiderProjects/Mobile/Ios/Ios.csproj]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net9.0_18.1/18.1.9163/targets/Xamarin.Shared.Sdk.targets(1665,3): error :       +[FIRAnalytics setConsent:] in FirebaseAnalytics[10](FIRAnalytics.o) [/Users/sf/RiderProjects/Mobile/Ios/Ios.csproj]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net9.0_18.1/18.1.9163/targets/Xamarin.Shared.Sdk.targets(1665,3): error :   "_APMFormattedEventName", referenced from: [/Users/sf/RiderProjects/Mobile/Ios/Ios.csproj]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net9.0_18.1/18.1.9163/targets/Xamarin.Shared.Sdk.targets(1665,3): error :       +[FIRAnalytics logEventWithOrigin:name:parameters:] in FirebaseAnalytics[10](FIRAnalytics.o) [/Users/sf/RiderProjects/Mobile/Ios/Ios.csproj]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net9.0_18.1/18.1.9163/targets/Xamarin.Shared.Sdk.targets(1665,3): error :   "_APMFormattedUserPropertyName", referenced from: [/Users/sf/RiderProjects/Mobile/Ios/Ios.csproj]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net9.0_18.1/18.1.9163/targets/Xamarin.Shared.Sdk.targets(1665,3): error :       +[FIRAnalytics setUserPropertyString:forName:] in FirebaseAnalytics[10](FIRAnalytics.o) [/Users/sf/RiderProjects/Mobile/Ios/Ios.csproj]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net9.0_18.1/18.1.9163/targets/Xamarin.Shared.Sdk.targets(1665,3): error :   "_APMIsAnalyticsCollectionDeactivated", referenced from: [/Users/sf/RiderProjects/Mobile/Ios/Ios.csproj]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net9.0_18.1/18.1.9163/targets/Xamarin.Shared.Sdk.targets(1665,3): error :       +[FIRAnalytics startWithConfiguration:options:] in FirebaseAnalytics[10](FIRAnalytics.o) [/Users/sf/RiderProjects/Mobile/Ios/Ios.csproj]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net9.0_18.1/18.1.9163/targets/Xamarin.Shared.Sdk.targets(1665,3): error :   "_APMIsAnalyticsCollectionEnabled", referenced from: [/Users/sf/RiderProjects/Mobile/Ios/Ios.csproj]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net9.0_18.1/18.1.9163/targets/Xamarin.Shared.Sdk.targets(1665,3): error :       +[FIRAnalytics startWithConfiguration:options:] in FirebaseAnalytics[10](FIRAnalytics.o) [/Users/sf/RiderProjects/Mobile/Ios/Ios.csproj]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net9.0_18.1/18.1.9163/targets/Xamarin.Shared.Sdk.targets(1665,3): error :   "_APMMonitorLogTagOptionKey", referenced from: [/Users/sf/RiderProjects/Mobile/Ios/Ios.csproj]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net9.0_18.1/18.1.9163/targets/Xamarin.Shared.Sdk.targets(1665,3): error :       +[FIRAnalytics startWithConfiguration:options:] in FirebaseAnalytics[10](FIRAnalytics.o) [/Users/sf/RiderProjects/Mobile/Ios/Ios.csproj]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net9.0_18.1/18.1.9163/targets/Xamarin.Shared.Sdk.targets(1665,3): error :   "_APMUserDataFieldEmailAddress", referenced from: [/Users/sf/RiderProjects/Mobile/Ios/Ios.csproj]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net9.0_18.1/18.1.9163/targets/Xamarin.Shared.Sdk.targets(1665,3): error :       +[FIRAnalytics initiateOnDeviceConversionMeasurementWithEmailAddress:] in FirebaseAnalytics[10](FIRAnalytics.o) [/Users/sf/RiderProjects/Mobile/Ios/Ios.csproj]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net9.0_18.1/18.1.9163/targets/Xamarin.Shared.Sdk.targets(1665,3): error :   "_APMUserDataFieldHashedEmailAddress", referenced from: [/Users/sf/RiderProjects/Mobile/Ios/Ios.csproj]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net9.0_18.1/18.1.9163/targets/Xamarin.Shared.Sdk.targets(1665,3): error :       +[FIRAnalytics initiateOnDeviceConversionMeasurementWithHashedEmailAddress:] in FirebaseAnalytics[10](FIRAnalytics.o) [/Users/sf/RiderProjects/Mobile/Ios/Ios.csproj]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net9.0_18.1/18.1.9163/targets/Xamarin.Shared.Sdk.targets(1665,3): error :   "_APMUserDataFieldHashedPhoneNumber", referenced from: [/Users/sf/RiderProjects/Mobile/Ios/Ios.csproj]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net9.0_18.1/18.1.9163/targets/Xamarin.Shared.Sdk.targets(1665,3): error :       +[FIRAnalytics initiateOnDeviceConversionMeasurementWithHashedPhoneNumber:] in FirebaseAnalytics[10](FIRAnalytics.o) [/Users/sf/RiderProjects/Mobile/Ios/Ios.csproj]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net9.0_18.1/18.1.9163/targets/Xamarin.Shared.Sdk.targets(1665,3): error :   "_APMUserDataFieldPhoneNumber", referenced from: [/Users/sf/RiderProjects/Mobile/Ios/Ios.csproj]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net9.0_18.1/18.1.9163/targets/Xamarin.Shared.Sdk.targets(1665,3): error :       +[FIRAnalytics initiateOnDeviceConversionMeasurementWithPhoneNumber:] in FirebaseAnalytics[10](FIRAnalytics.o) [/Users/sf/RiderProjects/Mobile/Ios/Ios.csproj]

@gkmiel-hb
Copy link
Author

@SOFSPEEL Check BuildIpa setting in your project Debug configuration. It must be equal to False for successful compile:

False I have tried different linking options including optimization. Results are the same.

@SOFSPEEL
Copy link

@gkmiel-hb, without the BuildIpa setting are you even able to run the build, thought BuildIpa was necessary to produce the .ipa so that you can run?

@gkmiel-hb
Copy link
Author

@SOFSPEEL I can run app on test device without ipa using Hot Restart option

@bchehab
Copy link

bchehab commented Dec 19, 2024

Same here. Just integrated Plugin.Firebase.Analytics 3.1.0, and i get the same error both when trying to run locally, and when trying to build for release.

@sokrog
Copy link

sokrog commented Dec 19, 2024

Try to add the following lines to the end of the .cproj file

	<!-- 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>

@bchehab
Copy link

bchehab commented Dec 19, 2024

@sokrog thanks. I tried adding the above, but got the same errors.

@daveclarkit
Copy link

I'm also having the same issue....

@sokrog
Copy link

sokrog commented Dec 19, 2024

@bchehab Maybe this one ? (also add inside main project .cproj file)

	<PropertyGroup>
		<!--	https://github.com/xamarin/xamarin-macios/issues/19157	-->
		<MtouchNoSymbolStrip Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">True</MtouchNoSymbolStrip>
	</PropertyGroup>

@bchehab
Copy link

bchehab commented Dec 19, 2024

@sokrog , tried with both. same error

@AdamEssenmacher
Copy link
Collaborator

If Plugin.Firebase.Analytics 3.0.0 works for you, but 3.1.0 does not, the issue is most likely related to your build machine's .net8-ios configuration and XCode version.

Please make sure you're using XCode 16, have the latest .net sdks installed, and have updated and restored your workloads.

If 3.0.0 does not work for you either, then there's a different problem.

@gkmiel-hb
Copy link
Author

Tried both and downgraded Plugin.Firebase.Analytics to 3.0.0. Same errors

@bchehab
Copy link

bchehab commented Dec 20, 2024

Same outcome as @gkmiel-hb with Analytics 3.0.0

I'm building on github actions, using XCode 16. Project is .net 8

@gkmiel-hb
Copy link
Author

gkmiel-hb commented Dec 20, 2024

I have attached testing project if someone which has success in compiling could spend some time for testing. Then we could know that issue is related with development environment
MauiApp2.zip

@SOFSPEEL
Copy link

I am having same issue and am on latest version of everything and am having problems with latest nuget version
package Plugin.Firebase.Analytics --version 3.1.0 (3.0.0 too)

Installed Workload Id Manifest Version Installation Source

android 35.0.7/9.0.100 SDK 9.0.100
ios 18.1.9163/9.0.100 SDK 9.0.100
maui 9.0.0/9.0.100 SDK 9.0.100

image

dotnet --version
9.0.100

@AdamEssenmacher
Copy link
Collaborator

@gkmiel-hb I am able to build and deploy your sample project to a simulator.

XCode 16.2
Rider 2024.3.3
Sonoma 14.5

6.0.402 [/usr/local/share/dotnet/sdk]
6.0.414 [/usr/local/share/dotnet/sdk]
6.0.415 [/usr/local/share/dotnet/sdk]
6.0.416 [/usr/local/share/dotnet/sdk]
6.0.417 [/usr/local/share/dotnet/sdk]
6.0.418 [/usr/local/share/dotnet/sdk]
6.0.419 [/usr/local/share/dotnet/sdk]
6.0.421 [/usr/local/share/dotnet/sdk]
6.0.422 [/usr/local/share/dotnet/sdk]
6.0.425 [/usr/local/share/dotnet/sdk]
7.0.308 [/usr/local/share/dotnet/sdk]
7.0.401 [/usr/local/share/dotnet/sdk]
7.0.403 [/usr/local/share/dotnet/sdk]
8.0.100 [/usr/local/share/dotnet/sdk]
8.0.204 [/usr/local/share/dotnet/sdk]
8.0.300 [/usr/local/share/dotnet/sdk]
8.0.404 [/usr/local/share/dotnet/sdk]
9.0.101 [/usr/local/share/dotnet/sdk]
Installed Workload Id      Manifest Version      Installation Source
--------------------------------------------------------------------
maui-android               9.0.0/9.0.100         SDK 9.0.100        
maui-ios                   9.0.0/9.0.100         SDK 9.0.100        
maui-maccatalyst           9.0.0/9.0.100         SDK 9.0.100     

@gkmiel-hb
Copy link
Author

Thanks @AdamEssenmacher
I have succeeded to build it few times "by accident". I think that my remote virtual Mac is the issue source. We are going to buy real one after New Year holidays.
I have found few differences in environment: my sdk 9.0.100 and XCode 16.1. I will try to upgrade them and will inform about results.

@gkmiel-hb
Copy link
Author

I have updated XCode and SDK versions but without success in compiling

@rurounidev
Copy link

@gkmiel-hb Did you find a work around for this? I'm having the same problem, SDK 9.0.101 & xcode 16.2, and nothing works.

@gkmiel-hb
Copy link
Author

@rurounidev No. I am waiting for "real" MAC, but I investigate alternatives like Native Library Interop. First results were similar to Plugin.Firebase.Analytics issue. I have found solution to resolve MAU.NativeLibraryInterop problem. On interop library in my project dependencies, I have set "Reference Output Assembly" property to True. For Plugin.Firebase.Analytics project I don't know which nuget package contains "_APMAnalyticsConfiguration" and is it the same issue. Maybe Plugin.Firebase.Analytics nuget authors could help us. I am newbie to native coding. I have some expierence in C++ interops for C#.

@daerogami
Copy link
Contributor

Same issue, app was building before adding Plugin.Firebase.Analytics and Plugin.Firebase.Crashlytics (both v3.1.1), before which it had the old Xamarin/Microsoft versions for the aforementioned Firebase packages. I had also explicitly installed the AdamE.Firebase.iOS.Core package, removing it made no difference (since it should be restored by dependencies, right?).

Target framework net9.0-ios (MAUI 9.0.21)
Using pair-to-mac, Mac Mini has .net 9.0.1 SDK (along with older ones, the broker agent requires .net 8.x)

@cyrillgisin
Copy link

Same Issue here

@EmilAlipiev
Copy link

I get this error when i try to compile

  Xamarin.Shared.Sdk.targets(1665, 3): clang++ exited with code 1:
ld: building for 'iOS-simulator', but linking in object file (/Users/Library/Caches/XamarinBuildDownload/GSgnI-5.0.2/Frameworks/GoogleSignIn.framework/GoogleSignIn[arm64][2](GIDAuthStateMigration_425a588fcd149b383bb30d0e6a3b4322.o)) built for 'iOS'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

is that actually related? Why the package has Xamarin package dependency?

@MaxMa04
Copy link

MaxMa04 commented Jan 24, 2025

I get this error when i try to compile

  Xamarin.Shared.Sdk.targets(1665, 3): clang++ exited with code 1:
ld: building for 'iOS-simulator', but linking in object file (/Users/Library/Caches/XamarinBuildDownload/GSgnI-5.0.2/Frameworks/GoogleSignIn.framework/GoogleSignIn[arm64][2](GIDAuthStateMigration_425a588fcd149b383bb30d0e6a3b4322.o)) built for 'iOS'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

is that actually related? Why the package has Xamarin package dependency?

Disable linking in your project with mtouch link sdk only

@EmilAlipiev
Copy link

EmilAlipiev commented Jan 25, 2025

@MaxMa04 thanks for your quick reply but if you mean this. I dont have it. I am trying to debug it on simulator using apple silicon with the latest Xcode and Rider versions

Image

I have also deleted Library/Caches/XamarinBuildDownload folder as suggested some posts but didnt help me.

PS; my project is using .Net9, not that it if that can be the reason?

@decv86
Copy link

decv86 commented Jan 26, 2025

+1 Has anyone been able to solve this problem?

@cyrillgisin
Copy link

General recomendation for everyone: if you are using Plugin.Firebase just to send/receive push notifications, ifs quite the overkill. You will run into a lot of issues, and even if the owner puts a lot of work into this project, you will face a lot of similar problems like this in the future.

So if you just want to use push notifications in your maui app, i recommend using OneSignal. Its free and really easy to use, the setup is done in 5 minutes.

If you wish i can make a video how to set up everything for ios and android.

@decv86
Copy link

decv86 commented Jan 26, 2025

@bchehab thanks my friend! I would gladly part with this plugin, but I am stuck with it in authorization ... by trial and error I was able to make it work on .Net 9 in the versions in the picture. I could not make it work with the latest versions.

Image

*Perhaps it is worth gradually abandoning it if you shoot such a video - it will be very useful.

@AdamEssenmacher
Copy link
Collaborator

AdamEssenmacher commented Jan 30, 2025

@decv86 Plugin.Firebase.Auth.Google really should be considered deprecated on iOS (at least at the moment). I would expect it to have problems with any version of this plugin >= 3.0.0. This is because Plugin.Firebase.Auth.Google has not been moved off of Microsoft's deprecated Xamarin.Google.iOS.SignIn package and, in turn, Xamarin.Firebase.iOS.Core.

Microsoft never updated Xamarin.Google.iOS.SignIn past native SDK version 5.0.2, which is 6+ years old at this point. Xamarin.Firebase.iOS.Core was left at Firebase version 8.10 which--aside from being 4+ years old--is likely to be incompatible with many AdamE.* iOS packages.

There is some good news though! A couple of weeks ago, I released AdamE.Google.iOS.SignIn, which is meant to be a compatible replacement for Xamarin.Firebase.iOS.SignIn (updated to latest native SDK v8.0.0). All that's left to do is update Plugin.Firebase.Auth.Google to use my updated bindings package. This is something I'll likely get to eventually, but can't promise a timeline. If anyone from the community would like to contribute a PR, let me know and I'll work with you 😄

@decv86
Copy link

decv86 commented Jan 30, 2025

@AdamEssenmacher It's kind of sad, I'm confused...

@AdamEssenmacher
Copy link
Collaborator

@AdamEssenmacher It's kind of sad, I'm confused...

What's confusing? I can explain further.

@decv86
Copy link

decv86 commented Jan 31, 2025

@AdamEssenmacher Do you want to say that it is better to abandon the Plagin.Firebase package and switch to using the AdamE package? In fact, I just need Firebase authorization (mail and native) - which way should I go?

@AdamEssenmacher
Copy link
Collaborator

@AdamEssenmacher Do you want to say that it is better to abandon the Plagin.Firebase package and switch to using the AdamE package? In fact, I just need Firebase authorization (mail and native) - which way should I go?

For iOS, Plugin.Firebase is built on the AdamE packages--except for Google auth. It is just the last package left to be updated from <v3.0, which unfortunately makes it incompatible with the rest of the plugin (again, just on iOS).

So... yes. if all you need is Firebase Auth with Google integration, then I would not recommend using this plugin directly at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests