NSString *tmpStr = [[NSString alloc]initWithData:data encoding:NSUTF8StringEncoding];
xmlSms = [xmlSms stringByAppendingString:tmpStr];
NSLog(xmlSms);
I got code above but NSLog
doesn't show anything... Anybody know the problem??
nevermind... i figured out why. The problem is, when you want to use stringByAppendingString on a string, the string should have initial value.
Wrong example:
NSString *str1;
str1 = [str1 stringByAppendingString:@"test"];
Should be:
NSString *str1 = @"";
str1 = [str1 stringByAppendingString:@"test"];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With