问题
I did goggling about MMS
in iPhone but I did not find much info on this,most of the findings are related to images. I would like to send audio using MMS
in iPhone
using ios sdk
.Is it possible to do this?I have the following queries regarding MMS
.
How to identify all the MMS
audio files in iPhone
using iOS SDK
?
How to play MMS
files in iPhone
using iOS SDK
?
Could some one help me in identifying these things !
回答1:
MMS
as in Multimedia Messaging Service is not available for a developer in iOS.
Only the messages.app can send MMS
, you can't access any data from the messages.app nor can you send an MMS
.
The iOS SDK provides Message UI Framework which allows you to send Email and Text messages. But the text messages are restricted to SMS
only.
Update: iOS 7 now supports attachment.
- (void)sendAudioFile:(NSURL)audioFilePath {
if ([MFMessageComposeViewController canSendAttachments] &&
[MFMessageComposeViewController canSendText] &&
[MFMessageComposeViewController isSupportedAttachmentUTI:@"com.apple.coreaudio-format"]) //.caf files
{
NSLog(@"can send");
MFMessageComposeViewController *message = [[MFMessageComposeViewController alloc] init];
[message addAttachmentURL:audioFilePath withAlternateFilename:nil]; //.caf file
message.messageComposeDelegate = self;
[self presentViewController:message animated:YES completion:nil];
}
else {
NSLog(@"cannot send");
}
}
来源:https://stackoverflow.com/questions/14434330/how-to-use-mms-for-audio-in-iphone