Is there another way of launching the Messages app in iOS? (for donations)

前端 未结 2 1708
悲哀的现实
悲哀的现实 2020-12-29 10:51

We\'re trying to submit an iOS app that makes charitable SMS donations. We\'ve done a number of these in the past without issue; but Apple is no longer willing to accept our

2条回答
  •  醉酒成梦
    2020-12-29 11:17

    You can set the body as well, but you have to escape the string.

    NSString *sms = @"sms://+1234567890&body=This is the body.";
    
    NSString *url = [sms stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]];
    

提交回复
热议问题