AnsweredAssumed Answered

Error adding features to offline GDB  (!input_SR || !output_SR)

Question asked by milack on Jul 8, 2018
Latest reply on Jul 18, 2018 by GDhakal-esristaff

I'm working with an offline geodatabase with version 100.3 of the iOS SDK.  I have an AGSFeatureTable and used create() to get a new feature. I set the geometry on the new feature and then attempt to save.  



let table = self.esriGeodatabase?.geodatabaseFeatureTable(withName: tableName)
let feature = table?.createFeature()
feature.geometry = geometry, completion)


I get the following error and stack trace (image attached):


Error Domain=com.esri.arcgis.runtime.error Code=2 "Invalid argument" UserInfo={NSLocalizedFailureReason=!input_SR || !output_SR, NSLocalizedDescription=Invalid argument, Additional Message=!input_SR || !output_SR}


Note: Same as the error here: Error updating Feature: Invalid Argument: !input_SR || !output_SR 



I've verified the following: 


  • The AGSFeatureTable spatial reference is set to 102100
  • The spatial reference of the new feature's geometry is 102100
  • The geometry is not nil and was created with an AGSSketchEditor



The error message and stack trace lead me to believe that a reprojection is occurring but I can't understand why, since the table SR matches the geometry SR. Regardless, I can't see why this would fail since the spatial reference is set on both the feature table and the new feature.


Any help on this would be much appreciated.