You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2014/02/11 00:21:33 UTC

[jira] [Commented] (CB-4590) chooseContact in CDVContacts crashes app

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

ASF subversion and git services commented on CB-4590:
-----------------------------------------------------

Commit 8e89957ccc8b4a29229d4335c39a1ccf961d2498 in branch refs/heads/master from [~shazron]
[ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-contacts.git;h=8e89957 ]

CB-4590 - chooseContact in CDVContacts crashes app


> chooseContact in CDVContacts crashes app
> ----------------------------------------
>
>                 Key: CB-4590
>                 URL: https://issues.apache.org/jira/browse/CB-4590
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS, Plugin Contacts
>    Affects Versions: 2.9.0
>         Environment: iOS 6.1.4 on iPhone 5.
>            Reporter: Daniel Morgan
>            Assignee: Shazron Abdullah
>            Priority: Critical
>              Labels: 2.9.0, contacts
>             Fix For: 3.4.0
>
>
> Using Cordova 2.9:
> In chooseContact I send the option in JS:
> var contactOptions = {allowsEditing: false};
> with the chooseContacts call, which then causes on line 194 in CDVContacts:
> pickerController.allowsEditing = (BOOL)[options existsValue : @"true" forKey : @"allowsEditing"];
> To crash. When you put a breakpoint in to check the options dictionary it comes back with
> { allowsEditing = 0; }
> and the crash in the logs from this line is:
> -[__NSCFBoolean compare:options:]: unrecognized selector sent to instance 0x3ab59528
> 2013-08-15 10:46:50.081 in uncaughtExceptionHandler
> 2013-08-15 10:46:50.082 *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFBoolean compare:options:]: unrecognized selector sent to instance 0x3ab59528' First throw call stack:
> (0x327ef3e7 0x3a4ea963 0x327f2f31 0x327f164d 0x32749208 0xc1071 0xc33f7 0x11584d 0x1150e1 0x114cd7 0x114e63 0x114d8d 0x331074a1 0x327c48f7 0x327c415d 0x327c2f2f 0x3273623d 0x327360c9 0x3631533b 0x346522b9 0x5cdf9 0x5cdd0)
> libc++abi.dylib: terminate called throwing an exception 
> If I comment the line out, the code executes with no crashes and I receive the contact viewController, can select a contact and return back successfully with the contacts data. 
> UPDATE: Contact I receive back (when that line is commented out) is a different contact than the one I selected. The contact I receive exists in my contacts though, but for example I choose "Chelsea" it brings back "Corey", both are in my contacts, just different contact than anticipated.
> UPDATE (again): Reason why I was getting the above results is because I was trying to filter with their id to find the contact afterwards. I understand that the chooseContact method returns both (id, contact), but this is also broken. When I print out the contact object in JS, I receive the following: 
> Contact {"id":56,"rawId":null,"displayName":null,"name":null,"nickname":null,"phoneNumbers":null,"emails":null,"addresses":null,"ims":null,"organizations":null,"birthday":null,"note":null,"photos":null,"categories":null,"urls":null}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)