<?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: Yet Another Debug Output (NSLog Replacement)</title>
	<atom:link href="http://MobileDeveloperTips.com/debugging/yet-another-debug-output-nslog-replacement.html/feed" rel="self" type="application/rss+xml" />
	<link>http://MobileDeveloperTips.com/debugging/yet-another-debug-output-nslog-replacement.html</link>
	<description>iOS and Objective-C Tips, Tricks and Tutorials.</description>
	<lastBuildDate>Sat, 19 May 2012 05:15:17 -0500</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Critter</title>
		<link>http://MobileDeveloperTips.com/debugging/yet-another-debug-output-nslog-replacement.html#comment-69958</link>
		<dc:creator>Critter</dc:creator>
		<pubDate>Tue, 24 Apr 2012 06:57:12 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=1040#comment-69958</guid>
		<description>Stumbled on this one somewhere...

#define PrintName NSLog(@&quot;?&quot;, __FUNCTION__);</description>
		<content:encoded><![CDATA[<p>Stumbled on this one somewhere&#8230;</p>
<p>#define PrintName NSLog(@&#8221;?&#8221;, __FUNCTION__);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff</title>
		<link>http://MobileDeveloperTips.com/debugging/yet-another-debug-output-nslog-replacement.html#comment-68593</link>
		<dc:creator>Jeff</dc:creator>
		<pubDate>Sun, 18 Mar 2012 15:30:12 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=1040#comment-68593</guid>
		<description>@Tim:  A bridge cast seems to do the trick:

#define debug(format, ...) CFShow((__bridge void *)[NSString stringWithFormat:format, ## __VA_ARGS__]);</description>
		<content:encoded><![CDATA[<p>@Tim:  A bridge cast seems to do the trick:</p>
<p>#define debug(format, &#8230;) CFShow((__bridge void *)[NSString stringWithFormat:format, ## __VA_ARGS__]);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://MobileDeveloperTips.com/debugging/yet-another-debug-output-nslog-replacement.html#comment-66051</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Sat, 21 Jan 2012 21:08:06 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=1040#comment-66051</guid>
		<description>It doesn&#039;t work with ARC, I get the following:

error: Automatic Reference Counting Issue: Implicit conversion of an Objective-C pointer to &#039;CFTypeRef&#039; (aka &#039;const void *&#039;) is disallowed with ARC

Any thoughts?

Regards,
Tim</description>
		<content:encoded><![CDATA[<p>It doesn&#8217;t work with ARC, I get the following:</p>
<p>error: Automatic Reference Counting Issue: Implicit conversion of an Objective-C pointer to &#8216;CFTypeRef&#8217; (aka &#8216;const void *&#8217;) is disallowed with ARC</p>
<p>Any thoughts?</p>
<p>Regards,<br />
Tim</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Dell</title>
		<link>http://MobileDeveloperTips.com/debugging/yet-another-debug-output-nslog-replacement.html#comment-38229</link>
		<dc:creator>John Dell</dc:creator>
		<pubDate>Fri, 21 Jan 2011 21:35:33 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=1040#comment-38229</guid>
		<description>Thanks for the post. 

I added #define NSLog(...) CFShow([NSString stringWithFormat:__VA_ARGS__])
to MyApp_Prefix.pch and it works beautifully.</description>
		<content:encoded><![CDATA[<p>Thanks for the post. </p>
<p>I added #define NSLog(&#8230;) CFShow([NSString stringWithFormat:__VA_ARGS__])<br />
to MyApp_Prefix.pch and it works beautifully.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://MobileDeveloperTips.com/debugging/yet-another-debug-output-nslog-replacement.html#comment-269</link>
		<dc:creator>John</dc:creator>
		<pubDate>Sun, 01 Mar 2009 15:01:32 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=1040#comment-269</guid>
		<description>I agree, printf will work fine as you&#039;ve shown, however, with printf you need to call the appropriate method to convert each object to its string representation or call the description method on the object. NSLog and/or CFShow will handle this process for you.</description>
		<content:encoded><![CDATA[<p>I agree, printf will work fine as you&#8217;ve shown, however, with printf you need to call the appropriate method to convert each object to its string representation or call the description method on the object. NSLog and/or CFShow will handle this process for you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SlaunchaMan</title>
		<link>http://MobileDeveloperTips.com/debugging/yet-another-debug-output-nslog-replacement.html#comment-266</link>
		<dc:creator>SlaunchaMan</dc:creator>
		<pubDate>Sun, 01 Mar 2009 07:08:44 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=1040#comment-266</guid>
		<description>Why not just use printf?  You could do the following:

NSDate *today = [NSDate date];
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
[dateFormat setDateFormat:@&quot;EEEE MMMM d, YYYY&quot;];
NSString *dateString = [dateFormat stringFromDate:today];
[dateFormat release];

...

NSLog(@&quot;Date: %@&quot;, dateString);
printf(&quot;Date: %s&quot;, [dateString cString]);</description>
		<content:encoded><![CDATA[<p>Why not just use printf?  You could do the following:</p>
<p>NSDate *today = [NSDate date];<br />
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];<br />
[dateFormat setDateFormat:@"EEEE MMMM d, YYYY"];<br />
NSString *dateString = [dateFormat stringFromDate:today];<br />
[dateFormat release];</p>
<p>&#8230;</p>
<p>NSLog(@&#8221;Date: %@&#8221;, dateString);<br />
printf(&#8220;Date: %s&#8221;, [dateString cString]);</p>
]]></content:encoded>
	</item>
</channel>
</rss>

