You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Justin Noel (JIRA)" <ji...@apache.org> on 2014/09/25 13:51:33 UTC

[jira] [Comment Edited] (CB-7605) navigator.contacts.pickContact does not return on cancel

    [ https://issues.apache.org/jira/browse/CB-7605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14143599#comment-14143599 ] 

Justin Noel edited comment on CB-7605 at 9/25/14 11:51 AM:
-----------------------------------------------------------

FYI : Still have the same problem in Cordova 3.6.3-0.2.13 and org.apache.cordova.contacts 0.2.14-dev "Contacts"


was (Author: jnoel):
FYI : Still have the same problem in Cordova 3.6.3-0.2.13

> navigator.contacts.pickContact does not return on cancel
> --------------------------------------------------------
>
>                 Key: CB-7605
>                 URL: https://issues.apache.org/jira/browse/CB-7605
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Contacts
>         Environment: Plugin version : 0.2.13
> Xcode : Version 6.0.1 (6A317)
> Cordova : 3.5.0-0.2.7
> iOS 7.1.2
>            Reporter: Justin Noel
>
> Choosing the "Cancel" option on the contact picker fails to process either contactSuccess or contactError callbacks.
> Steps to reproduce : 
> Trigger contacts picker.  Tap the "Cancel" button.  App receives no callback for a success or failure.
> NOTE: When opening picker, get this exception: 
> {code}Exception - Name: NSRangeException Reason: *** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array{code}
> After opening the picker the first time and choosing Cancel, the picker will no longer open.  
> Sometimes, when opening the picker the first time or another time after trying repeatedly, this exception shows:
> {code}Warning: Attempt to present <CDVContactsPicker: 0x17ecd9e0> on <MainViewController: 0x17e1dcf0> while a presentation is in progress!{code}
> Sample Code:
> {code:javascript}
> navigator.contacts.pickContact(
>   function(contact){
>     console.log("In service. selected contact=");
>     console.log(contact);
>     selectedContact = formatContact(contact);
>     deferred.resolve( selectedContact );
>   },function(err){
>     console.log("Error");
>     console.log(err);
>     deferred.reject();
>   }
> );
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)