Can't return a String value and append it...why?
- by squeezemylime
I am writing an app and am having problems returning a simple string value, and I'm not sure why.
The function I am using (within a file called APIManager.m) is:
- (NSString*) returnVenueUrl {
NSString *venueUrl = [devEnvironment stringByAppendingString:@"venue/id/"];
return venueUrl;
}
I can return this properly by doing this in another .m file:
APIManager *apiManager = [APIManager apiManager];
NSLog(@"view venue URL is here: %@", [apiManager returnVenueUrl]);
But when I go to append a variable cast as a String onto it, I get nothing..
venueURL = [apiManager returnVenueUrl];
venueURL = [venueURL stringByAppendingString:venueId];
NSLog(@"the Full Venue URL is: %", venueURL);
If anyone has any advice on how to fix this, it would be much appreciated!