[TIMOB-3473] iOS Contacts.getAllGroups not returning all groups
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Hold |
Resolution Date | 2011-06-24T16:27:17.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Sprint 2011-25 |
Components | iOS |
Labels | n/a |
Reporter | Pedro Enrique |
Assignee | Stephen Tramer |
Created | 2011-04-15T03:45:39.000+0000 |
Updated | 2017-03-07T18:07:28.000+0000 |
Description
As described in ticket http://support.appcelerator.com/tickets/YAJ-53154-797">YAJ-53154-797, Ti.Contacts.getAllGroups() does not return all groups. Seems like system-managed groups, like "All Contacts", "Mobile Me", etc... are not returning. But custom contact groups do return.
Test case, create two contact groups on the computer's address book and sync with iPhone, run this code on app.js:
var groups = Titanium.Contacts.getAllGroups();
alert(groups.length);
The alert will alert two instead of three (two custom and one system: All Contacts). And if one of the groups is a Mobile Me contacts groups, for exmple, it will be ignored.
Tested on Ti SDK 1.6.2
iOS 4.3 Device (iPhone 4)
An additional test would be if you have not "created" any groups on your own.
But in Contacts on the device you see 3 groups that are, supposedly, system-managed groups like I do ("All contacts" "MobileMe" "On My Mac") and run that same code block mentioned by Pedro, you will see 0 (zero) groups returned.
Essentially at this point - unless you have created custom groups - this method is non functional.
Also - not sure if this needs to be an additional ticket or not ..
Because of this inability to "getAllGroups" and then get the contacts per system-managed group combined with the inability to identify what group a contact belongs when reviewing contact details from getAllPeople() - you get a list of contacts that is far too large and has multiple of the same contact with no way to determine which is from which group.
When I run getAllPeople() I get a list of nearly 4000 contacts that has many duplicate and triplicates in there because they come from multiple system-managed groups that I cannot detect to filter out.
Can I get an update on the status of the defect here? Unless I can filter or search based on group so I don't get replicated contacts, I cannot continue with the app in Titanium.
This problem prohibits the ability to get a list of contacts without getting replicated contacts in the list - is there a fix planned or a workaround?
Apple bug. We can't work around it; it occurs at the API level. Radar # is 9674125.
Closing ticket due to time passed.