Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3545] iOS: Contacts: custom phone labels

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionWon't Do
Resolution Date2020-01-09T18:56:34.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterDemy Brenzel
AssigneeIngo Muschenetz
Created2011-04-15T03:46:30.000+0000
Updated2020-01-09T18:56:34.000+0000

Description

It is not possible to create (or edit) a contact with an own, custom label.

var newContact = Titanium.Contacts.createPerson();
newContact.firstName = 'Bill';
newContact.lastName = 'Bluescreen';
newContact.phone = {'customlabel':['01601234567']};
Titanium.Contacts.save();

Instead of "customlabel" the number is saved in the phonebook as 'phone', which means there is no label set.

When using the picker (Ti.Contacts.showContacts) to select this phone, the app crashes. Note that not only Titanium creates contacts without labels.

Titanium Developer: 1.2.2 mobilesdk: 1.6.1, 1.7.0(Apr 7 2011 12:07 r9b1fb306) iOS 4.3

Comments

  1. Rey Bumalay 2015-02-13

    We needed the same functionality and the quick and dirty way to do this is to modify TiContactsPerson.m file. For example: https://github.com/reyjexter/ti_sdk_mods/blob/master/custom%20contact%20labels/TiContactsPerson.m#L153 You need to clean the build dir before building on Ti Studio for this to work. I hope somebody can come up with a much more dynamic way to do this without changing ti sdk.
  2. Hans Knöchel 2015-10-06

    We updated the Ti.Contacts API in our 5.0.0.GA release. Can you verify, the issue still exists? The [docs](http://docs.appcelerator.com/platform/latest/#!/api/Titanium.Contacts.Person-property-phone) says, that accepted values by iOS are "home, work, other, mobile, pager, workFax, homeFax, main, and/or iPhone.".
  3. Alan Hutton 2020-01-09

    It has been decided that this issue should be closed as “Won’t do.” This issue is out of date with our current supported SDK release (7.5.2.GA as of the date of closure), and out of date with mobile OS versions. Updating, or creating code may not reproduce the issue reported, or be a valid test case. If community members feel that the issue is still valid, please create a new ticket. Please reference this closed ticket number, include SDK used, comments, and code that demonstrates/reproduces the issue.

JSON Source