I’m trying to implement MFMessageComposeViewController in an enterprise plugin.
So, I have
@interface AppCoronaDelegate:NSObject \<CoronaDelegate, MFMessageComposeViewControllerDelegate\>
When I create the MFMessageComposeViewController in my PluginLibrary::send(), one of the values I have to set in the created controller is
controller.messageComposeDelegate = ???;
So, how do I provide my AppCoronaDelegate in place of ???, so that when the user sends/cancels the SMS view, MFMessageComposeViewControllerDelegate didFinishWithResult will get called so that I can dismiss the SMS view?
None of the tutorials seem to cover the need to provide the delegate. In a pure Obj-C app,
controller.messageComposeDelegate = self;
is what’s done, but you can’t do that when self is a PluginLibrary, as is the case in a plugin.
Do I somehow get the delegate out of the runtime object?
Am I missing something? Thanks for any help!