简体   繁体   中英

MSMessagesAppViewController didStartSending overridden method is not called on SEND button tap

I have created an iMessage app to send MSSticker converting from images.

I have implemented following overridden method:

override func didStartSending(_ message: MSMessage, conversation: MSConversation) {
        // Called when the user taps the send button.

    // Here I am adding rewards points on every sticker sending
    }

In iOS 10.2.0 it worked fine means rewards points get added but after updating to 10.2.1 is suddenly stopped and now I am no longer get callback to didStartSending method nor didCancelSending is called.

Is this a iOS 10.2.1 bug or should I do with any of the app settings for getting notified with the above method?

Any help would be greatly appreciated.

In new update you must have to use below method to send message. If you are not call below method then func didStartSending will not call.

    func insert(_ message: MSMessage, 
completionHandler: ((Error?) -> Void)? = nil)

and also check below things

method does not call if the controller's presentationStyle property is MSMessagesAppPresentationStyle.transcript , or if its presentationContext property is MSMessagesAppPresentationContext.media .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM