views:

78

answers:

2

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!

+2  A: 

I don't think that's possible. You can pass along a phone number and that is about it.

Uphone URL Schemes

BojanG
You're correct, it isn't possible. Thanks for your input!
jmurphy
A: 

I believe you can compose SMS in iOS 4.0 directly from your own app, but not sure about attaching images...

Thomas Müller