I want to open SMS Message App to copy some text from friends. I am not creating SMS.
How to launch iphone SMS Message app using Swift code? I come across this code below for launching Mail app but not working.
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"mailto:"]];
I changed it to and the same not working
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"sms:"]];
appreciate your help. TIA
I'm not sure why you want to explicitly use SMS app and I'm not sure if it's possible. On the other hand iOS by default offers
MFMessageComposeViewController
for sending SMS from iOS app.Check this Swift example for more details.
Edit: I've found this wiki page which may contain answer for your question. Be aware I haven't tested it.
Swift 5: