<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: iPhone Programming: Adding a Contact to the iPhone Address Book</title>
	<atom:link href="http://www.modelmetrics.com/tomgersic/iphone-programming-adding-a-contact-to-the-iphone-address-book/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.modelmetrics.com/tomgersic/iphone-programming-adding-a-contact-to-the-iphone-address-book/</link>
	<description>Model Metrics Blog</description>
	<lastBuildDate>Fri, 10 Feb 2012 09:16:59 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Christian</title>
		<link>http://www.modelmetrics.com/tomgersic/iphone-programming-adding-a-contact-to-the-iphone-address-book/comment-page-1/#comment-3435</link>
		<dc:creator>Christian</dc:creator>
		<pubDate>Wed, 04 Jan 2012 01:43:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.modelmetrics.com/?p=1860#comment-3435</guid>
		<description>@Thomas:
Had the same issue, here is the workaround:
&#160;
&lt;span style=&quot;color: #7925ac&quot;&gt;CFTypeRef&lt;/span&gt; ctr = &lt;span style=&quot;color: #430083&quot;&gt;CFBridgingRetain&lt;/span&gt;(addressDictionary);
&lt;span style=&quot;color: #430083&quot;&gt;ABMultiValueAddValueAndLabel&lt;/span&gt;(multiAddress, ctr, &lt;span style=&quot;color: #7925ac&quot;&gt;kABWorkLabel&lt;/span&gt;, &lt;span style=&quot;color: #cd00a3&quot;&gt;NULL&lt;/span&gt;);
CFBridgingRelease&lt;span style=&quot;color: #000000&quot;&gt;(ctr);&lt;/span&gt;</description>
		<content:encoded><![CDATA[<p>@Thomas:<br />
Had the same issue, here is the workaround:<br />
&nbsp;<br />
<span style="color: #7925ac">CFTypeRef</span> ctr = <span style="color: #430083">CFBridgingRetain</span>(addressDictionary);<br />
<span style="color: #430083">ABMultiValueAddValueAndLabel</span>(multiAddress, ctr, <span style="color: #7925ac">kABWorkLabel</span>, <span style="color: #cd00a3">NULL</span>);<br />
CFBridgingRelease<span style="color: #000000">(ctr);</span></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas</title>
		<link>http://www.modelmetrics.com/tomgersic/iphone-programming-adding-a-contact-to-the-iphone-address-book/comment-page-1/#comment-3389</link>
		<dc:creator>Thomas</dc:creator>
		<pubDate>Fri, 30 Dec 2011 01:28:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.modelmetrics.com/?p=1860#comment-3389</guid>
		<description>Help. I am using iOS5 and xCode 4.2 and everything works accept adding the address. I get the following error in the code:
Implicit conversion of an Objective-C pointer to &#039;CFTypeREF&#039; ... not allowed with ARC
Here:
&lt;span&gt;ABMultiValueAddValueAndLabel&lt;/span&gt;(multiAddress, addressDictionary, &lt;span&gt;kABWorkLabel&lt;/span&gt;, &lt;span&gt;NULL&lt;/span&gt;);
&#160;
xCode does not like the addressDictionary there.</description>
		<content:encoded><![CDATA[<p>Help. I am using iOS5 and xCode 4.2 and everything works accept adding the address. I get the following error in the code:<br />
Implicit conversion of an Objective-C pointer to &#39;CFTypeREF&#39; &#8230; not allowed with ARC<br />
Here:<br />
<span>ABMultiValueAddValueAndLabel</span>(multiAddress, addressDictionary, <span>kABWorkLabel</span>, <span>NULL</span>);<br />
&nbsp;<br />
xCode does not like the addressDictionary there.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Philip</title>
		<link>http://www.modelmetrics.com/tomgersic/iphone-programming-adding-a-contact-to-the-iphone-address-book/comment-page-1/#comment-3109</link>
		<dc:creator>Philip</dc:creator>
		<pubDate>Thu, 27 Oct 2011 18:31:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.modelmetrics.com/?p=1860#comment-3109</guid>
		<description>Hello.
I found the answer to my question above. The reason this happened was because i had an external contacts db (exchange server), the contact was added but it wasn&#039;t able to add the custom label. When i changed to have the iPhone as default for contacts it worked.
Maybe this helps someone.
/Philip</description>
		<content:encoded><![CDATA[<p>Hello.<br />
I found the answer to my question above. The reason this happened was because i had an external contacts db (exchange server), the contact was added but it wasn&#39;t able to add the custom label. When i changed to have the iPhone as default for contacts it worked.<br />
Maybe this helps someone.<br />
/Philip</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Philip</title>
		<link>http://www.modelmetrics.com/tomgersic/iphone-programming-adding-a-contact-to-the-iphone-address-book/comment-page-1/#comment-3102</link>
		<dc:creator>Philip</dc:creator>
		<pubDate>Thu, 27 Oct 2011 09:31:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.modelmetrics.com/?p=1860#comment-3102</guid>
		<description>Hello.

	Thank you for a great post. It has helped me alot.
	However, i wonder if you or anyone else can help me. I&#039;m building an app that adds persons to the adressbook. To these persons i want to add a custom label for the phone.
	&#160;I used this code to add the custom label, and in the iphone simulator the phone nr is displayed with the custom label, but in the real phone, the number is added to the home label.
&lt;span&gt;&#160;&#160;&#160;&#160; ABMutableMultiValueRef multiPhone = ABMultiValueCreateMutable(kABMultiStringPropertyType);
	&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160; 
	&#160;&#160; &#160;&#160;&#160; &#160;ABMultiValueAddValueAndLabel(multiPhone, @&quot;1-987-654-3210&quot;, @&quot;Custom label&quot;, NULL);&#160;&#160; &#160;&#160;&#160; &#160;
	&#160;&#160; &#160;&#160;&#160; &#160;ABRecordSetValue(newPerson, kABPersonPhoneProperty, multiPhone,nil);
	&#160;&#160; &#160;&#160;&#160; &#160;CFRelease(multiPhone);&lt;/span&gt;
Any help is greatly appreciated.
/Philip</description>
		<content:encoded><![CDATA[<p>Hello.</p>
<p>	Thank you for a great post. It has helped me alot.<br />
	However, i wonder if you or anyone else can help me. I&#39;m building an app that adds persons to the adressbook. To these persons i want to add a custom label for the phone.<br />
	&nbsp;I used this code to add the custom label, and in the iphone simulator the phone nr is displayed with the custom label, but in the real phone, the number is added to the home label.<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp; ABMutableMultiValueRef multiPhone = ABMultiValueCreateMutable(kABMultiStringPropertyType);<br />
	&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;<br />
	&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;ABMultiValueAddValueAndLabel(multiPhone, @&quot;1-987-654-3210&quot;, @&quot;Custom label&quot;, NULL);&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br />
	&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;ABRecordSetValue(newPerson, kABPersonPhoneProperty, multiPhone,nil);<br />
	&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;CFRelease(multiPhone);</span><br />
Any help is greatly appreciated.<br />
/Philip</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Johny</title>
		<link>http://www.modelmetrics.com/tomgersic/iphone-programming-adding-a-contact-to-the-iphone-address-book/comment-page-1/#comment-2657</link>
		<dc:creator>Johny</dc:creator>
		<pubDate>Thu, 14 Jul 2011 12:07:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.modelmetrics.com/?p=1860#comment-2657</guid>
		<description>Hey,
Can anybody help me with making any particular contact as read-only?
I made an app which added few contacts to iPhone&#039;s address book. And now I want to make the contacts as read-only which I added through my App. 
Is there any way to do so?
Johny</description>
		<content:encoded><![CDATA[<p>Hey,<br />
Can anybody help me with making any particular contact as read-only?<br />
I made an app which added few contacts to iPhone&#39;s address book. And now I want to make the contacts as read-only which I added through my App.<br />
Is there any way to do so?<br />
Johny</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ghlwcmxl</title>
		<link>http://www.modelmetrics.com/tomgersic/iphone-programming-adding-a-contact-to-the-iphone-address-book/comment-page-1/#comment-2593</link>
		<dc:creator>Ghlwcmxl</dc:creator>
		<pubDate>Mon, 04 Jul 2011 15:07:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.modelmetrics.com/?p=1860#comment-2593</guid>
		<description>aztec symbols tattoos,</description>
		<content:encoded><![CDATA[<p>aztec symbols tattoos,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Player Profiles</title>
		<link>http://www.modelmetrics.com/tomgersic/iphone-programming-adding-a-contact-to-the-iphone-address-book/comment-page-1/#comment-1250</link>
		<dc:creator>Player Profiles</dc:creator>
		<pubDate>Sat, 30 Oct 2010 05:38:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.modelmetrics.com/?p=1860#comment-1250</guid>
		<description>Best you could change the page name title iPhone Programming: Adding a Contact to the iPhone Address Book &#124; Model Metrics to something more catching for your webpage you write. I loved the blog post even sononetheless.</description>
		<content:encoded><![CDATA[<p>Best you could change the page name title iPhone Programming: Adding a Contact to the iPhone Address Book | Model Metrics to something more catching for your webpage you write. I loved the blog post even sononetheless.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://www.modelmetrics.com/tomgersic/iphone-programming-adding-a-contact-to-the-iphone-address-book/comment-page-1/#comment-370</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Tue, 11 May 2010 13:52:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.modelmetrics.com/?p=1860#comment-370</guid>
		<description>Thanks a lot for this! This is great stuff!

Have you any idea how to set automatically a photo?

Cheers

Tom</description>
		<content:encoded><![CDATA[<p>Thanks a lot for this! This is great stuff!</p>
<p>Have you any idea how to set automatically a photo?</p>
<p>Cheers</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jimzhao</title>
		<link>http://www.modelmetrics.com/tomgersic/iphone-programming-adding-a-contact-to-the-iphone-address-book/comment-page-1/#comment-219</link>
		<dc:creator>jimzhao</dc:creator>
		<pubDate>Thu, 04 Feb 2010 07:37:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.modelmetrics.com/?p=1860#comment-219</guid>
		<description>hi, Ankit;

add the ABPersonRef to addressbook, then save the addressbook, 
then, your ABRecordID recID=ABRecordGetRecordID(aRecord); will not return -1.

code:
ABAddressBookAddRecord(addressbook, aRef, (CFErrorRef*)&amp;err);
ABAddressBookSave(addressbook,  (CFErrorRef*)&amp;err);</description>
		<content:encoded><![CDATA[<p>hi, Ankit;</p>
<p>add the ABPersonRef to addressbook, then save the addressbook,<br />
then, your ABRecordID recID=ABRecordGetRecordID(aRecord); will not return -1.</p>
<p>code:<br />
ABAddressBookAddRecord(addressbook, aRef, (CFErrorRef*)&amp;err);<br />
ABAddressBookSave(addressbook,  (CFErrorRef*)&amp;err);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://www.modelmetrics.com/tomgersic/iphone-programming-adding-a-contact-to-the-iphone-address-book/comment-page-1/#comment-146</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Wed, 18 Nov 2009 14:27:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.modelmetrics.com/?p=1860#comment-146</guid>
		<description>Yes, Search2GO allows you to search Contacts, Accounts, Leads, and Opportunities in your company&#039;s Salesforce environment.</description>
		<content:encoded><![CDATA[<p>Yes, Search2GO allows you to search Contacts, Accounts, Leads, and Opportunities in your company&#8217;s Salesforce environment.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

