Reputation: 21
I need to open the pre installed SMS app in iPhone.
I know how to open SMS app using MFMessageUI
class, but the problem is that it can be used to display it as a modal view which in turns requires a view controller.
Does anybody know how to populate it in AppDelegate didFinishLaunchingWithOptions
?
Upvotes: 0
Views: 289
Reputation: 7921
NSString *stringURL = @"sms:+12345678901";
NSURL *url = [NSURL URLWithString:stringURL];
[[UIApplication sharedApplication] openURL:url];
This :)
Upvotes: -1
Reputation: 29767
Try this code
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"sms:1234567890"]];
Upvotes: 2