需要打开 SMS/MMS 应用程序并将图像预加载到 iPhone OS 的文本输入中
我正在尝试打开 iPhone 上的短信/彩信应用程序,并将保存在相机胶卷中的图像预先加载到文本字段中。这可能吗?这是我尝试过的代码:
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]];
将图像保存到相机胶卷后,我收到了来自退货的 URL。不幸的是这不起作用。有什么想法吗?
谢谢!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我相信你可以直接从你自己的应用程序在 iOS 4.0 中编写短信,但不确定是否要附加图像......
I believe you can compose SMS in iOS 4.0 directly from your own app, but not sure about attaching images...
我认为这是不可能的。
您可以传递一个电话号码,仅此而已。
Uphone URL 方案
I don't think that's possible.
You can pass along a phone number and that is about it.
Uphone URL Schemes