heardrwt / RHAddressBook

A Cocoa / Objective-C library for interfacing with the iOS AddressBook.
Other
696 stars 154 forks source link

RHPerson not being saved #40

Closed johnryan closed 10 years ago

johnryan commented 10 years ago

In some cases I find that contacts are not being saved when using code like this:

RHPerson *person = [self getPersonWithNumber:number];
RHMutableMultiStringValue* mutablePhoneMultiValue = [[RHMutableMultiStringValue alloc] initWithType:kABMultiStringPropertyType];

[mutablePhoneMultiValue addValue:number withLabel:details];
person.phoneNumbers = mutablePhoneMultiValue;
person.firstName = @"John Smith";
[person save];

The code is hit but it is not reflected in the address book. Any suggestions? Could it be a threading issue?

heardrwt commented 10 years ago

This is really going to depend on what your getPersonWithNumber: method looks like.

johnryan commented 10 years ago

Yea I saw this only a few times in the simulator but am not able to reproduce now. I'll close this, thanks!