Can't return a String value and append it...why?
Posted
by squeezemylime
on Stack Overflow
See other posts from Stack Overflow
or by squeezemylime
Published on 2010-06-09T22:38:46Z
Indexed on
2010/06/09
22:42 UTC
Read the original article
Hit count: 271
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!
© Stack Overflow or respective owner