<?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>Hanfis Weg in die Hölle &#187; application</title>
	<atom:link href="http://blog.spahan.ch/tag/application/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.spahan.ch</link>
	<description>oder zumindest in deren Nähe</description>
	<lastBuildDate>Sun, 25 Dec 2011 23:31:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>iPhone developer setup</title>
		<link>http://blog.spahan.ch/2009/03/iphone-developer-setup/</link>
		<comments>http://blog.spahan.ch/2009/03/iphone-developer-setup/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 19:38:31 +0000</pubDate>
		<dc:creator>hanfi</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[setup]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://blog.spahan.ch/?p=68</guid>
		<description><![CDATA[Well, Apple wants 99$ to let one develop for the iPhone. I would even pay that, but they wont sell it wihtout me have a credit card. And that is a definitively no-go for me.

So how to enable iPhone development for me?

Preparations :

	Xcode :
Xcode comes with 2 sets of SDKs for the iPhone. The ...]]></description>
			<content:encoded><![CDATA[<p>Well, Apple wants 99$ to let one develop for the iPhone. I would even pay that, but they wont sell it wihtout me have a credit card. And that is a definitively no-go for me.</p>
<p>So how to enable iPhone development for me?</p>
<p><strong>Preparations :</strong></p>
<ul>
<li><strong>Xcode</strong> :<br />
Xcode comes with 2 sets of SDKs for the iPhone. The Simulator- and the Device-SDK. The simulator-SDK is intended to run apps on the integrated iPhone simulator. This works out of the box. We talk about some problems with the Simulator later.<br />
The more tricky thing is to build for the Device. Apple wants all iPhone Apps be signed (a good idea actualy). Aproved Developers (those who pay to Apple) get a <em>Code Signing Certificate</em> and other Stuff from Apple. People like me without this need create that ourself.</p>
<ul>
<li> Create a Code Signing Certificate<br />
The most convient way is to use the Keychain Manager that came with osx. Use the Assistant in the Programm Menu to create a <em>Code Signing Certificate</em>. By default Xcode checks for a Certificate issued to &#8220;iPhone Developer&#8221;, so use that as the common name. No need to adjust all the Projects then.<br />
If Xcode can&#8217;t get your Certificate you get a message<br />
<code>CodeSign error: Code Signing Identity 'iPhone Developer' does not match any code-signing certificate in your keychain.  Once added to the keychain, touch a file or clean the project to continue.</code></li>
<li>Open <a href="file:///Developer/Platforms/iPhoneOS.platform/Info.plist">file:///Developer/Platforms/iPhoneOS.platform/Info.plist</a> and add to the OverrideProperties those 2 keys:
<ul>
<li>PROVISIONING_PROFILE_ALLOWED : NO</li>
<li>PROVISIONING_PROFILE_REQUIRED : NO</li>
</ul>
<p>Without this, you get Errors like<br />
<code>CodeSign error: a valid provisioning profile is required for product type 'Application' in SDK 'Device - iPhone OS 2.2.1'</code></li>
<li>You must restart Xcode to make those changes work.</li>
</ul>
</li>
<li>iPhone setup:
<ul>
<li> iPhone needs be jailbroken.</li>
<li> ssh access. <a href="http://blog.spahan.ch/2009/03/new-iphone/">check my previous post about this</a>.</li>
</ul>
</li>
</ul>
<p><strong>Get your Application to iPhone</strong></p>
<ul>
<li> Build your project for iphone. Double check the SDK set.<br />
You will see a warning:<br />
<code>CodeSign warning: provisioning is not applicable for product type 'Application' in SDK 'Device - iPhone OS 2.2.1'; ignoring...</code><br />
Ignore it.</li>
<li><code>scp -r [-P &lt;port&gt;] &lt;ProjectRoot&gt;/build/Release-iphoneos/&lt;AppName&gt;.app root@&lt;iPhone ip&gt;:/Applications/</code></li>
<li>ssh into your iPhone; <code>ssh -lroot [-p port] &lt;iPhone ip&gt;</code></li>
<li>To make the application apear on the display, we need reload the <em>SpringBoard</em>. The <em>SpringBoard</em> is the main application you usualy see. We use the internal <em>launchctl</em> application for this :</li>
<li>cd to the launchctl directory :<code>cd System/Library/LaunchDaemons/</code></li>
<li>reload the Springboard: <code>launchctl unload com.apple.SpringBoard.plist; launchctl load com.apple.SpringBoard.plist;</code></li>
<li>The iPhone beeps, and after sliding the lock away, your application should be there.</li>
</ul>
<p><strong>Remove Application</strong></p>
<ul>
<li>ssh into your iPhone, cd into /Applications</li>
<li>rm -r &lt;ApplicationBundle&gt;.app</li>
<li>reload the Springboard: <code>launchctl unload com.apple.SpringBoard.plist; launchctl load com.apple.SpringBoard.plist;</code></li>
<li>Delete the coresponding entries in User/Library/Caches/com.apple.mobile.installation.plist</li>
</ul>
<p><strong>Ranting about the Simulator.</strong></p>
<p>So Apple decided to let non-apple-aproved-developers have a way to legaly develop for the iPhone. We shall use the <em>iPhone Simulator</em>. This piece of Software is realy a nice thing, at least i don&#8217;t have to set my Application up on the phone, i can use my Keyboard, Mouse, etc.</p>
<p>Well, it would be nice&#8230; if its desing wouldnt be completly flawed. First of all it doesnt realy Simulate a iPhone. No arm. It uses x86 code. It uses another SDK. It actualy looks like it just calls the osx frameworks. Unfortunately this differs a little from the iPhone one. An example would be NSTask. On the simulator its there, on the iPhone its not. All this makes the simulator more of a trap than a usefull tool. You can never be sure your code will work on the iPhone just because it worked on the simulator.</p>
<p><strong>Update</strong>:<br />
Reloadin the Springboard doesnt always work. Im still unsure what the Problem is.<br />
However, there is a simple workaround. install or remove a Cydia application. <em>Note to myself: poke around in Cydias source to find the problem.</em> This can be annoying after some time, so the most easy thing is to setup your <a href="http://www.saurik.com/id/7">own apt repository</a>.  This way you can even install applications from abroad!.</p>
<p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://blog.spahan.ch/2009/03/iphone-developer-setup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

