xamarin/GoogleApisForiOSComponents

MT2101: Can't resolve the reference 'System.Void Firebase.CloudMessaging.Messaging

Vliesie opened this issue · 11 comments

The Issue started with a Plutin XML error that was resolved by saving my GoogleService.Plist in Xcode then adding it to the project. The error then progress to ->

 'System.Void Firebase.Analytics.App::Configure()', referenced from the method 'System.Void Plugin.FirebasePushNotification.FirebasePushNotificationManager/d__31::MoveNext()' in 'Firebase.Analytics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Insider.iOS

Which I Noticed I had a Missing Dependency Which I installed. Then led me to:

Deployment to Device

Build Error :
/Ecombeta/Ecombeta.iOS/MTOUCH: Error MT2101: Can't resolve the reference 'System.Void Firebase.CloudMessaging.Messaging::SendMessage(Foundation.NSDictionary,System.String,System.String,System.Int64)', referenced from the method 'System.Void Plugin.FirebasePushNotification.FirebasePushNotificationManager::SendDeviceGroupMessage(System.Collections.Generic.IDictionary`2<System.String,System.String>,System.String,System.String,System.Int32)' in 'Firebase.CloudMessaging, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. (MT2101) (Ecombeta.iOS)

Visual Studio For Mac

Visual Studio Community 2022 for Mac
Version 17.0 (build 8989)
Installation UUID: 9241a497-d3b3-4b7b-b987-037b71143dca

Runtime
.NET 6.0.3 (64-bit)
Architecture: X64

Roslyn (Language Service)
4.1.0-3.22075.3+592501cbb9c9394072a245c15b3458ff88155d85

NuGet
Version: 6.0.0.262

.NET SDK (x64)
SDK: /usr/local/share/dotnet/sdk/6.0.300/Sdks
SDK Versions:
	6.0.300
	3.1.419
MSBuild SDKs: /usr/local/share/dotnet/sdk/6.0.300/Sdks

.NET Runtime (x64)
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
	6.0.5
	3.1.25

Xamarin.Profiler
Version: 1.8.0.19
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

Updater
Version: 11

Xamarin Designer
Version: 17.1.5.90
Hash: 53f47efde
Branch: remotes/origin/d17-0-vsmac
Build date: 2022-05-18 17:27:43 UTC

Apple Developer Tools
Xcode 13.2.1 (19586)
Build 13C100

Xamarin.Mac
Xamarin.Mac not installed. Can't find /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Version.

Xamarin.iOS
Version: 15.10.0.1 (Visual Studio Community)
Hash: 568bdb24e
Branch: d17-2
Build date: 2022-04-08 18:52:57-0400

Xamarin.Android
Version: 12.3.0.3 (Visual Studio Community)
Commit: xamarin-android/d17-2/bbba5a2
Android SDK: /Users/imac/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		12.0 (API level 31)
		11.0 (API level 30)
		10.0 (API level 29)

SDK Command-line Tools Version: 5.0
SDK Platform Tools Version: 31.0.3
SDK Build Tools Version: 30.0.3

Build Information: 
Mono: adf1bc4
Java.Interop: xamarin/java.interop/d17-2@9760f0a9
ProGuard: Guardsquare/proguard/v7.0.1@912d149
SQLite: xamarin/sqlite/3.38.2@7b1e016
Xamarin.Android Tools: xamarin/xamarin-android-tools/d17-2@fc3c2ac

Microsoft Build of OpenJDK
Java SDK: /Library/Java/JavaVirtualMachines/microsoft-11.jdk
11.0.12
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Eclipse Temurin JDK
Java SDK: /Library/Java/JavaVirtualMachines/temurin-8.jdk
1.8.0.302
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Android SDK Manager
Version: 17.2.0.37
Hash: 7f5a6ef
Branch: remotes/origin/d17-2
Build date: 2022-05-18 17:27:49 UTC

Android Device Manager
Version: 0.0.0.1116
Hash: e47e6c8
Branch: remotes/origin/d17-2
Build date: 2022-05-18 17:27:49 UTC

Build Information
Release ID: 1700008989
Git revision: 55998773faa2cb1dda7aab5fecd1625f7b664d10
Build date: 2022-05-18 17:25:21+00
Build branch: release-17.0
Build lane: release-17.0

Operating System
Mac OS X 11.6.5
Darwin 20.6.0 Darwin Kernel Version 20.6.0
    Tue Feb 22 21:10:41 PST 2022
    root:xnu-7195.141.26~1/RELEASE_X86_64 x86_64


Build Log.zip
Screenshot 2022-06-22 at 14 50 38
Screenshot 2022-06-22 at 14 50 45
Screenshot 2022-06-22 at 14 50 53

hi! have solution?

I am also having the same issues, were you able to resolve this?

Sadly no, Still awaiting a response I have tried everything, Seems to be a conflict with versions I have tried downgrading with no success.

Downgrading it doesn't work, the two times I encountered this challenge I had to go back to my previous source code on azure DevOps

@Vliesie the Downgrading did not work for me, I need to look for a workaround, if I manage to solve it I will write

CrossGeeks/FirebasePushNotificationPlugin#415

Refrence the above link, it worked for me

Hopefully it works for you too

Try adding packages with the below versions for xamarin ios...

<PackageReference Include="Xamarin.Firebase.iOS.PerformanceMonitoring"> <Version>8.10.0.3</Version> </PackageReference> <PackageReference Include="Xamarin.Firebase.iOS.CloudMessaging"> <Version>4.7.1</Version> </PackageReference> <PackageReference Include="Xamarin.FireBase.iOS.InstanceID"> <Version>4.8.0</Version> </PackageReference> <PackageReference Include="Xamarin.FireBase.iOS.Core"> <Version>8.10.0.3</Version> </PackageReference> <PackageReference Include="Xamarin.FireBase.iOS.Analytics"> <Version>8.10.0.3</Version> </PackageReference> <PackageReference Include="Xamarin.Firebase.iOS.Installations"> <Version>8.10.0.3</Version> </PackageReference>

@gani4us Can confirm this has worked for me. Thanks a million!

Thanks @gani4us. I just wanted to let you know that this worked for me.

I eventually got this working with this set of versions:

    <PackageReference Include="Xamarin.Forms">
      <Version>5.0.0.2578</Version>
    </PackageReference>
    <PackageReference Include="Plugin.FirebasePushNotification">
      <Version>3.4.35</Version>
    </PackageReference>
   <PackageReference Include="Xamarin.Firebase.iOS.Analytics">
      <Version>8.10.0.3</Version>
    </PackageReference>
    <PackageReference Include="Xamarin.Firebase.iOS.CloudMessaging">
      <Version>4.7.1</Version>
    </PackageReference>
    <PackageReference Include="Xamarin.Firebase.iOS.InstanceID">
      <Version>4.8.0</Version>
    </PackageReference>