iOS手机示例短信代码-短信API
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了iOS手机示例短信代码-短信API相关的知识,希望对你有一定的参考价值。
The following example of ios Phone sample SMS code employs user-friendly object, with a basis on the HTTP API.
//IOS SMS API integration code //Create Objects NSMutableData * responseData; NSURLConnection * connection; // In your viewDidLoad method add this lines -(void)viewDidLoad { [super viewDidLoad]; //Your application url //Multiple mobiles numbers separated by comma //Sender ID,While using route4 sender id should be 6 characters long. //Your message to send, Add URL encoding here. // Prepare your url to send sms with this parameters. } // implement URLConnection Delegate Methods as follow { //Get response data } { [responseData appendData:data]; } { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error"message:error.localizedDescription delegate:self cancelButtonTitle:nil otherButtonTitles:@"OK", nil]; [alert show]; } { // Get response data in NSString. }
以上是关于iOS手机示例短信代码-短信API的主要内容,如果未能解决你的问题,请参考以下文章