MSMessagesAppViewController not calling didStartSending overriden method

Hi All,

I started using Messages framework. I created a Messages extension and by default MSMessagesAppViewController was created.

I tried implementing some code inside the following ovveriden method:


override func didStartSending(_ message: MSMessage, conversation: MSConversation) {

// Called when the user taps the send button.

}


But when I tap on the send button keeping my extension active also, the above method was not called / notified. Is this a iOS 10 beta bug as of now or should I do with any of the app settings for getting notified with the above method?

Appreciate your suggestions.


Regards,

Deepak Srinivas

Replies

I just tried this with the IceCreamBuilder sample project and it seems like it's working. In that case I added that method to the MessagesViewController class, and when tapping the send button the delegate method gets called. Perhaps try that and compare it to your case?

I noticed something similar with the `didSelect` and `willSelect` delegate methods. I haven't been able to receive those delegate calls in IceCreamBuilder or my own app (on the Simulator, so that might make a difference). (I created a thread in the beta forum: https://forums.developer.apple.com/thread/50017)

We ran into similar issues - especially if we are debugging with break points - the fix / hack is to sometimes restart / reset the simulator and close and reopen Xcode . Worked for us and hopefully it will for u as well, Henry

Hi Henry,


Thanks for your response.

I tried doing the same as suggested in your reply. But its not working for me. I also tried with Ice Cream builder sample project. I tried debugging using breakpoints and print statements. But it simply never came inside the method body.


Regards,

Deepak Srinivas

Hi All,

Thanks for your response.

I tried doing the same as suggested in above responses. But its not working for me. I also tried with Ice Cream builder sample project. I tried debugging using breakpoints and print statements. But it simply never came inside the method body.

Any other suggestions to get this worked.


I am using Xcode Version 8.0 beta (8S128d).


Regards,

Deepak Srinivas

I have the same problem. The delegate methods are not called. Xcode Version 8.2.1 (8C1002)


It does not work in the IceCreamBuilder sample project or in any other project's boiler plate code. I have reset my simulator also as suggestion to no avail.

I have the same problem too on iOS 10.2

Hi,

I'm seeing a similar issue on iOS 10.2. I just released a new standalone iMessage app. I make a call to a remote server in the didStartSending method to gather some statistics.

During the whole development phase, the delegate method didStartSending was called, either in the simulator or on the device. But when I use the app downloaded from the iMessage App Store, my remote server is never hit and the app doesn't seem to trigger this delegate method.

In summary: it works when lauching the app from Xcode but it fails when using the app from the App Store.

Yes, I find that to be exactly true! The didStartSending method is called consistently when the device is attached to Xcode or on a simulator, but it terribly inconsistent when on an unattached device.

Still, I am facing this issue anyone found a solution to this. Xcode - 9.3 and iOS 11.3

I'm seeing this issue too. I never get calls to didStartSending, whether in my own app extension or in IceCreamBuilder. Same result in both the simulator and device. Xcode 10.1 and iOS 12.1.4. I've tried break points and print statements, it's not getting called.


It seems like there'd be more people reporting this if it were widespread so I'm wondering if it could be something to do with my own configuration but I haven't done anything radical that I know of. It concerns me that some others see it working in development but not in the wild.