简体   繁体   English

在iOS应用中使用Body SMS Twilio

[英]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. 我正在为iPhone开发一个应用程序,并使用Twilio发送SMS以自动形式在用户确定事件时发送消息。 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. 仅发送最后一个变量ordinateLabel.text。 Any solutions? 有什么办法吗?

You're not properly concatenating the strings. 您没有正确连接字符串。

Try: 尝试:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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