Amazines Free Article Archive
www.amazines.com - Thursday, December 26, 2024
Read about the most recent changes and happenings at Amazines.com
Log into your account or register as a new author. Start submitting your articles right now!
Search our database for articles.
Subscribe to receive articles emailed straight to your email account. You may choose multiple categories.
View our newest articles submitted by our authors.
View our most top rated articles rated by our visitors.
* Please note that this is NOT the ARTICLE manager
Add a new EZINE, or manage your EZINE submission.
Add fresh, free web content to your site such as newest articles, web tools, and quotes with a single piece of code!
Home What's New? Submit/Manage Articles Latest Posts Top Rated Article Search
Google
Subscriptions Manage Ezines
CATEGORIES
 Article Archive
 Advertising (133574)
 Advice (161671)
 Affiliate Programs (34799)
 Art and Culture (73858)
 Automotive (145718)
 Blogs (75618)
 Boating (9851)
 Books (17224)
 Buddhism (4130)
 Business (1330886)
 Business News (426454)
 Business Opportunities (366525)
 Camping (10973)
 Career (72795)
 Christianity (15852)
 Collecting (11638)
 Communication (115089)
 Computers (241958)
 Construction (38967)
 Consumer (49954)
 Cooking (17080)
 Copywriting (6733)
 Crafts (18203)
 Cuisine (7549)
 Current Affairs (20322)
 Dating (45910)
 EBooks (19703)
 E-Commerce (48272)
 Education (185530)
 Electronics (83525)
 Email (6438)
 Entertainment (159862)
 Environment (28995)
 Ezine (3040)
 Ezine Publishing (5454)
 Ezine Sites (1551)
 Family & Parenting (111009)
 Fashion & Cosmetics (196613)
 Female Entrepreneurs (11853)
 Feng Shui (134)
 Finance & Investment (310624)
 Fitness (106492)
 Food & Beverages (63057)
 Free Web Resources (7941)
 Gambling (30227)
 Gardening (25202)
 Government (10519)
 Health (630170)
 Hinduism (2206)
 Hobbies (44083)
 Home Business (91744)
 Home Improvement (251240)
 Home Repair (46252)
 Humor (4727)
 Import - Export (5461)
 Insurance (45104)
 Interior Design (29619)
 International Property (3488)
 Internet (191027)
 Internet Marketing (146690)
 Investment (22862)
 Islam (1161)
 Judaism (1352)
 Law (80500)
 Link Popularity (4596)
 Manufacturing (20928)
 Marketing (99325)
 MLM (14140)
 Motivation (18236)
 Music (27000)
 New to the Internet (9498)
 Non-Profit Organizations (4048)
 Online Shopping (129741)
 Organizing (7813)
 Party Ideas (11855)
 Pets (38165)
 Poetry (2229)
 Press Release (12691)
 Public Speaking (5643)
 Publishing (7566)
 Quotes (2407)
 Real Estate (126830)
 Recreation & Leisure (95495)
 Relationships (87677)
 Research (16182)
 Sales (80357)
 Science & Technology (110298)
 Search Engines (23521)
 Self Improvement (153317)
 Seniors (6222)
 Sexuality (36012)
 Small Business (49339)
 Software (83053)
 Spiritual (23535)
 Sports (116155)
 Tax (7664)
 Telecommuting (34070)
 Travel & Tourism (308287)
 UK Property Investment (3123)
 Video Games (13382)
 Web Traffic (11794)
 Website Design (56938)
 Website Promotion (36665)
 World News (1000+)
 Writing (35846)
Author Spotlight
SUNNY NASH

Sunny Nash is the award-winning American author of Bigmama Didn’t Shop At Woolworth’s, recognized by...more
A TEKGENRE

A.J.Pipkin is a UK based home appliance and gadget fan and reviewer of quality headphones, specialis...more
VINCENT BOSSLEY

Vincent Bossley is a publisher and sailor living on the Northern Beaches of Sydney Australia. He has...more
SHOEB SIDDIQUE

From the time of study, i had a keen interest in acquiring knowledge by surfing on the Internet. Mea...more
RODRIGO DARZI

Pai da Júlia e do Pedro. Especialista em Marketing Digital, com MBA em e-Business pela FGV. Formado ...more


Coping with duplicate contacts on account of linked cards in iOS Address Book API by Todd Melancon





Article Author Biography
Coping with duplicate contacts on account of linked cards in iOS Address Book API by
Article Posted: 08/23/2013
Article Views: 95
Articles Written: 406
Word Count: 906
Article Votes: 0
AddThis Social Bookmark Button

