Skip to content

Commit f73344b

Browse files
author
Adam Harris
committed
Merge pull request #45 from vkeepe/master
Fixed issue with warning thrown in Cordova 4.0.0 for iOS.
2 parents 0d8946f + 69a1ee0 commit f73344b

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/ios/Sms.m

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,15 @@ - (void)messageComposeViewController:(MFMessageComposeViewController *)controlle
7373
[self.viewController dismissViewControllerAnimated:YES completion:nil];
7474

7575
if(webviewResult == 1) {
76-
[super writeJavascript:[[CDVPluginResult resultWithStatus:CDVCommandStatus_OK
77-
messageAsString:message]
78-
toSuccessCallbackString:self.callbackID]];
76+
CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK
77+
messageAsString:message];
78+
79+
[self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackID];
7980
} else {
80-
[super writeJavascript:[[CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR
81-
messageAsString:message]
82-
toErrorCallbackString:self.callbackID]];
81+
CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR
82+
messageAsString:message];
83+
84+
[self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackID];
8385
}
8486
}
8587

0 commit comments

Comments
 (0)