[AC-6451] Ti.Contacts.getAllPeople() returns undefined
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2019-12-27T12:41:50.000+0000 |
Affected Version/s | Appcelerator Studio 4.5.0 |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | iphone |
Reporter | Emmanuel Francis |
Assignee | Shak Hossain |
Created | 2019-12-01T11:00:38.000+0000 |
Updated | 2019-12-27T12:41:50.000+0000 |
Description
Below is the sample code:
function accessContacts() {
if (!Ti.Contacts.hasContactsPermissions()) {
Ti.Contacts.requestContactsPermissions(function(e) {
if (e.success) {
processContacts();
} else {
return;
}
});
}else{
processContacts();
}
}
function processContacts(){
try{
var contacts;
contacts = Ti.Contacts.getAllPeople();
Ti.API.info("contacts "+ JSON.stringify(contacts));
}catch(ex){
}finally{
}
}
Please close the ticket. For iOS 13, needs to set Ti.Contacts.includeNote = false; or set key 'com.apple.developer.contacts.notes' to 'true' in entitelements section of tiapp.xml. https://docs.appcelerator.com/platform/latest/#!/api/Titanium.Contacts-property-includeNote