Select to view content in your preferred language

Application crashing on trying to add map layer from ArcGISServer online

739
1
02-05-2011 09:23 AM
SumanChatterjee
Emerging Contributor
Hi,
I am new to this iOS programming. I have worked with some applications without map. They works fine. But I just started adding a map layer from ArcGISServerOnline following their examples. But my application in the simulator 4.2 crashes with the message "Program received signal SIGABRT" (on debugging) when executing the line marked red below:


- (void)viewDidLoad {
// ----- US highways from ESRI

NSURL *url = [NSURL URLWithString: @"http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapSe..."];
//It crashes on executing the line below
AGSDynamicMapServiceLayer *highwayLayer = [AGSDynamicMapServiceLayer dynamicMapServiceLayerWithURL: url];
[self.mapView addMapLayer:highwayLayer withName:@"US Highways"];
[super viewDidLoad];
}

I will really appreciate if somebody figures out the problem

Thanks
Suman
0 Kudos
1 Reply
SumanChatterjee
Emerging Contributor
Hi All,
I found out the problem. Its because I did not add the -ObjC and -all_load flags in the Other linker flags under Edit Active Target settings.

Thanks
0 Kudos