Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.
Replies
You create an array (CFArrayRef) of people with the call to ABAddressBookCopyPeopleWithName.
In the next call, you call ABRecordCopyValue. According to the docs, that call wants an ABRecordRef as its first parameter.
You are passing it an array instead of an ABRecordRef. That is why you are crashing.
I've never used the address book before, but I found the problem in about 30 seconds. The Xcode documentation is your friend. Use it.
Duncan C
WareTo
Animated GIF created with Face Dancer, available for free in the app store.
- Spam
- Abuse
- Troll
0 · Off Topic Insightful Disagree Dislike Like Awesome-(void)textMessage{NSMutableArray *phoneNumbers = [[[NSMutableArray alloc]init]autorelease];
ABAddressBookRef addressBook = ABAddressBookCreate();
for(NSString *name in savedPeople){
CFArrayRef people = ABAddressBookCopyPeopleWithName(addressBook, (CFStringRef)name);
ABMultiValueRef multiPhones = ABRecordCopyValue((ABRecordRef)people, kABPersonPhoneProperty);
}
CFRelease(addressBook);
}
i had the typecast up before too, but i am still getting breakpoints
- Spam
- Abuse
- Troll
0 · Off Topic Insightful Disagree Dislike Like AwesomeDuncan C
WareTo
Animated GIF created with Face Dancer, available for free in the app store.
- Spam
- Abuse
- Troll
0 · Off Topic Insightful Disagree Dislike Like Awesome