Hello, I've actually inherited a .NET project from another vendor that is using the Esri.ArcGISTRuntime SDK to download tiles from an Esri map server.
(The use case is a bit complicated, it's for an app used by people to go to national parks in Australia where there's no internet. This little .NET app runs on a server and creates 'packs' of all the things for one of these national parks, including a big cache of map tiles, which are rendered in the native iOS and Android app using Esri's native SDKs)
Anyway, the .NET code is failing when simply trying to prepare the task:
await ExportTileCacheTask.CreateAsync(serviceUri);
The error that comes out says:
System.PlatformNotSupportedException: Operation is not supported on this platform.
at Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.InitializeRuntimeCore()
at Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.Initialize()
at Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.OnBeforeFirstUseOfGeneratedWrapper()
at RuntimeCoreNet.GeneratedWrappers.CoreWrapperBase..cctor()
I'm attempting to run this code on a Mac (and was hoping to deploy to Linux). Is there some other nuget I can install to get this to work? Note that this is the only thing I'm trying to do with the Esri nuget - there's no UI in the specific little server task I'm dealing with here.
Thanks!
Solved! Go to Solution.
You must target net8.0-maccatalyst for this to work. Vanilla net8.0 is not supported on mac.
You must target net8.0-maccatalyst for this to work. Vanilla net8.0 is not supported on mac.
Thanks, I eventually came to the same realisation. Happily I was able to achieve the same outcome by going direct to the the ArcGIS REST API, using the /exportTiles endpoint.
We could probably improve that error message a bit to make it more clear. I'll put that in the backlog.