crash looking up emails

35 views
Skip to first unread message

Brad Midgley

unread,
Nov 12, 2009, 5:37:08 PM11/12/09
to rhom...@googlegroups.com
Hey

I wrote up a bug report that got tracked and closed without a real
fix. (The fix was unrelated, making non-business emails available in
the rhocontact)

The issue is that label will return nil if you are on a device that is
being synchronized through exchange. Here's a quick fix.

--- a/platform/iphone/Classes/Phonebook/phonebook.m
+++ b/platform/iphone/Classes/Phonebook/phonebook.m
@@ -123,7 +123,7 @@ static void _addEmailToHash(VALUE hash,ABRecordRef ref) {
int num_phones = ABMultiValueGetCount(emails);
for (int n = 0; n < num_phones; n++) {
CFStringRef label =
ABMultiValueCopyLabelAtIndex(emails,n);
-
if(CFStringCompare(label,kABWorkLabel,0)==kCFCompareEqualTo) {
+ if(label == nil ||
CFStringCompare(label,kABWorkLabel,0)==kCFCompareEqualTo) {
_addPropertyToHash(hash,RUBY_PB_EMAIL_ADDRESS,

ABMultiValueCopyValueAtIndex(emails,n));
} else
if(CFStringCompare(label,kABHomeLabel,0)==kCFCompareEqualTo) {


--
Brad Midgley

Vladimir Tarasov

unread,
Nov 12, 2009, 6:31:44 PM11/12/09
to rhom...@googlegroups.com
Thank you Brad. We will put in fix for this issue,
-vt

evgeny vovchenko

unread,
Nov 13, 2009, 5:40:03 AM11/13/09
to rhom...@googlegroups.com
FIXED


From: rhom...@googlegroups.com [mailto:rhom...@googlegroups.com] On Behalf Of Vladimir Tarasov
Sent: Friday, November 13, 2009 2:32 AM
To: rhom...@googlegroups.com
Subject: [rhomobile] Re: crash looking up emails

Reply all
Reply to author
Forward
0 new messages