Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-20118] iOS (5_1_2): Contacts property fullName does not return… #7560

Merged
merged 1 commit into from
Dec 8, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions apidoc/Titanium/Contacts/Person.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ properties:

- name: fullName
summary: Localized full name of the person. Single value. Read-only on Android.
description: |
The full name will be printed in the order of.
Full name, middle name, family name, suffix.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be "First name" instead of "Full name"?

type: String
permission: read-only

Expand Down
13 changes: 7 additions & 6 deletions iphone/Classes/TiContactsPerson.m
Original file line number Diff line number Diff line change
Expand Up @@ -477,18 +477,19 @@ -(NSString*)fullName
if ([person.namePrefix length]) {
[compositeName appendFormat:@"%@ ", person.namePrefix];
}
if ([person.nameSuffix length]) {
[compositeName appendFormat:@"%@ ", person.nameSuffix];
}
if ([person.organizationName length]) {
[compositeName appendFormat:@"%@ ", person.organizationName];
}
if ([person.givenName length]) {
[compositeName appendFormat:@"%@ ", person.givenName];
}
if ([person.middleName length]) {
[compositeName appendFormat:@"%@ ", person.middleName];
}
if ([person.familyName length]) {
[compositeName appendFormat:@"%@ ", person.familyName];
}
if ([person.nameSuffix length]) {
[compositeName appendFormat:@"%@ ", person.nameSuffix];
}

if ([compositeName length]) {
//remove last space
NSRange range;
Expand Down