How to programatically choose which sim from a dual sim iPhone to send sms?

546 Views Asked by At

I am using MFMessageComposeViewController for loading SMS content. But it takes the default number for sending the SMS.

Can I change the default number programatically like, Choose Sim 1 or Sim 2

from within the app without depending on iPhone settings?

Currently the code for using MFMessageComposeViewController is as given below:

 MFMessageCompose *controller1 = [[MFMessageCompose alloc] init] ;
 controller1 = [[MFMessageCompose alloc] init] ;
 if([MFMessageCompose canSendText])
{
    controller1.body = bodyOfMessage;
    controller1.recipients = recipients;
    controller1.messageComposeDelegate = self;
    [self presentViewController:controller1 animated:YES completion:Nil];
 }

This works fine If I am using a single sim iPhone but since there are dual sim iPhones too is it possible to programmatically choose between "SIM 1" and "SIM 2" within the application for sending the message without going to the iPhone Settings?. Any ideas will be highly appreciated

1

There are 1 best solutions below

0
Tweak iOS On

Not sure if the OP has an answer or not. Anyway, for your reference, in jailbreak community, there is a tweak named eSim+. It can provide option SIM1 or SIM2 for call or sms.