SMS body in iphone SDK

前端 未结 2 916
眼角桃花
眼角桃花 2021-01-23 23:52

I need to send an SMS from my iphone app. the body of the SMS is created programatically. so when i tap on a button the SMS application should get opened with my message pre-typ

相关标签:
2条回答
  • 2021-01-24 00:19

    You can set the body in iOS 4. Please cf the documentation.

    0 讨论(0)
  • 2021-01-24 00:21

    You can't set the SMS body. The only things you can do from your code, as per the official SDK, is 1) to open the SMS application:

    NSString *stringURL = @"sms:";
    NSURL *url = [NSURL URLWithString:stringURL];
    [[UIApplication sharedApplication] openURL:url];
    

    and 2) to set the phone number for a new message:

    NSString *stringURL = @"sms:+12345678901";
    NSURL *url = [NSURL URLWithString:stringURL];
    [[UIApplication sharedApplication] openURL:url];
    
    0 讨论(0)
提交回复
热议问题