简体   繁体   中英

Body SMS Twilio in app iOS

I'm making an app for iphone and sending SMS using Twilio for automatic form to send a message when an event determined by the user. I have everything ready but when sending the message only sends the last variable declared, when you have to send the whole body with the three variables. Why can this happen?

NSString *kMessage = (@"%@ %@ %@ %@.", tunombre, _addressOutlet.text, _cityOutlet.text, coordinateLabel.text);

Only send the last variable coordinateLabel.text. Any solutions?

You're not properly concatenating the strings.

Try:

NSString *kMessage = [NSString stringWithFormat:@"%@ %@ %@ %@",tunombre, _addressOutlet.text, _cityOutlet.text, coordinateLabel.text];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM