2016-07-10 2 views
0

새 베타 2와 함께 안녕하세요. 해결할 수없는 새로운 문제가 있습니다.'insert (_ : completionHandler :)'에 대한 모호한 참조 xcode 8 beta 2

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

다른 누구나 동일한 문제가 있습니까? 대화에 문제가 있습니다.

답변

2

insert(_:localizedChangeDescription:)의 MSConversation 메서드가 없습니다. docs을보고 확인하십시오.

insert(_:completionHandler:)을 찾으셨습니까? 그렇다면 두 번째 매개 변수를 삭제하십시오.

+0

당신은 mvp입니다! – masaldana2

+0

이 글을 쓸 때 어떤 오류도 발생시키지 않고 메시지로 삽입하지도 않습니다. (tableview : didselect {messageConnectionation? (메시지, completionHandler : {(오류) 오류! = nil { print 삽입 - \ (오류) ") } }}}). 도와 주실 수 있니? – Sanju

관련 문제