Need to open the SMS/MMS app and have an image pre-loaded into the text input in iPhone OS

Posted by jmurphy on Stack Overflow See other posts from Stack Overflow or by jmurphy
Published on 2010-06-16T22:44:19Z Indexed on 2010/06/16 23:02 UTC
Read the original article Hit count: 239

Filed under:
|
|
|

Hello,

I am trying to open the SMS/MMS app on the iPhone and have an image that is saved in the camera roll pre loaded into the text field. Is this possible? Here is the code I have tried:

    NSString *urlString = [NSString stringWithString:@"sms://asset/asset.JPG?id=1000000041&ext=JPG"];       
NSString *escaped = [urlString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSLog(@"URL: %@", escaped);

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:escaped]];

I received the URL from a return after I saved the image to the camera roll. Unfortunately this doesn't work. Any ideas?

Thanks!

© Stack Overflow or respective owner

Related posts about iphone

Related posts about sms