AnsweredAssumed Answered

PictureMarkerSymbol in iOS Xamarin does not load an image from the local file system or included in the MainBundle

Question asked by Dexterously on Mar 23, 2018
Latest reply on May 17, 2018 by Dexterously

We have an iOS app using the 100.2.1 sdk.

We need to load an image from the MainBundle or file system to dynamically change the image to load depending on the user.

We are attempting with this code:


var url = NSBundle.MainBundle.PathForResource("StreetsIconSmall", "png", "Images");

if (url == null || url.Length == 0)
   return null;


if (!System.IO.File.Exists(url))
   return null;


return new Esri.ArcGISRuntime.Symbology.PictureMarkerSymbol(new Uri(url));


The file exists and it was compiled with buildaction "BundleResource"


This same code works just fine, if we put the same image on our server and use a web url such as http://domain/images/StreetsIconSmall.png.

Also, the image works when loaded to a UIImageView.


Any ideas?ArcGIS Runtime SDK for .NET@