Hello with the new beta 2 i got a new problem that i couldn't solve.
var message = MSMessage()
var template = MSMessageTemplateLayout()
viewDidLoad() {
if let filePath2 =
Bundle.main().pathForResource("synth", ofType: "wav") {
let fileUrl = NSURL(string: filePath2)
let URL2 = fileUrl as! URL
template.mediaFileURL = URL2
}
message.layout = template
guard let conversation = activeConversation else {
fatalError("Expected a conversation") } conversation.insert(message,
localizedChangeDescription: nil) { error in
if let error = error {
print(error)
}
}
}
anyone else have the same problem? there's something wrong with conversation
There is no MSConversation method insert(_:localizedChangeDescription:)
. Look at the docs and see.
Did you mean insert(_:completionHandler:)
? If so, just delete the second parameter.