Open mkaya93 opened 8 years ago
Hi,
The second part of the code looks very strange. You check is firstName/lastName nil, then assign empty string to them (so they not nil anymore!), and then check is firstName/lastName nil again. So, the following code will never executed:
if firstName == nil && lastName == nil {
if person.phones![0].number != nil {
firstName = person.phones![0].number
lastName = ""
} else {
firstName = ""
lastName = ""
}
}
Try Example.app
in this repo. If everything work fine I believe the problem is in your code. And if not I would ask you to help me to find the bug. But try Example.app
first.
Hi
My problem is I can't get first and last name some of users with apaddressbook. also I'm looking my contacts that rows have lastname and firstname