I
I
iStyx2010-11-24 11:21:02
Objective-C
iStyx, 2010-11-24 11:21:02

ABAddressBookAddRecord returns NO and does not fill error?

Faced with a mystical error.
There is code that creates a new group in the address book:

CFErrorRef error = NULL;
ABRecordRef group = ABGroupCreate();
if (!ABRecordSetValue(group, kABGroupNameProperty, name, &error))
    return nil;
if (!ABAddressBookAddRecord(_book, group, &error))
    return nil;
...

This code works correctly on iOS 4.1/4.2, in the 4.0.2/4.1/4.2 simulator, and, until recently, worked correctly on iOS 4.0.1. But, after a minor change in the program interface , the code stopped working. The function ABAddressBookAddRecordreturns NOand does not fill the variable error(after calling the function, it remains NULL).
In my gut I feel that the problem is in the customer's phone, with its 4.0.1 (there is no jailbreak), but it worked before.
I tried to roll back all the changes made in the interface - the same problem (it could not have been otherwise).
Googled/stackoverflowed - no result.
It remains only to write to Developer Technical Support, but first I would like to ask the habra community, suddenly someone came across a similar one.
Any ideas would be welcome, because I don't have any left.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question