I want to add a first an last name to one index of a mutable array.
I'm loading a first and last name from the AdressBook API and I want the first and last name in an array, so I can display that later to the user.
Currently, I can log the first an last name, but when I try to add these to an array, the array stays null.
This is the code I'm using:
[_names addObject:[NSString stringWithFormat:@"%@ %@", firstName, lastName]];
NSLog(@"%@", _names); //prints 'null'
NSLog(@"Name:%@ %@", firstName, lastName);//prints 'John Appleseed'
Why isn't my array being updated?