I am calling a web service to return XML data for states/provinces of countries.
- (void)viewDidLoad {
[super viewDidLoad];
NSString *titleForURL = self.navigationItem.title;
NSString *path =[NSString stringWithFormat:@"http://myURL/AppointmentWS/CountryStateService.asmx/GetByCountryName?countryName=%@", titleForURL];
//NSString *path =@"http://myURL/CountryStateService.asmx/GetByCountryName?countryName=Canada";
UIApplication* app = [UIApplication sharedApplication];
app.networkActivityIndicatorVisible = YES;
if ([statesData count] == 0) {
NSLog(path);
[self parseXMLFileAtURL:path];
}
If I explicitly put the countryName parameter, it works no problem. But if I use the string format specifier, I get an Error Code 5
I think it may have to do with how the url gets encoded?
Thoughts?