0

私はこのURLを持っています

myString = file:///var/mobile/Containers/Data/PluginKitPlugin/-------/Documents/MyAudio.m4a

ここに私の送信コードがあります

  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");
    }

送信用のオーディオ ファイルを取得できません。メッセージ カウンターなどしかありません。

4

1 に答える 1