<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Error on add feature in a feature layer in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/error-on-add-feature-in-a-feature-layer/m-p/402332#M3477</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you please intercept the request/response using some web debugging proxy and post it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Nimesh&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Mar 2014 20:00:16 GMT</pubDate>
    <dc:creator>NimeshJarecha</dc:creator>
    <dc:date>2014-03-10T20:00:16Z</dc:date>
    <item>
      <title>Error on add feature in a feature layer</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/error-on-add-feature-in-a-feature-layer/m-p/402331#M3476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We are trying to add a features to a feature service using the iOS SDK. The AGS service provides the following error on success callback:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If I inspect the returned AGSFeatureLayerEditResults I retrieve this JSON response: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;{
&amp;nbsp;&amp;nbsp; error =&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; code = 209625216;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; description = "";
&amp;nbsp;&amp;nbsp; };
&amp;nbsp;&amp;nbsp; objectId = 0;
&amp;nbsp;&amp;nbsp; success = 0;
}&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The request of adding the feature has been implemented with the applyedits and addfeature. This is the code in used:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
NSMutableDictionary *attributesDict = [[NSMutableDictionary alloc] init];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [attributesDict setValue:@"-" forKey:@"fk_communitycode"];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [attributesDict setValue:[defaults stringForKey:@"global_id"] forKey:@"fk_user_id"];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [attributesDict setValue:_beach.name forKey:@"name"];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [attributesDict setValue:[NSNumber numberWithInt:_beach.length.intValue] forKey:@"length"];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //[attributesDict setValue:_beach.surveyLocation forKey:@"survey_location"];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [attributesDict setValue:_beach.type forKey:@"beach_type"];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [attributesDict setValue:_beach.location forKey:@"beach_location"];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [attributesDict setValue:_beach.security forKey:@"security_info"];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [attributesDict setValue:_beach.nationalCode forKey:@"national_reference"];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [attributesDict setValue:_beach.url forKey:@"external_link"];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSGraphic *beach = [AGSGraphic graphicWithGeometry:_geometry symbol:nil attributes:attributesDict];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [_featureLayer applyEditsWithFeaturesToAdd:[NSArray arrayWithObject:beach] toUpdate:nil toDelete:nil];
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When the request is posted directly on the ArcGIS Server Add Feature form on JSON, the response is successful and the feature is added (as follows).&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;[{
&amp;nbsp;&amp;nbsp; "beach_location" = "Near river mouth";
&amp;nbsp;&amp;nbsp; "beach_type" = Sandy;
&amp;nbsp;&amp;nbsp; "fk_communitycode" = "-";
&amp;nbsp;&amp;nbsp; "fk_user_id" = "{F8D35EAA-7118-4DAB-B6C0-A4F700A12668}";
&amp;nbsp;&amp;nbsp; length = 96;
&amp;nbsp;&amp;nbsp; name = Example;
}]&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We will appreciate any help on this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Feb 2014 07:25:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/error-on-add-feature-in-a-feature-layer/m-p/402331#M3476</guid>
      <dc:creator>koaltechs_</dc:creator>
      <dc:date>2014-02-21T07:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: Error on add feature in a feature layer</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/error-on-add-feature-in-a-feature-layer/m-p/402332#M3477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you please intercept the request/response using some web debugging proxy and post it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Nimesh&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2014 20:00:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/error-on-add-feature-in-a-feature-layer/m-p/402332#M3477</guid>
      <dc:creator>NimeshJarecha</dc:creator>
      <dc:date>2014-03-10T20:00:16Z</dc:date>
    </item>
  </channel>
</rss>

