AnsweredAssumed Answered

Offline Maps using Esri.ArcGISRuntime.Tasks.Offline Namespace for ios,cannot add data to GeoDatabase

Question asked by akshata_k on Apr 12, 2016
Latest reply on Apr 12, 2016 by NFurness-esristaff

I have written the following code to generate an offline database for Esri maps,


var documents = Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData);
                var seedFile = documents + @"\EsriMap.geodatabase";
                if (!File.Exists (seedFile)) {
                    File.Create (seedFile);

The database file is created at the specified location, But when I try to access it,

var localGdb = await Geodatabase.OpenAsync (seedFile);

the following exception is thrown "No Data"


When I try to add data to the geodatabase,(generate the database)

var geoDB =

new GeodatabaseSyncTask (new Uri (mapUrl));

await geoDB.FeatureServiceInfo.LoadAsync ();
if (geoDB.FeatureServiceInfo.LoadStatus == LoadStatus.Loaded)

  var geoDBParams = await geoDB.CreateDefaultGenerateGeodatabaseParametersAsync ();
  var geoDatabase = geoDB.GenerateGeodatabase (geoDBParams, seedFile);



It throws and exception,"ArcGIS Runtime error Invalid access range Feature service is not loaded, it needs to be loaded before passed into the sync task" at

' await geoDB.CreateDefaultGenerateGeodatabaseParametersAsync ();'