<?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>Weird rocketry &#187; ios code signing</title>
	<atom:link href="http://webapp.org.ua/tag/ios-code-signing/feed" rel="self" type="application/rss+xml" />
	<link>https://webapp.org.ua</link>
	<description>Flights to outer code</description>
	<lastBuildDate>Sat, 16 Jul 2016 11:12:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Preparing AdHoc distribution in Titanium Mobile</title>
		<link>https://webapp.org.ua/dev/preparing-adhoc-distribution-in-titanium-mobile/</link>
		<comments>https://webapp.org.ua/dev/preparing-adhoc-distribution-in-titanium-mobile/#comments</comments>
		<pubDate>Tue, 14 Feb 2012 16:39:26 +0000</pubDate>
		<dc:creator>bananos</dc:creator>
				<category><![CDATA[dev]]></category>
		<category><![CDATA[adhoc]]></category>
		<category><![CDATA[distribution]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[ios code signing]]></category>
		<category><![CDATA[ios provisioning]]></category>
		<category><![CDATA[ipa]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[titanium]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://webapp.org.ua/?p=218</guid>
		<description><![CDATA[Appcelerator Titanium is a very promising technology which allows you to write native mobile applications in Javascript for both iPhone &#38; Android. After playing around a bit with Titanium Mobile, I decided to showcase technology strengths to our stakeholders, particularly by letting them use KitchenSink demo for iOS. In order to distribute iOS application into [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-224 alignright" title="TITANIUM_logo1" src="http://webapp.org.ua/wp-content/uploads/2012/02/TITANIUM_logo1.png" alt="" width="325" height="325" /></p>
<p><a title="Appcelerator" href="http://www.appcelerator.com/">Appcelerator Titanium</a> is a very promising technology which allows you to write native mobile applications in Javascript for both iPhone &amp; Android.</p>
<p>After playing around a bit with Titanium Mobile, I decided to showcase technology strengths to our stakeholders, particularly by letting them use KitchenSink demo for iOS.</p>
<p>In order to distribute iOS application into real hardware you&#8217;ll have to pass through a bunch of  Apple&#8217;s obstacles including:</p>
<ul>
<li>Registering as an apple developer &amp; getting valid certificate</li>
<li>Registering your app ID</li>
<li>Creating provisioning profile for specific iPhone UDIDs</li>
<li>Mess around with certificates/private keys to properly sign your application</li>
</ul>
<p>It turns out that it&#8217;s not that easy to produce valid AdHoc distribution of your iOS app in Titanium, in this post I&#8217;m going to show you how to do it.</p>
<p>&nbsp;</p>
<p><span id="more-218"></span></p>
<p>Before we start, make sure you have latest Xcode &amp; Titanium SDK/Studio installed, as of the time of this writing Xcode version was 4.2.1, and Titanium mobile SDK was 1.8.1</p>
<p>For demo purposes we&#8217;ll use <a href="https://github.com/appcelerator/KitchenSink">KitchenSink</a> application provided as a showcase of Titanium mobile:</p>
<h2>Clone &amp; run KitchenSink in emulator</h2>
<pre><code>git clone https://github.com/appcelerator/KitchenSink.git</code></pre>
<p>Open <a href="http://www.appcelerator.com/products/titanium-studio/">Titanium Studio</a> and select <code>File-&gt;Import-&gt;Import Existing Titanium Project</code></p>
<p><a href="http://webapp.org.ua/wp-content/uploads/2012/02/tisdtudio_import_existing.png"><img class="aligncenter size-full wp-image-227" title="tisdtudio_import_existing" src="http://webapp.org.ua/wp-content/uploads/2012/02/tisdtudio_import_existing.png" alt="" width="616" height="550" /></a></p>
<p>&nbsp;</p>
<h3>Configure project for iphone only</h3>
<p><a href="http://webapp.org.ua/wp-content/uploads/2012/02/ti_configure-1.png"><img class="aligncenter size-full wp-image-238" title="ti_configure" src="http://webapp.org.ua/wp-content/uploads/2012/02/ti_configure-1.png" alt="KitchenSink configuration" width="803" height="729" /></a></p>
<h3>Run project on iOS simulator</h3>
<p><a href="http://webapp.org.ua/wp-content/uploads/2012/02/Run_on_simulator.png"><img class="aligncenter size-full wp-image-239" title="Run_on_simulator" src="http://webapp.org.ua/wp-content/uploads/2012/02/Run_on_simulator.png" alt="KitchenSink on iOS simulator" width="923" height="724" /></a></p>
<p>At this point,  Titanium will create an Xcode project for KitchenSink application. Wait for it to compile and run, then exit Simulator.</p>
<h2>Open generated Xcode project</h2>
<p><a href="http://webapp.org.ua/wp-content/uploads/2012/02/Screen-Shot-2012-02-14-at-4.58.17-PM.png"><img class="aligncenter size-full wp-image-241" title="Titanium mobile xcode project" src="http://webapp.org.ua/wp-content/uploads/2012/02/Screen-Shot-2012-02-14-at-4.58.17-PM.png" alt="Titanium mobile xcode project" width="414" height="335" /></a></p>
<p>Run Xcode, and open <code>KitchenSink.xcodeproj</code> , Objective-C code could be found at <code>kitchensink/build/iphone</code></p>
<h3>Manage project schemas</h3>
<p>In Xcode, open <code>Product-&gt;Edit scheme:</code></p>
<p><a href="http://webapp.org.ua/wp-content/uploads/2012/02/xcode_project_schema.png"></a><a href="http://webapp.org.ua/wp-content/uploads/2012/02/xcode_project_schema-1.png"><img class="aligncenter size-full wp-image-244" title="xcode project schema" src="http://webapp.org.ua/wp-content/uploads/2012/02/xcode_project_schema-1.png" alt="Xcode project schema" width="900" height="699" /></a><br />
For each schema (<code>KitchenSink, KitchenSink-iPad, KitchenSink-universal</code>)  select <code>Archive</code> and make sure that<br />
<code>Build Configuration</code> is set to <code>debug</code></p>
<p>&nbsp;</p>
<h2>Configure code signing for build targets</h2>
<p>For each target, select <code> Build Settings -&gt; Code Signing -&gt; Code Signing  Identity </code></p>
<p><a href="http://webapp.org.ua/wp-content/uploads/2012/02/code_signing.png"><img class="aligncenter size-full wp-image-245" title="code_signing" src="http://webapp.org.ua/wp-content/uploads/2012/02/code_signing.png" alt="code signing configuration for Titanium" width="909" height="699" /></a></p>
<p>Make sure to select valid provisioning identity that you previously created on Apple&#8217;s provisioning portal for a particular iOS device/application. In my case, it was called <code>com.nimble.KitchenSink</code> and provisioning profile was called <code>KitchenSink_AdHoc</code>.  For identities to be recognized by Xcode you should have been installed Apple Developer&#8217;s certificate as well as your organization certificate into MacOS keychain.</p>
<h2>Archive (produce final IPA file)</h2>
<p>Select <code>KitchenSink</code> target, then from the main menu choose <code>Product-&gt;Archive</code></p>
<p><a href="http://webapp.org.ua/wp-content/uploads/2012/02/Screen-Shot-2012-02-14-at-5.49.33-PM.png"><img class="aligncenter size-full wp-image-250" title="Xcode archive" src="http://webapp.org.ua/wp-content/uploads/2012/02/Screen-Shot-2012-02-14-at-5.49.33-PM.png" alt="Produce IPA file" width="677" height="546" /></a></p>
<p>Wait for Xcode to compile &amp; archive. You may find resulting Archive in Xcode Organizer:</p>
<p><a href="http://webapp.org.ua/wp-content/uploads/2012/02/kitchensink_archive-1.png"><img class="aligncenter size-full wp-image-254" title="kitchensink archive" src="http://webapp.org.ua/wp-content/uploads/2012/02/kitchensink_archive-1.png" alt="Kitchensink archive" width="848" height="338" /></a></p>
<p>Click &#8220;Share&#8221; and provide the same identity which was used for <code>Code Signing</code> section above:</p>
<p><a href="http://webapp.org.ua/wp-content/uploads/2012/02/ipa_provisioning.png"><img class="aligncenter size-full wp-image-257" title="ipa_provisioning" src="http://webapp.org.ua/wp-content/uploads/2012/02/ipa_provisioning.png" alt="IPA provisioning" width="728" height="491" /></a></p>
<p>Save resulting IPA file along with corresponding <code>KitchenSink_Adhoc.mobileprovision</code>   profile.</p>
<p>&nbsp;</p>
<h2>Install it on device</h2>
<p>That&#8217;s the easiest part if you&#8217;ve done everything right.  Just drag&amp;drop  mobileprovision &amp; ipa  files into iTunes and run sync with an actual iOS device.</p>
<p>If you missed something for code signing, during iTunes sync, you might encounter errors like this:</p>
<blockquote><p>The executable was signed with invalid entitlements.<br />
The entitlements specified in your application’s Code Signing Entitlements file do not match those specified in your provisioning profile.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>https://webapp.org.ua/dev/preparing-adhoc-distribution-in-titanium-mobile/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
