Bhavik Sanghavi
Bhavik Sanghavi

Reputation: 97

How to send sms programmatically in background without open sms popup?

I want to send SMS functionality in background without open popup for SMS

any framework or SDK for that

I have used CTMessageCenter (CoreTelephony Framework) but not working

code:

BOOL success =  [[CTMessageCenter sharedMessageCenter] sendSMSWithText:@"test 1234..." serviceCenter:nil toAddress:@"+1234567890" withMoreToFollow:NO];

    if(success){
        NSLog(@"Message SENT");
    }else{
        NSLog(@"Message not SENT");
    }

Is there any other way?

Upvotes: 0

Views: 616

Answers (1)

vichevstefan
vichevstefan

Reputation: 898

No, they don't allow sending SMS or email without user interaction, even you do with trick, it will be rejected

Upvotes: 2

Related Questions