Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS: How can I have my app launch the iMessage app?

I want to launch the iMessage app (built in new feature for iOS 5) from within my own application.. Can some one help me out ??

I know apps can be opened from within an app using openURL:, but whats the URL schema for iMessage??

Thanks in advance !!

like image 256
taus-iDeveloper Avatar asked Dec 04 '22 05:12

taus-iDeveloper


1 Answers

From IPhone URL Schemes:

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

You can't target iMessage specifically because it is transparent in the system. So you should work with SMS instead, and iMessage will be used if available.

like image 120
sch Avatar answered Dec 28 '22 06:12

sch