So I've created an AGSServiceFeatureTable and trying to populate it with features based on a query, however it doesn't seem to be completing. I don't get an error or anything and watching the url requests in Charles show's no network requests being made. The endpoint url and whereClause query I'm using is the same as a separate table i've used as a source for a Feature Layer on the map and it draws correctly. Am I missing something here (likely! haha) or is something else wrong here?
func <SPAN class="token function">getCountsInGeometry</SPAN><SPAN class="punctuation token">(</SPAN>creds<SPAN class="punctuation token">:</SPAN> AGSCredential<SPAN class="operator token">?</SPAN><SPAN class="punctuation token">,</SPAN> polygon<SPAN class="punctuation token">:</SPAN> AGSGeometry<SPAN class="operator token">?</SPAN><SPAN class="punctuation token">,</SPAN> bufferPoint<SPAN class="punctuation token">:</SPAN> AGSPoint<SPAN class="punctuation token">,</SPAN> query<SPAN class="punctuation token">:</SPAN> String<SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="token function">print</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"getting counts"</SPAN><SPAN class="punctuation token">)</SPAN>
guard let polygon <SPAN class="operator token">=</SPAN> polygon as<SPAN class="operator token">?</SPAN> AGSPolygon <SPAN class="keyword token">else</SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">return</SPAN>
<SPAN class="punctuation token">}</SPAN>
let table <SPAN class="operator token">=</SPAN> <SPAN class="token function">AGSServiceFeatureTable</SPAN><SPAN class="punctuation token">(</SPAN>url<SPAN class="punctuation token">:</SPAN> <SPAN class="token function">URL</SPAN><SPAN class="punctuation token">(</SPAN>string<SPAN class="punctuation token">:</SPAN> PGRLAYERURL<SPAN class="punctuation token">)</SPAN><SPAN class="operator token">!</SPAN><SPAN class="punctuation token">)</SPAN>
table<SPAN class="punctuation token">.</SPAN>featureRequestMode <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">.</SPAN>manualCache
table<SPAN class="punctuation token">.</SPAN>credential <SPAN class="operator token">=</SPAN> creds
let queryParams <SPAN class="operator token">=</SPAN> <SPAN class="token function">AGSQueryParameters</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
queryParams<SPAN class="punctuation token">.</SPAN>geometry <SPAN class="operator token">=</SPAN> polygon
queryParams<SPAN class="punctuation token">.</SPAN>spatialRelationship <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">.</SPAN>intersects
queryParams<SPAN class="punctuation token">.</SPAN>returnGeometry <SPAN class="operator token">=</SPAN> true
queryParams<SPAN class="punctuation token">.</SPAN>whereClause <SPAN class="operator token">=</SPAN> query
table<SPAN class="punctuation token">.</SPAN><SPAN class="token function">populateFromService</SPAN><SPAN class="punctuation token">(</SPAN>with<SPAN class="punctuation token">:</SPAN> queryParams<SPAN class="punctuation token">,</SPAN> clearCache<SPAN class="punctuation token">:</SPAN> true<SPAN class="punctuation token">,</SPAN> outFields<SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="string token">"*"</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN> <SPAN class="punctuation token">(</SPAN>results<SPAN class="punctuation token">,</SPAN> error<SPAN class="punctuation token">)</SPAN> in
<SPAN class="token function">print</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"done populateFromService"</SPAN><SPAN class="punctuation token">)</SPAN>
guard error <SPAN class="operator token">==</SPAN> nil <SPAN class="keyword token">else</SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="token function">print</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"Error \(error?.localizedDescription)"</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">return</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="token function">print</SPAN><SPAN class="punctuation token">(</SPAN>results<SPAN class="operator token">?</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="token function">featureEnumerator</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">.</SPAN>allObjects<SPAN class="punctuation token">.</SPAN>count<SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>