0

Orginally a Xamarin project (Xamarin-ios, Xamarin-Android) was migrated to .net6 according to this link.

Most of the dependencies was kept since iOS and Android still had a different codebase and .net6+ supported monoandroid(link). Since the next step was updating to .net7 there was some issues specifically with iOS Google Maps in these NuGets packages:

  • Xamarin.Google.iOS.Maps:6.0.1.1
  • Xamarin.Build.Download:0.11.4

The issues are:

  • The above NuGets only have support for xamarinios10 and net6.0-ios15.4, e.g. is officially incompatible with .net7-ios.
  • All the documentation for .net7 apps only mention multi-project .NET MAUI app, and not how to solve it natively with only MauiEssentials (previously XamarinEssentials) like this.

The questions are as following:

  1. Can this be solved by using only MauiEssentials, and if so how?
  2. Are they any other binding libs for .net7-ios GoogleMaps?
  3. What are the risks for running an "incompatible" NuGet packet since it works currently?
  4. Is the future dead for developing in .net7-ios/android and above?

1 Answer 1

1

1.No.

2.You can use Maui.GoogleMaps, it's targeting .NET 7 for best experience. Get your API Keys from Google and configure for iOS as below:

using Maui.GoogleMaps.Hosting;
...
public static MauiApp CreateMauiApp()
{
        var builder = MauiApp.CreateBuilder();
        builder.UseMauiApp<App>();
            
#if ANDROID
        builder.UseGoogleMaps();
#elif IOS
        builder.UseGoogleMaps(Variables.GOOGLE_MAPS_IOS_API_KEY);
#endif
        return builder.Build(); 
}
  1. I would suggest that make sure there aren't any dependences on any Xamarin native package. For instance Xamarin.Essentials and so on.

  2. You can refer to the Roadmap and see this:https://github.com/dotnet/maui/discussions/10839

Sign up to request clarification or add additional context in comments.

2 Comments

To clarify my post: We do NOT have a MauiApp, only .net-ios and .net-android.
@TurnOffNFC Thanks for the update, for the native .net-ios and native .net-android, I don't think there's any other binding libs, you can search in this site:nuget.org/packages

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.