Coping with duplicate contacts on account of linked cards in iOS Address Book API


 
Fashion & Cosmetics
Some beta-users of my upcoming app are reporting that the list of contacts contain a whole lot of duplicate records. I am making use of the outcome from ABAddressBookCopyArrayOfAllPeople as the data source for my customized table view of contacts, and it baffles me that the results are different from the iPhone's 'Contacts' app.
When seeking a lot more closely in the Contacts app, it seems that the duplicates originate from entries with "Linked Cards". The screenshots under have been obfuscated a bit, but as you see in my app on the far right, "Celine" shows up twice, though inside the Contacts app on the left there's only one particular "Celine". For those who click the row of that single get in touch with, you get a "Unified Info" card with two "Linked Cards" (as shown inside the center, I did not use Celine's contact particulars simply because they did not match on one particular screenshot):
The problems about "Linked Cards" have rather a on Apple's forums for finish customers, but aside from the truth that quite a few point to a 404 assistance web page, I can not realistically go about fixing all of my app's users' address books. I'd considerably rather like to deal with it elegantly and devoid of bothering the user. To create matters worse, it seems I am not the only a single with this issue, because WhatsApp is displaying precisely the same list containing duplicate contacts.
Just to be clear regarding the origins from the duplicate contacts, I am not storing, caching or otherwise attempting to be sensible regarding the array ABAddressBookCopyArrayOfAllPeople returns. So the duplicate records come directly from the API call.
Does anybody understand how to deal with or detect these linked cards, preventing duplicate records from showing up? Apple's Contacts app does it, how can the rest of us do so too?
UPDATE: I wrote a library and place it on Cocoapods to resolve the issue at hand. See my answer below
ABAddressBookRef addressBook = ABAddressBookCreate();
NSArray *people = (__bridge NSArray *)ABAddressBookCopyArrayOfAllPeopleInSource(addressBook, ABAddressBookCopyDefaultSource(addressBook));
But that is certainly lame, correct? It targets the on-device address book, but not additional contacts that could possibly be in Exchange or other fancy syncing address books.
So here's the remedy you are seeking for:
Iterate by way of the ABRecord references
Grab every respective "linked references" (using ABPersonCopyArrayOfAllLinkedPeople)
Bundle them in an NSSet (to ensure that the grouping may be uniquely identified)
Add that NSSet to a further NSSet
Profit?
You now have an NSSet containing NSSets of linked ABRecord objects. Possessing a great search around the contacts is important to my and a lot of apps, so I spent rather a bit of time having this appropriate, although on the side also addressing the issue of iOS five and 6 compatible address book access (handling user access via blocks). It solves each the a lot of linked cards on account of incorrectly synched sources along with the cards from the newly added Facebook integration.
The library I wrote uses an in-memory (optionally on-disk) Core Data shop to cache the address book record ID's, providing a simple background-threaded search algorithm that returns unified address book cards.
The source is obtainable on the Twelve Twenty Toolkit github repository, but additional quickly added for your project by means of cocoapods:
platform :ios, '5.0'
pod 'TwelveTwentyToolkit/UnifiedAddressBook'
I've been applying ABPersonCopyArrayOfAllLinkedPeople() in my app for some time now. However, I've just found that it doesn't constantly do the proper issue. By way of example, when you've got two contacts that have the same name but a single has the "isPerson" flag set and the other will not, the above function will not think about them "linked". Why is this an issue? Simply because Gmail(exchange) sources never assistance this boolean flag. When you attempt to save it as false, it's going to fail, and also the make contact with you saved in it's going to come back around the next run of your app as unlinked in the contact you saved in iCload (CardDAV).
Related circumstance with social services: Gmail doesn't support them plus the function above will see two contacts with the same names as various if a single includes a facebook account and 1 will not.
I'm switching more than to my personal name-and-source-recordID-only algorithm for determining no matter whether two contact records really should be displayed as a single get in touch with. More function but there's a silver lining: ABPersonCopyArrayOfAllLinkedPeople() is butt-slow.
Welcome to Stack Overflow. You will find two prior answers, 1 that was already up-voted quite a whole lot, and one more from the original poster identifying what they actually did to resolve the problem. I not certain if what you proposing is significantly diverse from what he placed for other folks to utilize inside a Github download, but I not sure that your answer is truly helping considering the fact that it's not clear that other people can get at your resolution code. I won down-vote you for this, but please do take into consideration no matter if an answer you give is offering new facts when it can be an older question like this. Jonathan Leffler Oct 7 '12 at 4:35If you like celine please Visit our celine wallet! Happy shopping!


Related Articles - Bags, Online, Shop,

Email this Article to a Friend!

Receive Articles like this one direct to your email box!
Subscribe for free today!

 Rate This Article  
Completely useless, should be removed from directory.
Minimal useful information.
Decent and informative.
Great article, very informative and helpful.
A 'Must Read'.

 

Do you Agree or Disagree? Have a Comment? POST IT!

 Reader Opinions 
Submit your comments and they will be posted here.
Make this comment or to the Author only:
Name:
Email:
*Your email will NOT be posted. This is for administrative purposes only.
Comments: *Your Comments WILL be posted to the AUTHOR ONLY if you select PRIVATE and to this PUBLIC PAGE if you select PUBLIC, so write accordingly.
 
Please enter the code in the image:



 Author Login 
LOGIN
Register for Author Account

 

Advertiser Login

 

ADVERTISE HERE NOW!
   Limited Time $60 Offer!
   90  Days-1.5 Million Views  

 

Great Paranormal Romance


TIM FAY

After 60-plus years of living, I am just trying to pass down some of the information that I have lea...more
LAURA JEEVES

At LeadGenerators, we specialise in content-led Online Marketing Strategies for our clients in the t...more
ADRIAN JOELE

I have been involved in nutrition and weight management for over 12 years and I like to share my kn...more
STEVERT MCKENZIE

Stevert Mckenzie, Travel Enthusiast. ...more
GENE MYERS

Author of four books and two screenplays; frequent magazine contributor. I have four other books "in...more
DONNIE LEWIS

I'm an avid consumer of a smoothie a day living, herbs, vitamins and daily dose of exercise. I'm 60...more
ALEX BELSEY

I am the editor of QUAY Magazine, a B2B publication based in the South West of the UK. I am also the...more
SUSAN FRIESEN

Located in the lower mainland of B.C., Susan Friesen is a visionary brand strategist, entrepreneur, ...more
STEPHEN BYE

Steve Bye is currently a fiction writer, who published his first novel, ‘Looking Forward Through the...more
STEVE BURGESS

Steve Burgess is a freelance technology writer, a practicing computer forensics specialist as the pr...more

HomeLinksAbout UsContact UsTerms of UsePrivacy PolicyFAQResources
Copyright © 2024, All rights reserved.
Some pages may contain portions of text relating to certain topics obtained from wikipedia.org under the GNU FDL license