[TIMOB-13319] iOS: Titanium.Contacts.Person kind property is always null
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Reopened |
Resolution | Unresolved |
Affected Version/s | Release 3.0.2 |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | Grant Rimland |
Assignee | Unknown |
Created | 2012-09-10T05:27:10.000+0000 |
Updated | 2018-02-28T20:04:10.000+0000 |
Description
*Problem description*
Running the code below on iOS Simulator always returns null in the 'kind' property.
*Test case*
(function() {
var peopleArray = Ti.Contacts.getAllPeople();
for (var i = 0; i < peopleArray.length; i++) {
var kind = peopleArray[i].kind;
if (kind == null)
Ti.API.info(peopleArray[i].fullName + ' - kind is null')
}
})();
*Logs*
[INFO] : Kate Bell - kind is null
[INFO] : Daniel Higgins Jr. - kind is null
[INFO] : John Appleseed - kind is null
[INFO] : Anna Haro - kind is null
[INFO] : Hank M. Zakroff - kind is null
[INFO] : David Taylor - kind is null
Attachments
File | Date | Size |
---|---|---|
app.js | 2013-04-02T12:19:36.000+0000 | 239 |
Hello, do you have any contact in the Contacts app with kind defined? Best, Mauro
I added a company contact to the contacts and a person contact as well. In the contacts the company contact displays the company name and the default company image when you view the details of the contact, and the person displays the persons name and the default person image in the contacts details. But when loading the contact information in Titanium the kind property is null for both. Grant
Hi Grant, Before we can escalate this, we need the following info: - Whether this still occurs with 3.0.2 GA - A complete simple runnable app.js test case. We appreciate your time in helping to improve the platform. Thanks!
Yes it still occurs in 3.0.2 GA I used the following code in the app.js file to test. I have attached this file. All contacts set up in the simulator for both persons and organisations returned null in the kind field. (function() { var peopleArray = Ti.Contacts.getAllPeople(); for(var i = 0; i < peopleArray.length; i++) { var kind = peopleArray[i].kind; if (kind == null) Ti.API.info(peopleArray[i].fullName + ' - kind is null') } })();
Hello, silly question: do you have any contact in your iOS simulator? Best, Mauro
Tested and confirmed in iOS 6 simulator with Ti SDK 3.0.2 GA (Mauro: The simulator has a set of default contacts). Updated description with logs.