我有这个网址
file:///var/mobile/Containers/Data/PluginKitPlugin/-------/Documents/MyAudio.m4a = myString
这是我的发送代码
MSConversation * conversation = self.activeConversation;
if (conversation) {
MSMessageTemplateLayout * activeLayout = [[MSMessageTemplateLayout alloc] init];
// activeLayout.image = image;
activeLayout.caption = @"Message Counter";
activeLayout.subcaption = @"Message subcaption";
activeLayout.trailingCaption = @"Trailing caption";
activeLayout.trailingSubcaption = @"Trailing Subcaption";
activeLayout.mediaFileURL = [NSURL URLWithString:myString];
activeLayout.imageTitle = @"Image counter";
activeLayout.imageSubtitle = @"Image subtitle";
MSMessage * message = [[MSMessage alloc] init];
message.layout = activeLayout;
message.URL = [NSURL URLWithString:@"Empty URL"];
message.summaryText = @"This is Summary";
[conversation insertMessage:message completionHandler:^(NSError *error) {
if (error) {
NSLog(@"Error sending message %@", [error localizedDescription]);
}
}];
}
else {
NSLog(@"No &%#%&^# conversation found");
}我无法获得发送的音频文件,我只有消息计数器等等。
发布于 2017-04-24 05:11:35
不要使用insertMessage -[[会话插入攻击:NSURL:myString;withAlternateFilename:@“备用名称”completionHandler:^(NSError * error) {DDLogInfo(@error is %@,error);}];
https://stackoverflow.com/questions/42164428
复制相似问题