<?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: Can not get feature with attachments in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/can-not-get-feature-with-attachments/m-p/1067957#M7006</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You are correct. The fetchData method is async, and so you will see the "fetch data not done" message before the fetchData even makes the request. You need to hold on to each "att", which can probably be done by holding on to each "attachments" array in the same way as you are holding on to the "features" array.&lt;/P&gt;&lt;P&gt;Otherwise, each attachments array returned from "fetchAttachments" will go out of scope at the end of the completion block and be deallocated, and so all the "att" objects will be released before their fetchData calls can complete, and their callbacks will not be entered.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-06-14_11-40-47.png" style="width: 780px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/15889i179737D18DCBB633/image-dimensions/780x464?v=v2" width="780" height="464" role="button" title="2021-06-14_11-40-47.png" alt="2021-06-14_11-40-47.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hope that helps!&lt;/P&gt;&lt;P&gt;Nick&lt;/P&gt;</description>
    <pubDate>Mon, 14 Jun 2021 15:52:53 GMT</pubDate>
    <dc:creator>Nicholas-Furness</dc:creator>
    <dc:date>2021-06-14T15:52:53Z</dc:date>
    <item>
      <title>Can not get feature with attachments</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/can-not-get-feature-with-attachments/m-p/1067773#M7003</link>
      <description>&lt;P&gt;I want to get feature with attachments, i think fetchData is function&amp;nbsp;asynchronous, so it's always print "fetch data not done" first. So how can i get feature with it attachments? Thanks in advance&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SonMinh_0-1623641567220.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/15847iECABE59F26A9E660/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SonMinh_0-1623641567220.png" alt="SonMinh_0-1623641567220.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 03:36:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/can-not-get-feature-with-attachments/m-p/1067773#M7003</guid>
      <dc:creator>SonMinh</dc:creator>
      <dc:date>2021-06-14T03:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: Can not get feature with attachments</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/can-not-get-feature-with-attachments/m-p/1067957#M7006</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You are correct. The fetchData method is async, and so you will see the "fetch data not done" message before the fetchData even makes the request. You need to hold on to each "att", which can probably be done by holding on to each "attachments" array in the same way as you are holding on to the "features" array.&lt;/P&gt;&lt;P&gt;Otherwise, each attachments array returned from "fetchAttachments" will go out of scope at the end of the completion block and be deallocated, and so all the "att" objects will be released before their fetchData calls can complete, and their callbacks will not be entered.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-06-14_11-40-47.png" style="width: 780px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/15889i179737D18DCBB633/image-dimensions/780x464?v=v2" width="780" height="464" role="button" title="2021-06-14_11-40-47.png" alt="2021-06-14_11-40-47.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hope that helps!&lt;/P&gt;&lt;P&gt;Nick&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 15:52:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/can-not-get-feature-with-attachments/m-p/1067957#M7006</guid>
      <dc:creator>Nicholas-Furness</dc:creator>
      <dc:date>2021-06-14T15:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: Can not get feature with attachments</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/can-not-get-feature-with-attachments/m-p/1068255#M7007</link>
      <description>&lt;P&gt;so if i want get each feature with it's attachments, which the best way i can do?&amp;nbsp; Can you give me code example? Thanks in advance&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 04:30:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/can-not-get-feature-with-attachments/m-p/1068255#M7007</guid>
      <dc:creator>SonMinh</dc:creator>
      <dc:date>2021-06-15T04:30:06Z</dc:date>
    </item>
  </channel>
</rss>

