{ "version":"1.1", "baseMap":{ "baseMapLayers":[ { "url":"https://services.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer" } ], "title":"Topography" }, "operationalLayers":[ { "url":"http://OurServer/ArcGIS/rest/services/Gas_Stations/MapServer", "visibility":true, "opacity":0.75, "title":"Environmental Sensitivity" } ] }
Solved! Go to Solution.
AGSCredential *cred = [[AGSCredential alloc] initWithToken:@"token_generated_manually" referer:@"http://ourserver"]; NSURL *url = [NSURL URLWithString:@"http://ourserver/arcgis/mobile/content/MobileWeb/Maps"]; layer = [AGSDynamicMapServiceLayer dynamicMapServiceLayerWithURL:url credential:cred]; lyr = [self.mapView addMapLayer:layer withName:@"Gas_Stations"];
Error Domain=NSCocoaErrorDomain Code=500 "Unknown error occurred" UserInfo=0x86950a0 {NSLocalizedFailureReason=Unknown error occurred, NSURL=http://ourserver/arcgis/mobile/content/MobileWeb/Maps?f=json&token=token_generated_manually, NSLocalizedDescription=Unknown error occurred}