您可以在不使用本机ios应用程序的情况下发送sms吗?
我已经看过几个发送SMS消息的教程,但都打开了本机iOS消息应用程序,我想要的是,我的应用程序在不更改发送用户看不见的内容的应用程序的情况下发送SMS消息 这是我正在使用的代码,但会打开本机应用程序:您可以在不使用本机ios应用程序的情况下发送sms吗?,ios,xcode,sms,messenger,Ios,Xcode,Sms,Messenger,我已经看过几个发送SMS消息的教程,但都打开了本机iOS消息应用程序,我想要的是,我的应用程序在不更改发送用户看不见的内容的应用程序的情况下发送SMS消息 这是我正在使用的代码,但会打开本机应用程序: #pragma mark - IBAction methods -(IBAction)sendSMS:(id)sender { //check if the device can send text messages if(![MFMessageComposeViewCon
#pragma mark - IBAction methods
-(IBAction)sendSMS:(id)sender {
//check if the device can send text messages
if(![MFMessageComposeViewController canSendText]) {
UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"Advertencia" message:@"Su dispositivo no permite el envio de mensajes SMS" delegate:nil cancelButtonTitle:@"Aceptar" otherButtonTitles:nil];
[alert show];
return;
}
//set receipients - telefonos
NSArray *recipients = [NSArray arrayWithObjects:textNumero.text, nil];
NSLog(@"telefono: %@",recipients);
//set message text
NSString * message = textMensaje.text;
NSLog(@"mensaje: %@",recipients);
MFMessageComposeViewController *messageController = [[MFMessageComposeViewController alloc] init];
messageController.messageComposeDelegate = self;
[messageController setRecipients:recipients];
[messageController setBody:message];
// Present message view controller on screen
[self presentViewController:messageController animated:YES completion:nil];
}
#pragma mark - MFMailComposeViewControllerDelegate methods
- (void)messageComposeViewController:(MFMessageComposeViewController *)controller didFinishWithResult:(MessageComposeResult) result
{
switch (result) {
case MessageComposeResultCancelled:
break;
case MessageComposeResultFailed:
{
UIAlertView *warningAlert = [[UIAlertView alloc] initWithTitle:@"Advertencia" message:@"Ha ocurrido un error en el envio del mensaje" delegate:nil cancelButtonTitle:@"Aceptar" otherButtonTitles:nil];
[warningAlert show];
break;
}
case MessageComposeResultSent:
break;
default:
break;
}
[self dismissViewControllerAnimated:YES completion:nil];
}
因此,基本上绕过了任何阻止应用程序在用户背后发送优质短信的ios安全限制?你说苹果公司无论何时发送短信的限制必须来自本机应用程序,我的想法是,我的应用程序中的用户有一个号码列表,按下按钮可以直接从我的应用程序向该列表发送预定义的短信