Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13319] iOS: Titanium.Contacts.Person kind property is always null

GitHub Issuen/a
TypeBug
PriorityLow
StatusReopened
ResolutionUnresolved
Affected Version/sRelease 3.0.2
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterGrant Rimland
AssigneeUnknown
Created2012-09-10T05:27:10.000+0000
Updated2018-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

FileDateSize
app.js2013-04-02T12:19:36.000+0000239

Comments

  1. Mauro Parra-Miranda 2012-09-18

    Hello, do you have any contact in the Contacts app with kind defined? Best, Mauro
  2. Grant Rimland 2012-09-21

    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
  3. Daniel Sefton 2013-04-01

    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!
  4. Grant Rimland 2013-04-02

    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') } })();
  5. Mauro Parra-Miranda 2013-04-02

    Hello, silly question: do you have any contact in your iOS simulator? Best, Mauro
  6. Daniel Sefton 2013-04-02

    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.

JSON Source