を理解されるであろう。 CONTACTS_KIND_ORGANIZATIONとCONTACTS_KIND_PERSONもあります。
var g = Ti.Contacts.getAllGroups();//Getting all the groups on the contacts table
var m = g[0].members();//select a group and check if it has members
Ti.API.info(m)// my group was empty so i have to add people
var p = Ti.Contacts.getAllPeople()// get all the contacts
for (var i in p){//group and add people to your group
g[0].add(p[i]);
Ti.API.info(p[i].firstName);
Titanium.Contacts.save()// you have to save new changes in IOS
}
g[0].sortedMembers(Ti.Contacts.CONTACTS_SORT_FIRST_NAME);// FINALLY WE CAN SORT
m = g[0].members();// get the members
for (var i in m){// verify they are in order
Ti.API.info(m[i].firstName);
}