As far as I can gather from our conversation, looks like it is impossible to tell when the user pressed “Send” on iOS (not the case for Android apparently).
This is a real problem as the timing to show the “thank you” message is unclear.
So I came up with my own “solution” (solution is a euphemism). It is not really a solution at all, so “workaround” might be more appropriate nomenclature.
The key was to not consider when the “Send” button was tapped at all.
One observes on iOS that (Android behavior unknown) the native.showPopup( ) call obscures the entire screen.
I took advantage of this fact by basically calling showThankYouMessage( ) immediately before calling native.showPopup( ).
Since the popup consumes the entire screen, the user doesn’t know that the showThankYouMessage( ) has already been called. And when the user taps “Send” (thereby killing the popup), the thank you message is right there, as if it was called when the user tapped “Send”.
There is about a 1 second delay for the native.showPopup( ) to actually display, so timer.performWithDelay(1000, function( ) showThankYouMessage( ) end) should be used.
One minor issue with this approach is that the same thank you message will be displayed even when the user taps “Cancel”, but I do not see this as a significant problem.
KC