Refactor peoplePickerNavigationControllerDidCancel, always return dictionnary with id kABRecordInvalidID.
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/92e159bc Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/92e159bc Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/92e159bc Branch: refs/heads/master Commit: 92e159bcf74339c659cabc0ef3cc0c65ec357bb6 Parents: 4845fcf Author: Olivier Louvignes <oliv...@mg-crea.com> Authored: Thu Jul 12 14:28:29 2012 +0200 Committer: Becky Gibson <becka...@apache.org> Committed: Thu Aug 16 11:19:50 2012 -0400 ---------------------------------------------------------------------- CordovaLib/Classes/CDVContacts.m | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/92e159bc/CordovaLib/Classes/CDVContacts.m ---------------------------------------------------------------------- diff --git a/CordovaLib/Classes/CDVContacts.m b/CordovaLib/Classes/CDVContacts.m index 790ec12..0aaea7f 100755 --- a/CordovaLib/Classes/CDVContacts.m +++ b/CordovaLib/Classes/CDVContacts.m @@ -236,7 +236,7 @@ { // return contactId or invalid if none picked CDVContactsPicker* picker = (CDVContactsPicker*)peoplePicker; - CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt: picker.selectedId]; + CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInt:kABRecordInvalidID], @"id", nil]]; [self writeJavascript:[result toSuccessCallbackString:picker.callbackId]]; if ([peoplePicker respondsToSelector:@selector(presentingViewController)]) {