[TIMOB-3545] iOS: Contacts: custom phone labels
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Won't Do |
Resolution Date | 2020-01-09T18:56:34.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | Demy Brenzel |
Assignee | Ingo Muschenetz |
Created | 2011-04-15T03:46:30.000+0000 |
Updated | 2020-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
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.
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.".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.