Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3473] iOS Contacts.getAllGroups not returning all groups

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionHold
Resolution Date2011-06-24T16:27:17.000+0000
Affected Version/sn/a
Fix Version/sSprint 2011-25
ComponentsiOS
Labelsn/a
ReporterPedro Enrique
AssigneeStephen Tramer
Created2011-04-15T03:45:39.000+0000
Updated2017-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)

Comments

  1. johnvpataki 2011-04-15

    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.

  2. johnvpataki 2011-04-15

    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.

  3. John V Pataki 2011-04-19

    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.
  4. John V Pataki 2011-05-03

    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?
  5. Stephen Tramer 2011-06-24

    Apple bug. We can't work around it; it occurs at the API level. Radar # is 9674125.
  6. Lee Morris 2017-03-07

    Closing ticket due to time passed.

JSON Source