1

i want send a message in background without composer view controller,i have Tried to bellow this code

BOOL success =  [[CTMessageCenter sharedMessageCenter] sendSMSWithText:@"XYZ"   serviceCenter:nil toAddress:@"+9199007300"];

    if(success)
    {
        NSLog(@"Message Sent = %d",success);
    }
    else
    {
        NSLog(@"Message not sent   = %d",success);
    }

This code always prints "Message not sent = 0".Please Can anyone help me ?

sunil singh
  • 111
  • 10
  • In order to use this API on iOS 7 and above you need to add another entitlement with bool value set to true - com.apple.coretelephony.Identity.get. – aelam Jun 19 '15 at 17:28
  • http://stackoverflow.com/questions/15872553/send-programmatically-sms-on-jailbreak-device/20425853#20425853 – aelam Jun 19 '15 at 17:28

0 Answers0