Plugin.Firebase: Error: clang++ exited with code 1

When I run this app on emulator that works fine but try on realdevice that time that not install and give me this error so how to solve this error

/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/16.4.7133/targets/Xamarin.Shared.Sdk.targets(3,3): Error: clang++ exited with code 1:
Undefined symbols for architecture arm64:
  "_objc_msgSend$initWithProtocol:isRequired:", referenced from:
      +[GULCCDependency dependencyWithProtocol:] in GoogleUtilitiesComponents(GULCCDependency.o)
      +[GULCCDependency dependencyWithProtocol:isRequired:] in GoogleUtilitiesComponents(GULCCDependency.o)
  "_objc_msgSend$allValues", referenced from:
      -[GULCCComponentContainer removeAllCachedInstances] in GoogleUtilitiesComponents(GULCCComponentContainer.o)
  "_objc_msgSend$respondsToSelector:", referenced from:
      -[GULCCComponentContainer removeAllCachedInstances] in GoogleUtilitiesComponents(GULCCComponentContainer.o)
  "_objc_msgSend$removeAllObjects", referenced from:
      -[GULCCComponentContainer removeAllCachedInstances] in GoogleUtilitiesComponents(GULCCComponentContainer.o)
  "_objc_msgSend$conformsToProtocol:", referenced from:
      -[GULCCComponentContainer instantiateInstanceForProtocol:withBlock:] in GoogleUtilitiesComponents(GULCCComponentContainer.o)
      -[GULCCComponentContai (TM)

I am trying this .Net 7 and .Net 8 on Mac Sonoma

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (1 by maintainers)

Most upvoted comments

@msuddaby it’s building and deploying to an iOS 17.5 simulator just fine for me. My setup:

  • Rider 2024.1.3
  • M2 Mac / Sonoma 14.5
  • XCode 15.4
  • dotnet 8.0.300

In AdamE.Firebase.iOS.Core, GoogleAppMeasurement is unique in that it is the only dependency not packed directly into the nuget package. Instead, it is downloaded as part of the build by Xamarin.Build.Download. You should see logs like:

Target _XamarinBuildDownloadCore:
  Downloading https://dl.google.com/firebase/ios/analytics/cc4d75392af34c62/GoogleAppMeasurement-10.24.0.tar.gz to /Users/adam/Library/Caches/XamarinBuildDownload/GAppM-10.24.0.tgz
	(3615/10040163b), total 0.0%
	(1014018/10040163b), total 10.0%
	(2015232/10040163b), total 20.0%
	(3014640/10040163b), total 30.0%
	(4030448/10040163b), total 40.0%
	(5029856/10040163b), total 50.0%
	(6029280/10040163b), total 60.0%
	(7028688/10040163b), total 70.0%
	(8044496/10040163b), total 80.0%
	(9043904/10040163b), total 90.0%
	(10040163/10040163b), total 100.0%
  Downloading Complete
Extracting /Users/adam/Library/Caches/XamarinBuildDownload/GAppM-10.24.0.tgz to /Users/adam/Library/Caches/XamarinBuildDownload/GAppM-10.24.0

If you don’t see this in your build log, it’s pulling from the cache (e.g. /Users/adam/Library/Caches/XamarinBuildDownload/GAppM-10.24.0)

If your cache doesn’t look like this, then that’s what’s wrong. Delete the XamarinBuildDownload directory and try running your build again.

image