AnsweredAssumed Answered

Synchronous AGSFeatureLayer initialization fails: SDK 10.1.1 <--> AGS 10.1

Question asked by jungelpost on Apr 10, 2013
Latest reply on Apr 11, 2013 by jungelpost
Hi forum,

Our customer just bumped their ArcGIS server from 10.05 to 10.11, and they re-published their MXD to the new server.

I need some details from a feature service, so at some point I fetch the service by initializing a feauture layer, synchronously:

NSError *error = nil;
AGSFeatureLayer *lyr = [[AGSFeatureLayer alloc] initWithURL:url mode:AGSFeatureLayerModeOnDemand credential:[Globals getCredential] error:&error];
if (!lyr.fields) { /* a problem */ }

Now. Of course I have.. a problem.. Looking at the ?f=pjson on the two services, they look the same to me. But in the debugger, the layer just does not seem correct at all:

(lldb) po [lyr encodeToJSON]
$1 = 0x12008bc0 {
    allowGeometryUpdates = 0;
    currentVersion = "9.3";
    drawingInfo =     {
    editable = 0;
    geometryType = "";
    hasAttachments = 0;
    id = 0;
    maxScale = 0;
    minScale = 0;

I´m about to try 10-1-1-u1 and cross some fingers, but I submitted this app for review yesterdays so it´s already kind of sad. Attached the json for both new and old feature services. Any ideas what is going on?