<?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; iPhone</title>
	<atom:link href="http://huyzing.com/tag/iphone/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>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>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>
