<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Huy Zing &#187; Dev</title>
	<atom:link href="http://huyzing.com/category/dev/feed/" rel="self" type="application/rss+xml" />
	<link>http://huyzing.com</link>
	<description></description>
	<lastBuildDate>Fri, 04 Dec 2009 06:23:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>iPhone SDK time bug for international users</title>
		<link>http://huyzing.com/2009/09/26/iphone-sdk-time-bug-for-international-users/</link>
		<comments>http://huyzing.com/2009/09/26/iphone-sdk-time-bug-for-international-users/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 07:00:39 +0000</pubDate>
		<dc:creator>huy</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[from-MultiNC]]></category>

		<guid isPermaLink="false">http://multinc.com/?p=183</guid>
		<description><![CDATA[If your application is acting strange when your users are switching between 12-hour and 24-hour mode in their iPhone settings, you may be experiencing the same thing we are: an NSDateFormatter bug in the iPhone SDK 3.1 (or earlier).
MultiNC develops iPhone applications for a number of global markets, and sometimes we run into bugs unique [...]]]></description>
			<content:encoded><![CDATA[<p>If your application is acting strange when your users are switching between 12-hour and 24-hour mode in their iPhone settings, you may be experiencing the same thing we are: an NSDateFormatter bug in the iPhone SDK 3.1 (or earlier).</p>
<p>MultiNC develops iPhone applications for a number of global markets, and sometimes we run into bugs unique to globalized applications.  One application that we&#8217;re developing has France as primary market.  U.S. users very rarely change their settings from the usual 12-hour mode (AM/PM mode) to 24-hour mode.  However, in France it&#8217;s not rare for users to switch from the more common 24-hour mode to 12-hour mode.  And that&#8217;s when things start acting strange, even causing your application to crash.</p>
<p>Because of users&#8217; regional habits, developers of globalized applications are more likely to encounter this time bug than for US applications.</p>
<h2>Region format &amp; 24-hour mode setting</h2>
<p>First, a little background on the iPhone user interface.  When iPhone users change their region format between, say, &#8220;United States&#8221; and &#8220;France&#8221;, the users&#8217; &#8220;24-Hour Time&#8221; setting is automatically switched to the mode that is most prevalent in that region.  In France, that would set 24-Hour Time to &#8220;ON&#8221;, and in the U.S., that would set it to &#8220;OFF&#8221;.  The users can then manually override that setting and that&#8217;s where trouble starts.</p>
<h2>NSDateFormatter bug</h2>
<p>The pattern of this SDK bug was relatively tricky to determine because of the specific combination and sequence of user settings that would trigger it, but now it&#8217;s actually quite simple to explain.</p>
<p>The problem comes from NSDateFormatter somehow &#8220;getting stuck&#8221; in the 12 or 24-hour time mode that the user has manually selected.  So if a French user manually selects 12-hour mode,  and the application requested NSDateFormatter to output time with the 24-hour format &#8220;HHmm&#8221;, it would actually receive time in a 12-hour format, e.g. &#8220;01:00 PM&#8221;, as if the application had instead requested &#8220;hhmm aa&#8221;.  The reverse would happen if a US user manually selected 24-hour mode: outputting time with the 12-hour  format &#8220;hhmm aa&#8221; would actually get you time in the 24-hour format instead, e.g. &#8220;17:00&#8243;.</p>
<p>This bug turns especially nasty when your application is trying to parse time from a string, rather than outputing.  Similar to the above, the NSDateFormatter seems to be stuck in the time mode that the user has manually chosen and insists on reading time that way, regardless of the string format.  What you can end up with is an incomplete or invalid NSDate, which when later used can cause other parts of the application to crash, as the UIDatePicker did for us.</p>
<p>We are developing with the iPhone SDK version 3.1 beta, but we wouldn&#8217;t be surprised if it applied to all previous SDKs.</p>
<h2>Workaround</h2>
<p>Now that you know the source of the bug, a workaround is straightforward.  But to save you time until Apple fixes it, with our client <a href="http://www.fabernovel.com/">faberNovel</a>&#8217;s gracious permission, here&#8217;s our workaround when dealing in 24-hour time (dealing in 12-hour time would be very similar):</p>
<div class="wp_syntax">
<div class="code">
<pre class="objc" style="font-family:monospace;"><span style="color: #11740a; font-style: italic;">// Returns time string in 24-hour mode from the given NSDate</span>
<span style="color: #002200;">+</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>time24FromDate<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSDate</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>date withTimeZone<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSTimeZone</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>timeZone
<span style="color: #002200;">&#123;</span>
	<span style="color: #400080;">NSDateFormatter</span> <span style="color: #002200;">*</span>dateFormatter<span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSDateFormatter</span> alloc<span style="color: #002200;">&#93;</span> init<span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#91;</span>dateFormatter setDateFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;HH:mm&quot;</span><span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#91;</span>dateFormatter setTimeZone<span style="color: #002200;">:</span>timeZone<span style="color: #002200;">&#93;</span>;
	<span style="color: #400080;">NSString</span><span style="color: #002200;">*</span> <span style="color: #a61390;">time</span> <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>dateFormatter stringFromDate<span style="color: #002200;">:</span>date<span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#91;</span>dateFormatter release<span style="color: #002200;">&#93;</span>;
&nbsp;
	<span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">time</span>.length &gt; <span style="color: #2400d9;">5</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span>
		<span style="color: #a61390;">NSRange</span> range;
		range.location <span style="color: #002200;">=</span> <span style="color: #2400d9;">3</span>;
		range.length <span style="color: #002200;">=</span> <span style="color: #2400d9;">2</span>;
		<span style="color: #a61390;">int</span> hour <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #a61390;">time</span> substringToIndex<span style="color: #002200;">:</span><span style="color: #2400d9;">2</span><span style="color: #002200;">&#93;</span> intValue<span style="color: #002200;">&#93;</span>;
		<span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>minute <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #a61390;">time</span> substringWithRange<span style="color: #002200;">:</span>range<span style="color: #002200;">&#93;</span>;
		range <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #a61390;">time</span> rangeOfString<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;AM&quot;</span><span style="color: #002200;">&#93;</span>;
		<span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span>range.length<span style="color: #002200;">==</span><span style="color: #2400d9;">0</span><span style="color: #002200;">&#41;</span>
			hour <span style="color: #002200;">+=</span> <span style="color: #2400d9;">12</span>;
		<span style="color: #a61390;">time</span> <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSString</span> stringWithFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;%02d:%@&quot;</span>, hour, minute<span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#125;</span>
&nbsp;
	<span style="color: #a61390;">return</span> <span style="color: #a61390;">time</span>;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #11740a; font-style: italic;">// Returns a proper NSDate given a time string in 24-hour mode</span>
<span style="color: #002200;">+</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSDate</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>dateFromTime24<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>time24String withTimeZone<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSTimeZone</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>timeZone
<span style="color: #002200;">&#123;</span>
	<span style="color: #a61390;">int</span> hour <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>time24String substringToIndex<span style="color: #002200;">:</span><span style="color: #2400d9;">2</span><span style="color: #002200;">&#93;</span> intValue<span style="color: #002200;">&#93;</span>;
	<span style="color: #a61390;">int</span> minute <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>time24String substringFromIndex<span style="color: #002200;">:</span><span style="color: #2400d9;">3</span><span style="color: #002200;">&#93;</span> intValue<span style="color: #002200;">&#93;</span>;
	<span style="color: #400080;">NSDateFormatter</span> <span style="color: #002200;">*</span>dateFormatter<span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSDateFormatter</span> alloc<span style="color: #002200;">&#93;</span> init<span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#91;</span>dateFormatter setTimeZone<span style="color: #002200;">:</span>timeZone<span style="color: #002200;">&#93;</span>;
&nbsp;
	<span style="color: #400080;">NSDate</span> <span style="color: #002200;">*</span>result;
	<span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span><span style="color: #002200;">&#91;</span>Util userSetTwelveHourMode<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span>
		<span style="color: #002200;">&#91;</span>dateFormatter setDateFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;hh:mm aa&quot;</span><span style="color: #002200;">&#93;</span>;
		<span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span>hour &gt; <span style="color: #2400d9;">12</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span>
			result <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>dateFormatter dateFromString<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSString</span> stringWithFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;%02d:%02d PM&quot;</span>, hour <span style="color: #002200;">-</span> <span style="color: #2400d9;">12</span>, minute<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;
		<span style="color: #002200;">&#125;</span> <span style="color: #a61390;">else</span> <span style="color: #002200;">&#123;</span>
			result <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>dateFormatter dateFromString<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSString</span> stringWithFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;%02d:%02d AM&quot;</span>, hour, minute<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;
		<span style="color: #002200;">&#125;</span>
	<span style="color: #002200;">&#125;</span> <span style="color: #a61390;">else</span> <span style="color: #002200;">&#123;</span>
		<span style="color: #002200;">&#91;</span>dateFormatter setDateFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;HH:mm&quot;</span><span style="color: #002200;">&#93;</span>;
		result <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>dateFormatter dateFromString<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSString</span> stringWithFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;%02d:%02d&quot;</span>, hour, minute<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#125;</span>
	<span style="color: #002200;">&#91;</span>dateFormatter release<span style="color: #002200;">&#93;</span>;
&nbsp;
	<span style="color: #a61390;">return</span> result;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #11740a; font-style: italic;">// Tests whether the user has set the 12-hour or 24-hour mode in their settings.</span>
<span style="color: #002200;">+</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">BOOL</span><span style="color: #002200;">&#41;</span>userSetTwelveHourMode
<span style="color: #002200;">&#123;</span>
	<span style="color: #400080;">NSDateFormatter</span> <span style="color: #002200;">*</span>testFormatter <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSDateFormatter</span> alloc<span style="color: #002200;">&#93;</span> init<span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#91;</span>testFormatter setTimeStyle<span style="color: #002200;">:</span>NSDateFormatterShortStyle<span style="color: #002200;">&#93;</span>;
	<span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>testTime <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>testFormatter stringFromDate<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSDate</span> date<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#91;</span>testFormatter release<span style="color: #002200;">&#93;</span>;
	<span style="color: #a61390;">return</span> <span style="color: #002200;">&#91;</span>testTime hasSuffix<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;M&quot;</span><span style="color: #002200;">&#93;</span> || <span style="color: #002200;">&#91;</span>testTime hasSuffix<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;m&quot;</span><span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #11740a; font-style: italic;">// Converts a 24-hour time string to 12-hour time string</span>
<span style="color: #002200;">+</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>time12FromTime24<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>time24String
<span style="color: #002200;">&#123;</span>
	<span style="color: #400080;">NSDateFormatter</span> <span style="color: #002200;">*</span>testFormatter <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSDateFormatter</span> alloc<span style="color: #002200;">&#93;</span> init<span style="color: #002200;">&#93;</span>;
	<span style="color: #a61390;">int</span> hour <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>time24String substringToIndex<span style="color: #002200;">:</span><span style="color: #2400d9;">2</span><span style="color: #002200;">&#93;</span> intValue<span style="color: #002200;">&#93;</span>;
	<span style="color: #a61390;">int</span> minute <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>time24String substringFromIndex<span style="color: #002200;">:</span><span style="color: #2400d9;">3</span><span style="color: #002200;">&#93;</span> intValue<span style="color: #002200;">&#93;</span>;
&nbsp;
	<span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>result <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSString</span> stringWithFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;%02d:%02d %@&quot;</span>, hour <span style="color: #002200;">%</span> <span style="color: #2400d9;">12</span>, minute, hour &gt; <span style="color: #2400d9;">12</span> ? <span style="color: #002200;">&#91;</span>testFormatter PMSymbol<span style="color: #002200;">&#93;</span> <span style="color: #002200;">:</span> <span style="color: #002200;">&#91;</span>testFormatter AMSymbol<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#91;</span>testFormatter release<span style="color: #002200;">&#93;</span>;
	<span style="color: #a61390;">return</span> result;
<span style="color: #002200;">&#125;</span></pre>
</div>
</div>
<h3>References:</h3>
<ul>
<li>StackOverflow &#8211; <a href="http://stackoverflow.com/questions/143075/nsdateformatter-am-i-doing-something-wrong-or-is-this-a-bug">NSDateFormatter, am I doing something wrong or is this a bug?</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://huyzing.com/2009/09/26/iphone-sdk-time-bug-for-international-users/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Compatibility between the iPhone App Store and the LGPL</title>
		<link>http://huyzing.com/2009/08/24/compatibility-between-the-iphone-app-store-and-the-lgpl/</link>
		<comments>http://huyzing.com/2009/08/24/compatibility-between-the-iphone-app-store-and-the-lgpl/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 03:53:31 +0000</pubDate>
		<dc:creator>huy</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[App Store]]></category>
		<category><![CDATA[from-MultiNC]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPhone dev]]></category>
		<category><![CDATA[LGPL]]></category>
		<category><![CDATA[licensing]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[syn-linkedin]]></category>

		<guid isPermaLink="false">http://multinc.com/?p=157</guid>
		<description><![CDATA[LGPL Conditions
If you&#8217;re developing an iPhone application that you intend to submit to Apple&#8217;s App Store and you want to make use of a third-party&#8217;s software library that happens to be licensed under the LGPL, you have a couple of choices according to the license requirements:

You open-source your app.  Specifically, you provide to your users [...]]]></description>
			<content:encoded><![CDATA[<h2>LGPL Conditions</h2>
If you're developing an iPhone application that you intend to submit to Apple's App Store and you want to make use of a third-party's software library that happens to be licensed under the <a href="http://www.gnu.org/licenses/lgpl.html">GNU Lesser General Public License (LGPL)</a>, you have a couple of choices according to the license requirements:
<ul>
	<li>You can open-source your app.  Specifically, you provide to your users the source code of your entire application under the LGPL or GPL.  That means for example all the .h and .m files.</li>
	<li><em>You can keep your app closed-source, but you provide to your users all the object code</em> of your  application necessary to re-link your application.  That means for example all the .o and .a files.  Most people forget that this option is in fact available to iPhone app developers.</li>
</ul>
Of course, if you modify the library itself, you have to provide these code changes in source form either way.
<h2>Dynamic/Shared Library</h2>
The above LGPL conditions can be thought to apply to the case when the LGPL library is statically linked.
<div>
<pre><span> </span></pre>
</div>
But outside of the world of Apple's App Store, the LGPL would normally give you another way to use LGPL code without releasing the source code or object code for your application: compiling your application with a run-time shared library (hence, allowing users to run your application with an updated library if they choose to).  The problem for us is that the Apple iPhone developer agreement doesn't allow the bundling of shared libraries.
<div>
<pre><span> </span></pre>
</div>
If you don't care about the App Store and want to release/sell your application through Ad Hoc Distribution or to jailbroken devices (e.g. via <a href="http://cydia.saurik.com/">Cydia</a>), you can actually link apps with a run-time shared library and thus satisfy the LGPL without providing source code or object code.
<h2>Static Library Exception</h2>
Some library developers are aware of these iPhone and LGPL incompatibilities and provide a "static library exception," loosening LGPL requirements for the iPhone platform.  For example, the cocos2d author intended to <a href="http://cocos2d-iphone.googlecode.com/svn/trunk/LICENSE">offer such an exception</a>: even though he neglected to distinguish between the source code and object code requirements of the LGPL, it's fairly clear he intended to relieve the app developer from having to provide source <em>or</em> object code even if they linked in the LGPL library <em>statically</em>.
<div>
<pre><span> </span></pre>
</div>
It's a good idea for you to consider contacting the author of the LGPL library you're interested in to offer a similar exception for the iPhone.  That way you don't have to worry about having to provide object code for your app.
<h2>Spirit of the LGPL</h2>
Whether you decide to release the object code for your app or take advantage of a "static library exception," the spirit of the LGPL is violated by the iPhone restrictions: it becomes very difficult for your app user to customize your app with a modified or updated version of LGPL library.
<div>
<pre><span> </span></pre>
</div>
Let's say you do release all the object code and all the utilities that your app requires to build a new app based on an improved LGPL library.  How can your users install the new binary?  They are faced with the following unhappy options:
<ul>
	<li>Jailbreak their iPhone to install any binary that they want</li>
	<li>Join the iPhone Developer Program for $99 a year to be able to legally distribute "Ad Hoc" the new app to up to 100 devices.</li>
</ul>
In other words, you may end up spending a lot of time distributing object code to satisfy the LGPL and protect the source code of your app, but the object code is very unlikely to get used anyway.
<div>
<pre><span> </span></pre>
</div>
In fact, even if Apple allowed apps to link with dynamic shared libraries, how could users even substitute the libraries without jailbreaking their iPhone?
<h4>References:</h4>
<ul>
	<li><a href="http://www.gnu.org/licenses/lgpl.html">GNU Lesser General Public License</a>, particularly section 4.d)</li>
	<li><a href="http://stackoverflow.com/questions/459833/which-open-source-licenses-are-compatible-with-the-iphone-and-app-store/1321681#1321681">StackOverflow - Which open source licenses are compatible with the iPhone and App Store?</a></li>
	<li><a href="http://www.nabble.com/iphone,-and-releasing-object-code-satisfies-LGPL-Re:-Static-building-and-bundling-of-SDL.-td21907721.html">Nabble - iphone, and releasing object code satisfies LGPL Re: Static building and bundling of SDL.</a></li>
	<li><a href="http://www.nabble.com/iPhone-SDK-%3C-%3E-SDL-License-td19983219.html">Nabble - iPhone SDK &lt;-&gt; SDL License</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://huyzing.com/2009/08/24/compatibility-between-the-iphone-app-store-and-the-lgpl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DiskAid – tool to transfer files to/from iPhone or iPod Touch</title>
		<link>http://huyzing.com/2009/05/18/diskaid-%e2%80%93-tool-to-transfer-files-tofrom-iphone-or-ipod-touch/</link>
		<comments>http://huyzing.com/2009/05/18/diskaid-%e2%80%93-tool-to-transfer-files-tofrom-iphone-or-ipod-touch/#comments</comments>
		<pubDate>Tue, 19 May 2009 03:31:32 +0000</pubDate>
		<dc:creator>huy</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[DiskAid]]></category>
		<category><![CDATA[from-MultiNC]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPod Touch]]></category>

		<guid isPermaLink="false">http://multinc.com/?p=151</guid>
		<description><![CDATA[You can use the free DiskAid tool to transfer files between your computer and your iPhone or iPod Touch]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a useful and free tool for seeing the filesystem of your iPhone and iPod Touch once it&#8217;s connected to your PC or Mac via USB cable and transferring files: <a href="http://www.digidna.net/diskaid/">DiskAid</a></p>
<p>Before this will work, you may have to ensure the following:</p>
<p>In Windows, the &#8220;Apple Mobile Device&#8221; service must be running<br />
You should enter the Passcode on your iPhone or iPod Touch<br />
The device must be jailbroken if you want to see anything outside the Media folder, e.g. if you want to see the root folder.</p>
]]></content:encoded>
			<wfw:commentRss>http://huyzing.com/2009/05/18/diskaid-%e2%80%93-tool-to-transfer-files-tofrom-iphone-or-ipod-touch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading Android Dev Phone to 1.5 (&#8220;cupcake&#8221;)</title>
		<link>http://huyzing.com/2009/05/09/updating-android-dev-phone-to-15/</link>
		<comments>http://huyzing.com/2009/05/09/updating-android-dev-phone-to-15/#comments</comments>
		<pubDate>Sat, 09 May 2009 19:44:02 +0000</pubDate>
		<dc:creator>huy</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[Vietnam]]></category>
		<category><![CDATA[ADP1]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Cupcake]]></category>
		<category><![CDATA[G1]]></category>
		<category><![CDATA[GPhone]]></category>

		<guid isPermaLink="false">http://huyzing.com/?p=68</guid>
		<description><![CDATA[Ahead of the Android enthusiasts meeting in Saigon, I wanted to make sure that I didn&#8217;t show up with an embarrassingly-old 1.0 firmware on my Android Dev Phone.  Yeah, I haven&#8217;t done much beyond just use it as a regular user since I got it 4 months ago.  But no need to make it obvious [...]]]></description>
			<content:encoded><![CDATA[<p>Ahead of the <a href="http://www.tinhte.com/forum/showthread.php?t=196054">Android enthusiasts meeting</a> in Saigon, I wanted to make sure that I didn&#8217;t show up with an embarrassingly-old 1.0 firmware on my Android Dev Phone.  Yeah, I haven&#8217;t done much beyond just use it as a regular user since I got it 4 months ago.  But no need to make it obvious I&#8217;m an Android poseur.</p>
<p>So I needed to update to the latest firmware 1.5, a.k.a. &#8220;Cupcake&#8221;.</p>
<p>The <a href="http://www.htc.com/www/support/android/adp.html">official instructions </a>are at HTC Support but they were nicely <a href="http://cxu.yimudi.org/2009/04/28/android-upgrade-to-1.5.html">summarized</a> by some dude.  I&#8217;ve included his instructions with my changes in <span style="color: #ff0000;">red</span> (I didn&#8217;t get the minor problem he ran into):</p>
<blockquote>
<ol>
<li>From the <a href="http://www.htc.com/www/support/android/adp.html#s3">HTC support page</a>, download radio image <strong>ota-radio-2_22_19_26I.zip</strong> and recovery image <strong>signed-dream_devphone-ota-147201.zip</strong></li>
<li>make sure HTC Gphone is connected to your computer, and `adb devices` see your phone listed</li>
<li>adb push ota-radio-2_22_19_26I.zip /sdcard/update.zip</li>
<li>adb shell sync</li>
<li>shut down your GPhone. When preparing to restart, please press and hold &#8220;Home&#8221; then hit the Start (should be the same power off button aka the &#8220;Call End&#8221; button) button, waiting for the &#8220;!&#8221; icon to appear.</li>
<li>Press ALT + <span style="color: #ff0000;">l (this is a lowercase L, not a capital i or number 1)</span><span style="color: #ff0000;"> to display the console output</span></li>
<li>Press ALT + s  to install the update</li>
<li>Press HOME + BACK and write the install, and there will follow an automatic reboot</li>
<li>adb push signed-dream_devphone-ota-147201.zip /sdcard/update.zip</li>
<li>repeat 4 &#8211; 8</li>
</ol>
</blockquote>
<p>That worked pretty well, but it didn&#8217;t solve the syncing problem I&#8217;ve been having (my contacts having not been syncing to Google since I first got the phone.</p>
<p>Note that several applications have problems when upgrading from 1.0 to 1.5 and need to be updated, including ChompSMS, Power Manager, Toggle Settings, Task Manager for Root Users, System Monitor.</p>
<p>The new OS runs snappier, supports video recording mode and a on-screen soft keyboard, lists applications under Manage Applications much quicker.</p>
]]></content:encoded>
			<wfw:commentRss>http://huyzing.com/2009/05/09/updating-android-dev-phone-to-15/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SUMMARY: GTAC 2008 Keynote Address: The Future of Testing</title>
		<link>http://huyzing.com/2009/05/02/summary-gtac-2008-keynote-address-the-future-of-testing/</link>
		<comments>http://huyzing.com/2009/05/02/summary-gtac-2008-keynote-address-the-future-of-testing/#comments</comments>
		<pubDate>Sun, 03 May 2009 05:53:47 +0000</pubDate>
		<dc:creator>huy</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[GTAC]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://huyzing.com/wp/?p=18</guid>
		<description><![CDATA[The 2008 Google Test Automation Conference was keynoted by the entertaining speaker James Whittaker from Microsoft.
Key takeaways from the Google Tech Talk video were:

Insourcing → Outsourcing → Crowdsourcing →  Testsourcing

Some companies are already doing crowdsourcing of testing:

utest.com pays the internet community to find bugs in software. (Companies who want their products tested credit their account [...]]]></description>
			<content:encoded><![CDATA[<p>The 2008 Google Test Automation Conference was keynoted by the entertaining speaker <span>James Whittaker from Microsoft.</span></p>
<p><span>Key takeaways from the <a href="http://www.youtube.com/watch?v=Pug_5Tl2UxQ">Google Tech Talk video</a> were:</span></p>
<ul>
<li><span>Insourcing → Outsourcing </span><span>→ Crowdsourcing </span><span>→  <strong>Testsourcing</strong></span>
<ul>
<li><span>Some companies are already doing crowdsourcing of testing:</span>
<ul>
<li><a href="http://www.utest.com/">utest.com</a> pays the internet community to find bugs in software. (Companies who want their products tested credit their account with at least $2000, with which they pay for discovered bugs that they aprove.)</li>
</ul>
</li>
<li>The speaker believes that in the next phase of evolution, we&#8217;ll have &#8220;testsourcing&#8221; where vendors are providing tests themselves.</li>
</ul>
</li>
<li><span><strong>Virtualization</strong>:</span>
<ul>
<li><span>Virtual machines and their environments are going to be key for wrapping up and reproducing bugs as they happen.  They should run not only on testers&#8217; machines but also users&#8217; machines.</span></li>
<li><span>Market of the future: virtual test machines<br />
</span></li>
</ul>
</li>
<li><strong>Visualization</strong>:
<ul>
<li>Microsoft testers use a tool to visualize their codebase (see image below) and focus their testing
<ul>
<li><img class="size-full wp-image-20 alignnone" title="Microsoft's codebase visualization tool" src="http://huyzing.com/wp/wp-content/uploads/2009/05/msft-testing-snapshot.jpg" alt="Microsoft's codebase visualization tool" width="521" height="400" /></li>
<li>Size denotes lines of code</li>
<li>Darkness denotes complexity [can't hear what he mumbles there]</li>
<li>I wish I knew what this tool was</li>
</ul>
</li>
<li>Game testers use numerous GUI tools:
<ul>
<li>displays where they are in the application itself (in addition to the usual game screen) as they play the game</li>
<li>displays surrounding testable objects and allows them to teleport to them</li>
<li>displays objects that need to be tested because the code has changed</li>
<li>displays the degree of testing that has been done for each object</li>
</ul>
</li>
</ul>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://huyzing.com/2009/05/02/summary-gtac-2008-keynote-address-the-future-of-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Developing iPhone Applications using Java may not be such a good idea</title>
		<link>http://huyzing.com/2009/03/19/developing-iphone-applications-using-java-may-not-be-such-a-good-idea/</link>
		<comments>http://huyzing.com/2009/03/19/developing-iphone-applications-using-java-may-not-be-such-a-good-idea/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 10:50:15 +0000</pubDate>
		<dc:creator>huy</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[from-MultiNC]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPhone dev]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[XMLVM]]></category>

		<guid isPermaLink="false">http://multinc.com/wp/?p=131</guid>
		<description><![CDATA[Developing iPhone Applications without using Objective C
When the iPhone SDK came out in March 2008, mobile developers were very excited to be able to develop native applications for the increasingly popular device.  However, that excitement was partially tempered by some requirements of the platform, which for most meant learning how to program Objective C, a [...]]]></description>
			<content:encoded><![CDATA[<h2>Developing iPhone Applications without using Objective C</h2>
When the iPhone SDK came out in March 2008, mobile developers were very excited to be able to develop native applications for the increasingly popular device.  However, that excitement was partially tempered by some requirements of the platform, which for most meant learning how to program Objective C, a language that only Mac developers are familiar with.  Just as with iPod users, iPhone application developers do come from all walks of life–they’re not all Mac die-hards.
<div>
<pre><span> </span></pre>
</div>
As as result there have been several efforts to produce a framework or tool with which applications could be developed using more familiar languages. <a href="http://rhomobile.com/products/rhodes">Rhodes</a> does this for Ruby programmers. <a href="http://www.xmlvm.org/">XMLVM</a> does this for Java programmers.
<h2>XMLVM</h2>
I watched the <a href="http://www.youtube.com/watch?v=s8nMpi5-P-I">Google Tech Talk</a> about XMLVM, which goes into significant depth about the conversion process.  Essentially, the technology does cross-compilation from the compiled version of your Java application, in other words JVM bytecode instead of Java source code. Thus, the entire process of compiling an iPhone application would consist of Java source -&gt; JVM bytecode -&gt; Objective C source -&gt; native iPhone binary.  The speaker goes into detail with an example showing the conversion of JVM bytecode into Objective C source, which is easy to understand and can be educational.
<div><pre><span> </span></pre></div>
Opting for bytecode as source for XMLVM makes it easier to implement but produces bloated code.  Not only that, but the bytecode is converted not into native iPhone native code, but into Objective C source code.  Add to that that the conversion is done using XSLT, and you can guess how inefficient the process and the output will be.
<div><pre><span> </span></pre></div>
The speaker emphasizes that this is an academic project without abundant resources, with the implication that the code produced by this reference implementation is not expected to perform well for commercial purposes.  So while it’s interesting to see this idea in action, not even the speaker believes that this cross-compiler can be put to serious use yet, if ever.
<h3>Other languages for the XMLVM</h3>
Java is not the only source language that can benefit from XMLVM.  There is support for other input languages and output code.  See the <a href="http://www.xmlvm.org">website</a> for more information.
<h3>Enhancing the iPhone emulator with hardware data</h3>
One nice tool that the XMLVM team developed was a way to send device data to the desktop emulator, which naturally cannot emulate everything that the iPhone can do.  For example, you can use a real iPod Touch or iPhone to send accelerometer to the emulator.  The same could be envisioned for other functionality, e.g. GPS, light sensor, proximity sensor, etc.  I imagine this is so helpful for the development process that others must have implemented something like that as well.
<h2>Better to Develop in Objective-C</h2>
My opinion regarding these kinds of language-adapting frameworks or tools that allow developers to code in their familiar language is not very positive.  In general, I don’t think it’s a good idea to distance yourself from the target platform.  Problems include:
<ul>
	<li>Limited functionality</li>
	<li>Lower performance</li>
	<li>More complicated development process</li>
	<li>More source of bugs in your way (from not just the iPhone OS and SDK, but from the language adapter)</li>
	<li>Smaller community of developers, fewer development tools, less documentation</li>
</ul>
All these problems are multiplied when you’re dealing with a hot platform like the iPhone, where innovation comes fast along with bugs and the language adapter is always one or more steps behind on completeness, robustness, and performance optimization.  Do you really want to develop cool apps with only features that are “so last year”?  The fact that the iPhone platform and its evolution are so closed doesn’t help either.]]></content:encoded>
			<wfw:commentRss>http://huyzing.com/2009/03/19/developing-iphone-applications-using-java-may-not-be-such-a-good-idea/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
