<?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>Magento Design and Development &#187; iphone</title>
	<atom:link href="http://inchoo.net/tag/iphone/feed/" rel="self" type="application/rss+xml" />
	<link>http://inchoo.net</link>
	<description>Magento Design and Magento Development Professionals - Inchoo</description>
	<lastBuildDate>Wed, 23 May 2012 06:32:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Magento API v2 SOAP demystified</title>
		<link>http://inchoo.net/ecommerce/magento/magento-v2-soap-demystified/</link>
		<comments>http://inchoo.net/ecommerce/magento/magento-v2-soap-demystified/#comments</comments>
		<pubDate>Thu, 26 Apr 2012 12:35:21 +0000</pubDate>
		<dc:creator>Darko Goles</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[Mobile web]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[SOAP]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[Web sercvices]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=13588</guid>
		<description><![CDATA[Last few weeks, i often see confused people asking questions about difference between Magento&#8217;s API v1 and v2, and also bunch of questions about how to use WSDL and WS-I &#8230;]]></description>
			<content:encoded><![CDATA[<p>Last few weeks, i often see confused people asking questions about difference between Magento&#8217;s API v1 and v2, and also bunch of questions about how to use WSDL and WS-I files when developing own or extending existing Magento soap API v2.<br />
It is obvious that short articles about specific Magento API parts will not help them to get the bigger picture about Magento core API v2. Because of that, I decided to demystify practical usage of Magento API v2 and also to explain difference when using v1 and/or v2 API.</p>
<p>Let&#8217;s start from beginning, to everything clear later:</p>
<p><span id="more-13588"></span></p>
<h2>SOAP basics</h2>
<p><strong>SOAP</strong> = Simple Object Access Protocol. It is based on XML mostly via HTTP (POST).<br />
Soap basic structure is basically Envelope with Header and Body inside:</p>
<div id="attachment_13605" class="wp-caption aligncenter" style="width: 291px"><a href="http://inchoo.net/wp-content/uploads/2012/04/Soap-structure.jpg"><img class="size-thumbnail wp-image-13605" title="Soap structure" src="http://inchoo.net/wp-content/uploads/2012/04/Soap-structure-281x300.jpg" alt="Soap structure" width="281" height="300" /></a><p class="wp-caption-text">Soap structure</p></div>
<p>Some example SOAP message looks like this:</p>
<pre class="brush: php; title: ; notranslate">

POST /InStock HTTP/1.1
Host: www.example.org
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 299
SOAPAction: &quot;http://www.w3.org/2003/05/soap-envelope&quot;

&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;soap:Envelope xmlns:soap=&quot;http://www.w3.org/2003/05/soap-envelope&quot;&gt;
  &lt;soap:Header&gt;
  &lt;/soap:Header&gt;
  &lt;soap:Body&gt;
     &lt;m:GetStockPrice xmlns:m=&quot;http://www.example.org/stock&quot;&gt;
     &lt;m:StockName&gt;IBM&lt;/m:StockName&gt;
     &lt;/m:GetStockPrice&gt;
  &lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;
</pre>
<h4>WSDL</h4>
<p><strong>WSDL</strong> stands for: “Web Services Description Language”. It is basically XML &#8211; based language that is used for describing the functionality offered by a web service.</p>
<p>There are two possible versions of WSDL: WSDL 1.1 and WSDL 2.0. Since Magento uses WSDL 1.1, I will continue with this WSDL version in this article.</p>
<p><strong>Objects in WSDL</strong></p>
<p><a href="http://inchoo.net/wp-content/uploads/2012/04/wsdl_objects.jpg"><img class="aligncenter size-full wp-image-13611" title="wsdl_objects" src="http://inchoo.net/wp-content/uploads/2012/04/wsdl_objects.jpg" alt="" width="609" height="388" /></a></p>
<h4>Magento Core API</h4>
<p>There are two API types present in Magento by default (I am talking about Magento versions 1.6.2CE and below):</p>
<ul>
<li>XML-RPC</li>
<li>SOAP (API v1 and v2)</li>
</ul>
<p>More on API types and differences you can find in post: <a title="Mobile development" href="http://inchoo.net/mobile-development/iphone-development/consuming-soap-web-services-in-ios/" target="_blank">Consuming SOAP web services in iOS</a> by Ivan Kalaica</p>
<h2>Accessing Magento API via SOAP &#8211; basic steps</h2>
<ol>
<li>Create appropriate role (Magento Admin)</li>
<li>Create web services user (Magento Admin)</li>
<li>Assign created role to the user (Magento Admin)</li>
<li>Log-in to web service and retrieve Session Id (Soap Client)</li>
<li>Call appropriate method (Soap Client)</li>
</ol>
<h4>Creating Web Service Role</h4>
<p style="text-align: left;">First we should define appropriate roles for web services user, so, log-in to admin panel, go to menu: System/Web services/Roles and click on Add New Role button.</p>
<p style="text-align: left;"><a href="http://inchoo.net/wp-content/uploads/2012/04/roles11.jpg"><img class="size-thumbnail wp-image-13631 aligncenter" title="roles1" src="http://inchoo.net/wp-content/uploads/2012/04/roles11-300x225.jpg" alt="" width="300" height="225" /></a><br />
On “Role info” tab, we need to enter some custom Role name, and then click on Role resources tab, choose wanted role resources and Save Role.</p>
<p style="text-align: left;"><a href="http://inchoo.net/wp-content/uploads/2012/04/Role_resources.jpg"><img class="aligncenter size-thumbnail wp-image-13626" title="Role_resources" src="http://inchoo.net/wp-content/uploads/2012/04/Role_resources-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>Role resources necessary for usage with API are basically defined in each Magento module&#8217;s api.xml file in etc folder, and can be checked there what role resources are needed for successful consuming specific API method.</p>
<h4>Creating Web Service User</h4>
<p>After creating role, let&#8217;s create web services user that will have defined role permissions.<br />
Go to menu: System/Web Services/Users and click on “Add New User” button. Under “User Info” tab fill the fields, and pay attention that “User Name” and “API key” values are values that we will use on client side to access API.</p>
<p><a href="http://inchoo.net/wp-content/uploads/2012/04/web_services_user.jpg"><img class="aligncenter size-thumbnail wp-image-13635" title="web_services_user" src="http://inchoo.net/wp-content/uploads/2012/04/web_services_user-300x225.jpg" alt="" width="300" height="225" /></a></p>
<h4>Assigning created Role to the User</h4>
<p>After that, we just have to click on User Role tab and click on radio-button to assign wanted role to current user.<br />
After that we just need to click Save User button.</p>
<p><a href="http://inchoo.net/wp-content/uploads/2012/04/user_role.jpg"><img class="aligncenter size-thumbnail wp-image-13636" title="user_role" src="http://inchoo.net/wp-content/uploads/2012/04/user_role-300x225.jpg" alt="" width="300" height="225" /></a></p>
<h4>Calling Magento API v1 methods</h4>
<pre class="brush: php; title: ; notranslate">

&lt;?php

$api_url_v1 = &quot;http://magento.local/api/soap/?wsdl=1&quot;;

$username = 'mobile';
$password = 'mobile123';

$cli = new SoapClient($api_url_v1);

//retreive session id from login
$session_id = $cli-&gt;login($username, $password);

//call customer.list method
$result = $cli-&gt;call($session_id, 'customer.list', array(array()));
</pre>
<h4>Calling Magento API v2 methods</h4>
<pre class="brush: php; title: ; notranslate">

&lt;?php

$api_url_v2 = &quot;http://magento.local/api/v2_soap/?wsdl=1&quot;;

$username = 'mobile';
$password = 'mobile123';

$cli = new SoapClient($api_url_v2);

//retreive session id from login
$session_id = $cli-&gt;login($username, $password);

//call customer.list method
$result = $cli-&gt;customerCustomerList($session_id);
</pre>
<p>If you compare those two versions of API calls, you will notice that v1 uses method “call” for ever requested method, and v2 has defined full method name to call.</p>
<pre class="brush: php; title: ; notranslate">
//API v1 way
$result = $cli-&gt;call($session_id, 'customer.list', array(array()));

//API v2 way
$result = $cli-&gt;customerCustomerList($session_id);&lt;/pre&gt;
</pre>
<p>Basically, API v2 calls method same way like v1, but there is some kind of wrapper around call method in v2. Somebody will ask: Why Magento did something like this? Why would somebody make different methods for accessing API when we have “call” method already?</p>
<p>Here comes the basic difference between v1 and v2 API in Magento.</p>
<p>To demystify that, we should first look at and compare WSDL for v1 and v2 API in Magento.</p>
<p>If we open url: <strong>http://yourserver.com/api/<em>soap</em>/?wsdl</strong> we can see that few basic method are inside: call, multiCall, login etc&#8230;<br />
But, if we look at <strong>http://yourserver.com/api/<em>v2_soap</em>/?wsdl</strong>, we will find that there is bunch of methods defined inside.</p>
<p>Imagine that you want to use some generator for SOAP methods to auto-generate your client-side classes end entities for consuming web services.<br />
When using WSDL generated for API v1, we could just generate those few methods which will not tell to our source code generator what methods are available, and what parameters for each methods can we use, what entities we should have on client side &#8230; but if we are consuming web services through v2 API, it&#8217;s already served for us inside WSDL&#8230;</p>
<p><strong>Conclusion:</strong></p>
<p>When using Magento v1 API, we access resources via call method and provide API method name and parameters as parameters of call method.</p>
<p>When using Magento v2 API, we access resources via real method name and we provide parameters as defined in WSDL for each specific method.</p>
<p>OK. When we got this difference, and showed how to consume SOAP, let&#8217;s focus on creating own web service methods compatible with API v2.</p>
<h2>Practical example: Creating own API v2 method</h2>
<h4>Basic steps:</h4>
<p>1. Create Magento Extension (we are not going explain here how to do it)<br />
2. Create Model for API method<br />
3. Create and configure api.xml file<br />
4. Create wsdl.xml file (with proper definitions)<br />
5. Create wsi.xml file (with proper definitions) (OPTIONAL)</p>
<h4>Creating Model for API v2</h4>
<p>After properly configuring our config.xml it looks like this:</p>
<pre class="brush: php; title: ; notranslate">

&lt;?xml version=&quot;1.0&quot;?&gt;

&lt;config&gt;
   &lt;modules&gt;
      &lt;Inchoo_Mapy&gt;
         &lt;version&gt;1.0.1&lt;/version&gt;
      &lt;/Inchoo_Mapy&gt;
   &lt;/modules&gt;
   &lt;global&gt;
      &lt;models&gt;
         &lt;inchoo_mapy&gt;
             &lt;class&gt;Inchoo_Mapy_Model&lt;/class&gt;
         &lt;/inchoo_mapy&gt;
      &lt;/models&gt;
   &lt;/global&gt;
&lt;/config&gt;
</pre>
<p>Let&#8217;s navigate through Magento core files to see where Magento API models are in file-system:</p>
<p><a href="http://inchoo.net/wp-content/uploads/2012/04/CoreApiModelsLocation.jpg"><img class="aligncenter size-full wp-image-13648" title="CoreApiModelsLocation" src="http://inchoo.net/wp-content/uploads/2012/04/CoreApiModelsLocation.jpg" alt="" width="609" height="398" /></a></p>
<p>Since we are going to use API v2 only, We will create our model like this:</p>
<p><a href="http://inchoo.net/wp-content/uploads/2012/04/ModelLocation.jpg"><img class="aligncenter size-full wp-image-13650" title="ModelLocation" src="http://inchoo.net/wp-content/uploads/2012/04/ModelLocation.jpg" alt="" width="274" height="235" /></a></p>
<pre><a href="http://inchoo.net/wp-content/uploads/2012/04/ModelSource.jpg"><img class="aligncenter size-full wp-image-13657" title="ModelSource" src="http://inchoo.net/wp-content/uploads/2012/04/ModelSource.jpg" alt="" width="609" height="411" /></a></pre>
<h4>Creating and configuring api.xml</h4>
<p>The easiest way is to copy/paste one of Magento&#8217;s api.xml files in our etc folder and make changes there to suit our needs. Our final api.xml should look like this:</p>
<pre class="brush: php; title: ; notranslate">

&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;config&gt;
   &lt;api&gt;
     &lt;resources&gt;
     &lt;!-- START GUSTOMER GROUP RESOURCES --&gt;
       &lt;mapy_customer_group&gt;
            &lt;model&gt;inchoo_mapy/customer_group_api&lt;/model&gt;
            &lt;title&gt;Inchoo Customer's Groups API&lt;/title&gt;
            &lt;acl&gt;mapy_data&lt;/acl&gt;
            &lt;methods&gt;
              &lt;list translate=&quot;title&quot; module=&quot;inchoo_mapy&quot;&gt;
                  &lt;title&gt;Retrieve customer groups&lt;/title&gt;
                  &lt;method&gt;mapyItems&lt;/method&gt;
              &lt;/list&gt;
            &lt;/methods&gt;
       &lt;/mapy_customer_group&gt;
     &lt;!-- END CUSTOMER GROUP RESOURCES --&gt;
    &lt;/resources&gt;
    &lt;v2&gt;
      &lt;resources_function_prefix&gt;
           &lt;mapy_customer_group&gt;mapy_customerGroup&lt;/mapy_customer_group&gt;
           &lt;/resources_function_prefix&gt;
    &lt;/v2&gt;
    &lt;acl&gt;
       &lt;resources&gt;
           &lt;mapy_data translate=&quot;title&quot; module=&quot;inchoo_mapy&quot;&gt;
              &lt;title&gt;Mapy data&lt;/title&gt;
              &lt;sort_order&gt;3&lt;/sort_order&gt;
           &lt;/mapy_data&gt;
       &lt;/resources&gt;
    &lt;/acl&gt;
  &lt;/api&gt;
&lt;/config&gt;
</pre>
<p>Here is logic that has to be implemented in api.xml file. Api.xml file basically connects API calls with php methods inside specific models. Also, the ACL resources are defined here for specific api call.</p>
<p><a href="http://inchoo.net/wp-content/uploads/2012/04/api_xml_explained.jpg"><img class="aligncenter size-medium wp-image-13659" title="api_xml_explained" src="http://inchoo.net/wp-content/uploads/2012/04/api_xml_explained-600x414.jpg" alt="" width="600" height="414" /></a></p>
<h4>Creating wsdl.xml file</h4>
<p>When working with wsdl.xml and wsi.xml later, if you are happy NetBeans user, I strongly suggest you to search on Google and download the XML Tools plug-in that can make life much easier &#8230;</p>
<p>There are few things that we have to fill-in when creating wsdl.xml.</p>
<ul>
<li>Bindings</li>
<li>Port types</li>
<li>Messages</li>
<li>Types / Complex types</li>
</ul>
<p>Also, it&#8217;s easier to copy one of Magento&#8217;s wsdl files, paste it in our etc folder and remove unnecessary things and add our own inside.</p>
<p>Here is NetBeans &#8211; XML Tools screen-shot how this look like:</p>
<p><a href="http://inchoo.net/wp-content/uploads/2012/04/wsdl_struct.jpg"><img class="aligncenter size-medium wp-image-13664" title="wsdl_struct" src="http://inchoo.net/wp-content/uploads/2012/04/wsdl_struct-600x430.jpg" alt="" width="600" height="430" /></a></p>
<p>This  image is showing logic and direction how should we fill-in wsdl.xml:</p>
<p><a href="http://inchoo.net/wp-content/uploads/2012/04/wsdl_filling.jpg"><img class="aligncenter size-medium wp-image-13669" title="wsdl_filling" src="http://inchoo.net/wp-content/uploads/2012/04/wsdl_filling-600x393.jpg" alt="" width="600" height="393" /></a></p>
<p>Let&#8217;s now look at real xml source:</p>
<p><a href="http://inchoo.net/wp-content/uploads/2012/04/Bindings.jpg"><img class="aligncenter size-medium wp-image-13677" title="Bindings" src="http://inchoo.net/wp-content/uploads/2012/04/Bindings-600x416.jpg" alt="" width="600" height="416" /></a></p>
<p><a href="http://inchoo.net/wp-content/uploads/2012/04/Port-types.jpg"><img class="aligncenter size-medium wp-image-13678" title="Port types" src="http://inchoo.net/wp-content/uploads/2012/04/Port-types-600x391.jpg" alt="" width="600" height="391" /></a></p>
<p><a href="http://inchoo.net/wp-content/uploads/2012/04/Messages.jpg"><img class="aligncenter size-medium wp-image-13679" title="Messages" src="http://inchoo.net/wp-content/uploads/2012/04/Messages-600x373.jpg" alt="" width="600" height="373" /></a></p>
<p><a href="http://inchoo.net/wp-content/uploads/2012/04/complex-types.jpg"><img class="aligncenter size-medium wp-image-13680" title="complex types" src="http://inchoo.net/wp-content/uploads/2012/04/complex-types-600x449.jpg" alt="" width="600" height="449" /></a></p>
<p>After we finished with wsdl, let&#8217;s go to <strong>http://ourmagento/api/v2_soap/?wsdl=1</strong> to see changes in global wsdl we made. (<strong>Don&#8217;t forget to clear cache first!</strong>).</p>
<p>We can see that all wsdl.xml files including ours are rendered as single.</p>
<p>All available wsdl definitions for current Magento installations are shown and our definitions should be there.</p>
<p>Now we are ready to use our newly created SOAP method.</p>
<p>But, if we want use some generator for client classes with that, for example <a href="http://sudzc.com" target="_blank">SUDZC</a> (http://sudzc.com) we need to make one more thing in order to make it possible&#8230;</p>
<h4>WSI</h4>
<p>- WSI is in basic compatibility layer for different frameworks and provides a little bit more information that can be used for example with XSLT to transform definitions into our client source code.<br />
- It&#8217;s not essential in order web services to work.<br />
- It is rendered when: Magento admin: System/Configuration/Services/Magento core API/WSI-Compliance configuration value is set to “YES”.</p>
<p>We could say that following sections we have to fill-in inside, in order to add our definitions properly:</p>
<ul>
<li>Bindings</li>
<li>Port types</li>
<li>Messages</li>
<li>Types / elements</li>
<li>Types / complex types</li>
</ul>
<p>Let&#8217;s copy/paste one of Magento&#8217;s wsi.xml inside our etc folder first. After that, let&#8217;s delete all unnecessary definitions for our SOAP method.</p>
<p>Adding definitions inside WSI except for slightly different definitions are basically the same as for wsdl.xml. If you are using existing wsi.xml, it&#8217;s easy to delete unnecessary and rename few nodes to suit your needs. Just follow the rule to fill all of this in the above list (Bindings, Port types &#8230; ).</p>
<p><a href="http://inchoo.net/wp-content/uploads/2012/04/SOAP_xml.zip">Here you can download archive with basic wsdl.xml, wsi.xml, api.xml so you can easier start writing</a> your own web service methods. Just put these files in your etc folder, rename appropriate things with your own and that&#8217;s it.</p>
<p>That would be all for now. If interested in Magento API, stay tuned.</p>
<p>Cheers <img src='http://inchoo.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/ecommerce/magento/magento-v2-soap-demystified/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Develop your own Magento mobile application</title>
		<link>http://inchoo.net/ecommerce/magento/develop-your-own-magento-mobile-application/</link>
		<comments>http://inchoo.net/ecommerce/magento/develop-your-own-magento-mobile-application/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 12:49:42 +0000</pubDate>
		<dc:creator>Ivica Tadic</dc:creator>
				<category><![CDATA[Android development]]></category>
		<category><![CDATA[iPhone development]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[Mobile development]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[mobile]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=10135</guid>
		<description><![CDATA[Hi everybody. Do you want to develop your own Magento mobile application? Great! I&#8217;ll give you some pointers on how to get a grasp on Magento&#8217;s XMLConnect, an extension that &#8230;]]></description>
			<content:encoded><![CDATA[<p>Hi everybody.</p>
<p>Do you want to develop your own Magento mobile application?</p>
<p>Great! I&#8217;ll give you some pointers on how to get a grasp on Magento&#8217;s <strong>XMLConnect</strong>, an extension that serves Magento Mobile application.<br />
<span id="more-10135"></span><br />
Keep in mind that XMLConnect extension comes &#8216;preinstalled&#8217; in Magento CE 1.5 and later, but you can get it from Magento Connect.</p>
<h2>The Big Picture</h2>
<p>Awhile ago, Magento Mobile was released for iPhone, iPad and Android devices. It consists of two parts: a Magento web store with an XMLConnect extension installed and configured, and a native application itself.</p>
<p>XMLConnect extension&#8217;s purpose here is to serve your application with requested data (category listing, product information, etc.) and execute desired actions (buy, log in, checkout, etc.).<br />
Basically, application sends a request (plain HTTP GET/POST) to your Magento store (XMLConnect) and it responds with an XML result.</p>
<p>The best way to get familiar with XMLConnect is to see it in action:</p>
<p>1) Set up a Magento store on your web server with some sample data<br />
2) In <strong>Magento admin-&gt;Mobile-&gt;Manage Apps</strong> add a new mobile application<br />
3) Install Magento Mobile on your device<br />
4) Start Magento Mobile on your device with your Magento store url and the app code of the application you just created in <strong>Magento admin-&gt;Mobile</strong></p>
<p><a rel="attachment wp-att-10141" href="http://inchoo.net/ecommerce/magento/develop-your-own-magento-mobile-application/attachment/start/"><img class="aligncenter size-full wp-image-10141" title="Magento Mobile login" src="http://inchoo.net/wp-content/uploads/2011/07/start.png" alt="" width="264" height="440" /></a></p>
<p>While exploring Magento Mobile, keep an eye on (Apache) activity log file to see exactly what the application is requesting from the server.<br />
For instance, the first request would probably be the application <strong>configuration</strong> request.</p>
<p><strong>/xmlconnect/configuration/index/app_code/defand1/screen_size/480&#215;800</strong></p>
<p>We recognize in this request an app code (in this example it is &#8220;defand1&#8243;) and your device&#8217;s screen size (here it&#8217;s &#8220;480&#215;800&#8243;).<br />
Let&#8217;s check out what is the result of this request. In your browser navigate to:</p>
<p><strong>http://magentoivica.loc/xmlconnect/configuration/index/app_code/defand1/screen_size/480&#215;800</strong><br />
(obviously, replace &#8220;magentoivica.loc&#8221; with your web server name. Recognize the rest of the url?)</p>
<p>Voilá, what you should get is an entire configuration of your app (as it is set in your Magento admin) in an XML format.</p>
<p>Using this practice, you can easily explore most of the capabilities of XMLConnect. Also, it may be necessary to get into the code of XMLConnect if you want to master some of the more advanced actions (such as the checkout process).</p>
<p>Ok, now you know basics of using XMLConnect, how to make a request and what to expect as a result. But, how to use this information in an Android (Java) environment?</p>
<p>You probably already know something about <strong>parsing XML data</strong>. I will show you a better way (probably) which will allow you to have more <strong>modularity</strong> and <strong>sustainability</strong> in an Android application development.</p>
<p>So, stay tuned <img src='http://inchoo.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/ecommerce/magento/develop-your-own-magento-mobile-application/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Improve your spelling skills while having lots of fun!</title>
		<link>http://inchoo.net/tools-frameworks/improve-your-spelling-skills-while-having-lots-of-fun/</link>
		<comments>http://inchoo.net/tools-frameworks/improve-your-spelling-skills-while-having-lots-of-fun/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 12:47:34 +0000</pubDate>
		<dc:creator>Toni Anicic</dc:creator>
				<category><![CDATA[iPhone development]]></category>
		<category><![CDATA[Tools & Frameworks]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=5338</guid>
		<description><![CDATA[Our friends and coworkers at Surgeworks Mobile released an awesome iPhone game application called &#8220;Letter Blocks World&#8220;. We are playing with it for days now and having lots of fun! &#8230;]]></description>
			<content:encoded><![CDATA[<p>Our friends and coworkers at Surgeworks Mobile released an awesome iPhone game application called <strong>&#8220;<a href="http://surgeworksmobile.com/feature/letterblocks/">Letter Blocks World</a>&#8220;</strong>. We are playing with it for days now and having lots of fun!<span id="more-5338"></span></p>
<p><a href="http://itunes.apple.com/us/app/letter-blocks-world-word-game/id387904242?mt=8"><img src="http://inchoo.net/wp-content/uploads/2010/09/appstore.jpg" alt="" title="appstore" width="213" height="78" align="right" style="margin-left:7px;" /></a>There are lots of people that visit inchoo.net who are not natural English speakers. This game will be awesome for you. You&#8217;ll start thinking about all sorts of different words and hopefully learn how to spell them correctly. But it is not all about learning, this game is fun! There are 3 different mods you can play with: Story Mode, Arcade Mode and Clear the Board.</p>
<h3>Story Mode</h3>
<p>An increasingly challenging game with 15 levels and a different target for each level. Reach the target score or compose the number of words required to complete the level before the time runs out! Conquer all 5 Letter Block Worlds by completing the 15 levels in one game. Don’t let the board fill in or you’ll loose the game!</p>
<h3>Arcade Mode</h3>
<p>Freestyle in a random world. The higher you score, the faster blocks will fall on the board. How long will you last? Challenge the your friends to beat your high score through the Open Feint gaming network!</p>
<h3>Clear the Board</h3>
<p>Look! A board full of blocks! Can you clean it up without shaking the device to get more blocks? Achieve that to enter the global high scores for this game mode!</p>
<h3>Warning: Magento is NOT a word. xD</h3>
<p>You can <a href="http://itunes.apple.com/us/app/letter-blocks-world-word-game/id387904242?mt=8">buy the app here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/tools-frameworks/improve-your-spelling-skills-while-having-lots-of-fun/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to get some awesome code for your iPhone apps</title>
		<link>http://inchoo.net/mobile-development/iphone-development/how-to-get-some-awesome-code-for-your-iphone-apps/</link>
		<comments>http://inchoo.net/mobile-development/iphone-development/how-to-get-some-awesome-code-for-your-iphone-apps/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 11:53:43 +0000</pubDate>
		<dc:creator>Toni Anicic</dc:creator>
				<category><![CDATA[iPhone development]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[tag]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=5000</guid>
		<description><![CDATA[Our &#8220;sister&#8221; company Surgeworks Mobile just launched an online store selling components for iPhone, iPod touch and iPad applications. The store is located here and it&#8217;s currently featuring two products: &#8230;]]></description>
			<content:encoded><![CDATA[<p>Our &#8220;sister&#8221; company <a href="http://surgeworksmobile.com">Surgeworks Mobile</a> just launched an online store selling components for iPhone, iPod touch and iPad applications. <span id="more-5000"></span></p>
<p><a href="http://surgeworksmobile.com/shop">The store is located here</a> and it&#8217;s currently featuring two products: </p>
<ul>
<li>A completely free <a href="http://surgeworksmobile.com/shop/review-alert-for-iphone-sdk">Review Alert component for iPhone SDK</a> that gives you the ability to pop-up an alert after a chosen period of time, asking user to review the app.</li>
<li>A <a href="http://surgeworksmobile.com/shop/tag-cloud-component-for-iphone-sdk">3D Tag Cloud Component for iPhone SDK</a>, with a special launch discount of 50% available for only $ 49.00 USD!
</li>
</ul>
<p>We hope many more useful code libraries will be released on Surgeworks Mobile&#8217;s shop as the time passes by, so make sure you stay tuned to the links above.</p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/mobile-development/iphone-development/how-to-get-some-awesome-code-for-your-iphone-apps/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Prayer App website launched</title>
		<link>http://inchoo.net/mobile-development/iphone-development/prayer-app-website-launched/</link>
		<comments>http://inchoo.net/mobile-development/iphone-development/prayer-app-website-launched/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 12:57:30 +0000</pubDate>
		<dc:creator>Tomislav Bilic</dc:creator>
				<category><![CDATA[iPhone development]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=4765</guid>
		<description><![CDATA[Mobile Apps team launched a Prayer website as a support for the most complete prayer database available for the iPhone, iPod Touch and iPad. The app is Easy-to-use, multi-language Christian &#8230;]]></description>
			<content:encoded><![CDATA[<p><a href="http://surgeworksmobile.com/">Mobile Apps team</a> launched a <a href="http://praywith.us.com/">Prayer website</a> as a support for the most complete prayer database available for the iPhone, iPod Touch and iPad. The app is Easy-to-use, multi-language Christian Prayers database. The ultimate reference to Catholic Prayers for your iPhone and iPod Touch! The App can work without an Internet connection and provided users with access to 1,000+ prayers in English. It also contains over 100 prayers in Italian and the most popular prayers in Latin, Spanish, French, German and Portuguese. The newest version of the app also features “favorites” and “search” functionality.<br />
<span id="more-4765"></span></p>
<p><a href="http://praywith.us.com/"><img class="aligncenter size-full wp-image-4769" title="Prayer, Catholic Prayers Database" src="http://inchoo.net/wp-content/uploads/2010/06/prayer.jpg" alt="Prayer, Catholic Prayers Databas" width="600" height="297" /></a></p>
<p><a href="http://liturgy-of-the-hours.com/iphoneapp/prayers"><img class="alignnone" title="Available on the iPhone App Store" src="http://praywith.us.com/images/appstorelight.png" alt="Available on the iPhone App Store" width="198" height="64" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/mobile-development/iphone-development/prayer-app-website-launched/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Surgeworks Mobile launched!</title>
		<link>http://inchoo.net/mobile-development/iphone-development/surgeworks-mobile-launched/</link>
		<comments>http://inchoo.net/mobile-development/iphone-development/surgeworks-mobile-launched/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 13:33:30 +0000</pubDate>
		<dc:creator>Toni Anicic</dc:creator>
				<category><![CDATA[iPhone development]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[mobile]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=4210</guid>
		<description><![CDATA[Surgeworks has grown into a pretty big company with several different teams and areas of expertise. In an effort to make it clear for the website visitors what the company &#8230;]]></description>
			<content:encoded><![CDATA[<p>Surgeworks has grown into a pretty big company with several different teams and areas of expertise. In an effort to make it clear for the website visitors what the company does, we started separating teams into different &#8220;micro-brands&#8221;. <span id="more-4210"></span></p>
<p>First of these brands was Inchoo, dedicated to e-commerce design, development, and marketing. It&#8217;s been a while since we figured out that we need a separate micro-brand such as Inchoo for our mobile application development services, and today, we present you the <strong><a href="http://surgeworksmobile.com/">Surgeworks Mobile website</a></strong>.</p>
<p><img class="alignnone size-full wp-image-4212" title="Surgeworks" src="http://inchoo.net/wp-content/uploads/2010/03/mobilesurgeworks.jpg" alt="" width="620" height="233" /></p>
<p>Surgeworks Mobile is a web presentation of our mobile applications development unit. Homepage, much like Inchoo, features new blog posts. We hope some of our loyal readers here at Inchoo that are also interested in the mobile application development will like the content over there and start following that blog as well.</p>
<p>Site also features the <a href="http://surgeworksmobile.com/apps">mobile applications</a> that the team already did and there are sections describing the <a href="http://surgeworksmobile.com/services">services</a> and the <a href="http://surgeworksmobile.com/team">team</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/mobile-development/iphone-development/surgeworks-mobile-launched/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ShoutEm iPhone app on App Store</title>
		<link>http://inchoo.net/mobile-development/iphone-development/shoutem-iphone-app-on-app-store/</link>
		<comments>http://inchoo.net/mobile-development/iphone-development/shoutem-iphone-app-on-app-store/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 08:51:04 +0000</pubDate>
		<dc:creator>Ivan Kalaica</dc:creator>
				<category><![CDATA[iPhone development]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[ShoutEm]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=3321</guid>
		<description><![CDATA[Once again I can proudly say one more application is finished and from first attempt approved by Apple. On this project I was working on user interface development part with &#8230;]]></description>
			<content:encoded><![CDATA[<p>Once again I can proudly say one more application is finished and from first attempt approved by Apple. On this project I was working on user interface development part with all user interaction logic. To reduced, everything you see and feel. Just to clarify, I am still working on same project and we are preparing second version which has many surprises. <span id="more-3321"></span>Bellow you can read few words from ShoutEm company about this fine product.</p>
<p><em>The ShoutEm iPhone app is actually two apps in one: it’s a fully functional Twitter client, but in addition to Twitter, you can also use it to read and write posts to twitter_timelineany of the networks on ShoutEm, as well as StatusNet, the open source microblogging service.</em></p>
<p><em>For example, let’s say that you’ve created a network on ShoutEm for your coworkers, but you also have two accounts on Twitter. With the ShoutEm iPhone application, you can easily read the posts and write new ones for all three networks, all from one place.</em></p>
<p><img class="aligncenter size-full wp-image-3327" title="shout_thumb_1" src="http://inchoo.net/wp-content/uploads/2009/11/shout_thumb_1.jpg" alt="shout_thumb_1" width="224" height="320" /><img class="aligncenter size-full wp-image-3326" title="users_profile" src="http://inchoo.net/wp-content/uploads/2009/11/users_profile.jpg" alt="users_profile" width="224" height="320" /></p>
<p><em>Here are the most important features of the ShoutEm iPhone application:</em></p>
<p><em>* handle multiple accounts on your favorite microblogging networks: ShoutEm, Twitter or StatusNet (Laconi.ca)<br />
* browse through your friend’s statuses, public statuses or mentions<br />
* update your status (with photo or location attached)<br />
* explore user profiles, their followers or statuses/tweets<br />
* follow or stop following users<br />
* explore received or sent private messages; write direct messages to users<br />
* track conversations in our threaded view (ShoutEm specific)<br />
* status search</em></p>
<p><a href="http://itunes.apple.com/hr/app/shoutem/id340195913?mt=8" target="_blank">Click here to download ShoutEm iPhone app for FREE</a></p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/mobile-development/iphone-development/shoutem-iphone-app-on-app-store/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Memory leak by CFNetwork?</title>
		<link>http://inchoo.net/mobile-development/iphone-development/memory-leak-by-cfnetwork/</link>
		<comments>http://inchoo.net/mobile-development/iphone-development/memory-leak-by-cfnetwork/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 09:53:07 +0000</pubDate>
		<dc:creator>Ivan Kalaica</dc:creator>
				<category><![CDATA[iPhone development]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=3139</guid>
		<description><![CDATA[It&#8217;s been a while since I wrote my last post. Since then I got married, completed faculty, finished three iPhone applications for clients and three internal. Well, these are the &#8230;]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a while since I wrote my last post. Since then I got married, completed faculty, finished three iPhone applications for clients and three internal. Well, these are the main reasons for my absence and I think they are justified. <img src='http://inchoo.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <span id="more-3139"></span></p>
<p>Now lets get back on memory leak issue created by CFNetwork class. If you create NSURLConnection object you will get this memory leak. First time I meet with this issue I was thinking it was my fault as developer, but when I tracked leak I realized that memory leak is created by framework internally. Instruments tool says clearly &#8211; &#8220;Responsible caller &#8211; CFNetwork&#8221;.</p>
<p>Well, this is my own conclusion and I might not be right but considering all given facts the leak is created by CFNetwork class. Also, I am not only one developer that has same issue. Many of iPhone developers has complain on same memory leak created by CFNetwork class. To solve this issue I try to put autoreleas pool like code below but no luck.</p>
<p>NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];<br />
&#8230;<br />
[pool release];</p>
<p>Also I tried to create NSURLCache object like code below but no luck.</p>
<p>NSURLCache *sharedCache = [[NSURLCache alloc] initWithMemoryCapacity:0 diskCapacity:0 diskPath:nil];<br />
[NSURLCache setSharedURLCache:sharedCache];<br />
[sharedCache release];</p>
<p>If any of you has meet similar issue or maybe has solution for this memory leak please leave comment bellow. Thanks! <img src='http://inchoo.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/mobile-development/iphone-development/memory-leak-by-cfnetwork/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>MATHO &#8211; iPhone game from Surgeworks workshop</title>
		<link>http://inchoo.net/mobile-development/iphone-development/matho-iphone-game-from-surgeworks-workshop/</link>
		<comments>http://inchoo.net/mobile-development/iphone-development/matho-iphone-game-from-surgeworks-workshop/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 21:07:33 +0000</pubDate>
		<dc:creator>Tomislav Bilic</dc:creator>
				<category><![CDATA[iPhone development]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=3067</guid>
		<description><![CDATA[Surgeworks recently developed a new MATHO 2 for the iPhone/iPod Touch. It is a BINGO style math game for students grades K-12 developed for Education 4 Free, LLC. The goal of MATHO is to get five correct answers in a row as quickly as possible, either horizontally, vertically or diagonally. The problem is placed at the top of the screen and the player must select the correct answer on the gameboard. Each incorrect answer results in a penalty of five seconds. The score at the end of the game is the total time to complete MATHO, so the best scores are the lowest.]]></description>
			<content:encoded><![CDATA[<p>Surgeworks recently developed a new MATHO 2 for the iPhone/iPod Touch. It is a BINGO style math game for students grades K-12 developed for Education 4 Free, LLC. The goal of MATHO is to get five correct answers in a row as quickly as possible, either horizontally, vertically or diagonally. The problem is placed at the top of the screen and the player must select the correct answer on the gameboard. Each incorrect answer results in a penalty of five seconds. The score at the end of the game is the total time to complete MATHO, so the best scores are the lowest.<br />
<span id="more-3067"></span><br />
The player can choose game types of Addition, Subtraction, Multiplication or Division. The difficulty can be set to Easy, Medium, Hard and Custom. The Easy difficulty poses problems with values up to 8, Medium up to 12 and Hard up to 20. Custom difficulty allows the player to choose the maximum values for N1 and N2, and the resulting difficulty is the sum of these values. High scores are stored locally and globally. Local scores are the top 8 scores from games played on the player’s device. Global scores are submitted from all players around the world.</p>
<p><img class="size-full wp-image-3069" title="Matho Screens" src="http://inchoo.net/wp-content/uploads/2009/10/matho02.jpg" alt="Matho Game Screencast" width="620" height="433" /></p>
<p>View more images on <a href="http://surgeworks.com/our-work/matho-iphone-game-design-and-development/">Surgeworks website</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/mobile-development/iphone-development/matho-iphone-game-from-surgeworks-workshop/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Two great API’s for your iPhone app!</title>
		<link>http://inchoo.net/mobile-development/iphone-development/two-great-apis-for-your-iphone-app/</link>
		<comments>http://inchoo.net/mobile-development/iphone-development/two-great-apis-for-your-iphone-app/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 09:55:37 +0000</pubDate>
		<dc:creator>Ivan Kalaica</dc:creator>
				<category><![CDATA[iPhone development]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=2706</guid>
		<description><![CDATA[If you want to ensure best user experience for your app users you just must integrate this two API in your app. First of two is Get Satisfaction iPhone API. &#8230;]]></description>
			<content:encoded><![CDATA[<p>If you want to ensure best user experience for your app users you just must integrate this two API in your app. First of two is Get Satisfaction iPhone API. Satisfaction Remote Component enables iPhone developers to embed support for Get Satisfaction within their apps. This works somewhat like the &#8220;Feedback&#8221; widget on many websites (example on <a href="http://getsatisfaction.com/">getsatisfaction.com</a> homepage). Briefly, this API is integrates feedback forum for user.<span id="more-2706"></span> It has all features like one on websites and it is very confident. For one that doesn&#8217;t know what GS Remote Component is here you can find little more information about this great API. </p>
<p><a href="http://code.google.com/p/satisfactionremotecomponent/">http://code.google.com/p/satisfactionremotecomponent/</a> </p>
<p>Flurry Analytics iPhone API is second one. This is really great API that every better developer would integrate. This API is analytics tool for iphone application which provides complete insight analysis of the every app utilization and not just for iPhone platform. Here is little info about it: &#8220;Flurry Analytics provides accurate, real time data to developers about how consumers use their mobile applications, as well as how applications are performing across different handsets. Application developers receive aggregated usage and performance data, as well as robust reporting and analysis tools. With this data, developers can identify issues and opportunities, create a more informed product roadmap, increase retention and grow their user base.&#8221; You can find more info on this link. </p>
<p><span><a href="http://www.flurry.com/product/index.html">http://www.flurry.com/product/index.html</a></span></p>
<p>From past experience I can confirm that our app users are very satisfied with services that these two tools give them, together with us.</p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/mobile-development/iphone-development/two-great-apis-for-your-iphone-app/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to check internet connection reachability in wireless local area network?</title>
		<link>http://inchoo.net/mobile-development/iphone-development/how-to-check-internet-connection-reachability-in-wireless-local-area-network/</link>
		<comments>http://inchoo.net/mobile-development/iphone-development/how-to-check-internet-connection-reachability-in-wireless-local-area-network/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 08:41:05 +0000</pubDate>
		<dc:creator>Ivan Kalaica</dc:creator>
				<category><![CDATA[iPhone development]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[LAN]]></category>
		<category><![CDATA[wireless]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=2577</guid>
		<description><![CDATA[You think you will find answer on this question here? I am sorry to disappoint but you are not going to find right answer here. Here you will find ways &#8230;]]></description>
			<content:encoded><![CDATA[<p>You think you will find answer on this question here? I am sorry to disappoint but you are not going to find right answer here. Here you will find ways how you can not check internet connection reachability in some wireless local area network. <img src='http://inchoo.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  <span id="more-2577"></span></p>
<p>I know you will now say there is &#8220;Reachability&#8221; named sample app at developer connect library to download, but it ain&#8217;t what I am looking for. What I am looking for is feature that will tell me do I have internet connection while I have network connection, to be more accurate, do I have internet connection while I am connected to some wireless local area network? I know, some of you will now say: &#8220;Well you can make NSURLConnection and wait for didFailWithError or connectionDidFinishLoading delegate methods&#8221;. Yeah, but this again ain&#8217;t what I am looking for.</p>
<p>What I was really looking for is something like pinging some host. Again, you will now say: &#8220;Well, you might don&#8217;t know but Reachability sample app has way to test reachability of given host.&#8221; Yeah, but this again ain&#8217;t what I am looking for.</p>
<p>I just hope that Apple&#8217;s developers will soon add some really easy way to do something like this. Please don&#8217;t hesitate to leave comments, and please tell me I am wrong on this one and easy way really exist. Please that I am blind as mole and I can&#8217;t see! <img src='http://inchoo.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/mobile-development/iphone-development/how-to-check-internet-connection-reachability-in-wireless-local-area-network/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>How to save UIImage into iPhone&#8217;s saved photos album?</title>
		<link>http://inchoo.net/mobile-development/iphone-development/how-to-save-uiimage-into-iphones-saved-photos-album/</link>
		<comments>http://inchoo.net/mobile-development/iphone-development/how-to-save-uiimage-into-iphones-saved-photos-album/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 11:41:25 +0000</pubDate>
		<dc:creator>Ivan Kalaica</dc:creator>
				<category><![CDATA[iPhone development]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=2456</guid>
		<description><![CDATA[This is quite simple, infact it is one row code like everything else in iPhone development. Well, not everything is &#8220;quite&#8221; simple as this but most of stuff is &#8220;quite&#8221; &#8230;]]></description>
			<content:encoded><![CDATA[<p>This is quite simple, infact it is one row code like everything else in iPhone development. Well, not everything is &#8220;quite&#8221; simple as this but most of stuff is &#8220;quite&#8221; easy to implement. Enough with &#8220;quite&#8221; ! Here is really simple code;<span id="more-2456"></span></p>
<pre class="brush: cpp; title: ; notranslate">UIImage *myImage = [UIImage imageNamed:@&quot;me.png&quot;];

UIImageWriteToSavedPhotosAlbum(myImage, self, @selector(image:didFinishSavingWithError:contextInfo:), nil);

// And if you wish add this selector method in code;

- (void) image:(UIImage*)image didFinishSavingWithError:(NSError *)error contextInfo:(NSDictionary*)info;</pre>
<p>That&#8217;s all you have to add! Quite simple, is it? <img src='http://inchoo.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/mobile-development/iphone-development/how-to-save-uiimage-into-iphones-saved-photos-album/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to override UIWebView links request action with your own custom method</title>
		<link>http://inchoo.net/mobile-development/iphone-development/how-to-override-uiwebview-links-request-action-with-your-own-custom-method/</link>
		<comments>http://inchoo.net/mobile-development/iphone-development/how-to-override-uiwebview-links-request-action-with-your-own-custom-method/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 11:55:54 +0000</pubDate>
		<dc:creator>Ivan Kalaica</dc:creator>
				<category><![CDATA[iPhone development]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[method]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=2302</guid>
		<description><![CDATA[If you did not understand from the post title what I am trying to say, here is another explanation. If you have an instance of UIWebView class implemented in your &#8230;]]></description>
			<content:encoded><![CDATA[<p>If you did not understand from the post title what I am trying to say, here is another explanation. If you have an instance of UIWebView class implemented in your view and you want to call one of your custom method when user clicks on link in that <span id="more-2302"></span>UIWebView instance, first thing you must do to achieve that is set the delegate of that UIWebView class instance on you instance of UIViewController class. This is almost in same time last thing. Now just copy&amp;paste this code into your class that implements UIWebView instance and add call to your method.</p>
<pre class="brush: cpp; title: ; notranslate">- (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType {

if(navigationType == UIWebViewNavigationTypeLinkClicked) {

if (overrideLinksSwitch.on == TRUE) {

[self myMethodAction];

[myWebView stopLoading];

return YES;
}

else {
return YES;
}
}

return YES;
}</pre>
<p>You can download example app <a href="http://inchoo.net/wp-content/uploads/2009/06/WebViewLink.zip">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/mobile-development/iphone-development/how-to-override-uiwebview-links-request-action-with-your-own-custom-method/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Interview with Ivan Kalaica</title>
		<link>http://inchoo.net/mobile-development/iphone-development/interview-with-ivan-kalaica-iphone-expert/</link>
		<comments>http://inchoo.net/mobile-development/iphone-development/interview-with-ivan-kalaica-iphone-expert/#comments</comments>
		<pubDate>Thu, 07 May 2009 20:01:08 +0000</pubDate>
		<dc:creator>Tomislav Bilic</dc:creator>
				<category><![CDATA[iPhone development]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=1577</guid>
		<description><![CDATA[Zec Online Jornal made an interview few weeks ago with our iPhone developer: Ivan Kalaica. The interview covered Ivan's motivation to work on iPhone projects, our partnership with Surgeworks, our portfolio and many other topics.  Recently Ivan started to write a blog in Croatian language about iPhone development: inchoo.hr. His work became recognized in local market and got some media attention.]]></description>
			<content:encoded><![CDATA[<p><a rel="nofollow" href="http://zecina.blogspot.com/2009/04/one-of-most-interesting-software-sales.html">Zec Online Jornal</a> made an interview few weeks ago with our iPhone developer: Ivan Kalaica. The interview covered Ivan&#8217;s motivation to work on iPhone projects, our partnership with <a rel="nofollow" href="http://surgeworks.com/" target="_blank">Surgeworks</a>, our portfolio and many other topics.  Recently Ivan started to write a blog in Croatian language about iPhone development: <a href="http://inchoo.hr/" target="_blank">inchoo.hr</a>. His work became recognized in local market and got some media attention.</p>
<p><span id="more-1577"></span>Here are some of the questions:</p>
<p><span class="rss:item"><span style="font-weight: bold;">One of the most interesting software <a href="http://www.apple.com/itunes/billion-app-countdown/">sales</a> environments on the planet  is <a href="http://www.apple.com/iphone/">iPhone</a>. Why <a href="http://app-store.appspot.com/">programs</a> on the phone ? Do these small programs/apps on the phone make our World better place ? Is this a secret for success ? Why now and not before few years ? </span></span></p>
<p>Answer is fairly simple. It’s simple and it is Apple’s. You can make very <a href="http://blog.wired.com/gadgets/2008/09/indie-developer.html">good money</a> programming software for iPhone and have fun at the same time. Just like I do now. Apple makes world better place. <img src='http://inchoo.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Just kidding but there is still some small amount of true in that sentence.</p>
<p><span class="rss:item"><span style="font-weight: bold;">Why iPhone mobile platform is your choice and since when you are developing apps for iPhone ?</span></span></p>
<p><a href="../">Inchoo</a> company gave me a chance to work along with <a href="http://surgeworks.com/">Surgeworks</a> company on iPhone development in October last year. I accepted the offer and I’m satisfied now I made that decision then. In beginning it was maybe little hard but now I can say I am happy I have then decided to work along with these great people.</p>
<p><span class="rss:item">Read the rest of interview at this URL:<br />
<a href="http://zecina.blogspot.com/2009/04/one-of-most-interesting-software-sales.html" target="_blank">http://zecina.blogspot.com/2009/04/one-of-most-interesting-software-sales.html</a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/mobile-development/iphone-development/interview-with-ivan-kalaica-iphone-expert/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Method invocation with timer &#8211; even easier</title>
		<link>http://inchoo.net/mobile-development/iphone-development/method-invocation-with-timer-even-easier/</link>
		<comments>http://inchoo.net/mobile-development/iphone-development/method-invocation-with-timer-even-easier/#comments</comments>
		<pubDate>Mon, 27 Apr 2009 10:46:41 +0000</pubDate>
		<dc:creator>Ivan Kalaica</dc:creator>
				<category><![CDATA[iPhone development]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=1487</guid>
		<description><![CDATA[In my last post I written how to code an method invocation with timer. Since then I&#8217;ve found yet even easier way to achieve that. All this updating post&#8217;s work &#8230;]]></description>
			<content:encoded><![CDATA[<p>In my <a href="http://inchoo.net/iphone-development/method-invocation-with-timer/">last post</a> I written how to code an method invocation with timer. Since then I&#8217;ve found yet even easier way to achieve that. All this updating post&#8217;s work is part of growing up with the iPhone development, so don&#8217;t be surprised if I add something one more time to the same post. <span id="more-1487"></span>Well, that&#8217;s why there is same image for this and last post. <img src='http://inchoo.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  See code below and all will be clear.</p>
<pre class="brush: cpp; title: ; notranslate">- (void) viewDidLoad {

[NSTimer scheduledTimerWithTimeInterval:3.0f target:self selector: @selector(myMethod) userInfo:nil repeats:YES];

[super viewDidLoad];

}

- (void) myMethod {

NSLog(@&quot;Method execution&quot;);

}</pre>
<p>And that is it. Again!</p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/mobile-development/iphone-development/method-invocation-with-timer-even-easier/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Method invocation with timer</title>
		<link>http://inchoo.net/mobile-development/iphone-development/method-invocation-with-timer/</link>
		<comments>http://inchoo.net/mobile-development/iphone-development/method-invocation-with-timer/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 07:31:15 +0000</pubDate>
		<dc:creator>Ivan Kalaica</dc:creator>
				<category><![CDATA[iPhone development]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=1455</guid>
		<description><![CDATA[Method invocation with timer is something every developer sometime needs. First you make an instance of NSInvocation class and you add invocationWithMethodSignature. invocationWithMethodSignature consists of method selector (which method your &#8230;]]></description>
			<content:encoded><![CDATA[<p>Method invocation with timer is something every developer sometime needs. First you make an instance of NSInvocation class and you add invocationWithMethodSignature.<span id="more-1455"></span></p>
<p>invocationWithMethodSignature consists of method selector (which method your invocation will trigger) and target (which object is target). Next you make instance of NSTimer class to define repeat interval. See example below.</p>
<pre class="brush: cpp; title: ; notranslate">- (void) viewDidLoad {

NSInvocation *updateDisplayInvocation = [NSInvocation invocationWithMethodSignature:[self methodSignatureForSelector: @selector (myMethod)]];

[updateDisplayInvocation setSelector: @selector (myMethod)];

[updateDisplayInvocation setTarget: self];

NSTimer *audioDisplayUpdateTimer;

audioDisplayUpdateTimer = [NSTimer scheduledTimerWithTimeInterval:3.0 invocation:updateDisplayInvocation repeats:YES];

[super viewDidLoad];

}

- (void) myMethod {

NSLog(@&quot;Method execution&quot;);

}</pre>
<p>And that is it!</p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/mobile-development/iphone-development/method-invocation-with-timer/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to add custom sound effects to iPhone app?</title>
		<link>http://inchoo.net/mobile-development/iphone-development/how-to-add-custom-sound-effects-to-iphone-app/</link>
		<comments>http://inchoo.net/mobile-development/iphone-development/how-to-add-custom-sound-effects-to-iphone-app/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 12:34:32 +0000</pubDate>
		<dc:creator>Ivan Kalaica</dc:creator>
				<category><![CDATA[iPhone development]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[sound]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=1309</guid>
		<description><![CDATA[Here is simple code snippet (class) that enables you to add custom sound effects to iPhone application. As you can see procedure is fairly simple. I always like to prepare &#8230;]]></description>
			<content:encoded><![CDATA[<p>Here is simple code snippet (class) that enables you to add custom sound effects to iPhone application. As you can see procedure is fairly simple.<span id="more-1309"></span></p>
<p>I always like to prepare app for future changing, for example, if one day I change my mind and want to change existing clicking sound with new one I don&#8217;t have to change it everywhere I have create it, I just change value of effect string instance that is implemented in custom made Sound class in static method + (void) soundEffect:(int)soundNumber.</p>
<p>You can see here that I used static method so I don&#8217;t have to create instance of that class just to play a sound. When you want to call sound effect from another class just add this line of code [SoundAlert soundEffect:1]; to play for example an click sound effect.  I recommend you to put this call in viewWillDisappear: method so that sound triggers every time when current view exits.</p>
<p>Now finnaly if I want this class to work without errors I must add sound files. Isn&#8217;t that logical or what? I am using .aif  audio file so I must be sure to set type string instance value to @&#8221;aif&#8221; and also set the name of audio file with same name as value of effect string instance. Here is Sound class.</p>
<p>Sound.h</p>
<pre class="brush: cpp; title: ; notranslate">#import &lt;foundation /Foundation.h&gt;
#import &lt;audiotoolbox /AudioToolbox.h&gt;

@interface Sound : NSObject {

}

+ (void) soundEffect:(int)soundNumber;

@end</pre>
<p>Sound.m</p>
<pre class="brush: cpp; title: ; notranslate">#import &quot;Sound.h&quot;

@implementation Sound

+ (void) soundEffect:(int)soundNumber {
NSString *effect;
NSString *type;
if (soundNumber == 0) {
effect = @&quot;intro&quot;;
type = @&quot;wav&quot;;
}
else if (soundNumber == 1) {
effect = @&quot;click&quot;;
type = @&quot;aif&quot;;
}
else if (soundNumber == 2) {
effect = @&quot;error&quot;;
type = @&quot;aif&quot;;
}

NSString *value = [[NSUserDefaults standardUserDefaults] stringForKey:@&quot;sound&quot;];
if ([value compare:@&quot;ON&quot;] == NSOrderedSame) {

SystemSoundID soundID;

NSString *path = [[NSBundle mainBundle] pathForResource:effect ofType:type];
NSURL *url = [NSURL fileURLWithPath:path];

AudioServicesCreateSystemSoundID ((CFURLRef)url, &amp;soundID);

AudioServicesPlaySystemSound(soundID);

}
}

- (void)dealloc {
[super dealloc];
}

@end</pre>
<p>I have also added switch somewhere in my costume made settings menu that enables user to turn OFF or ON all custom used sounds in app. Here we are checking in which state is switch and if it is on ON position sound will play. You can see how to use NSUserDefaults to save state of switch in <a href="http://inchoo.net/iphone-development/how-to-use-nsuserdefaults-to-save-state-of-switch/">my previously post</a>. That&#8217;s all!</audiotoolbox></foundation></p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/mobile-development/iphone-development/how-to-add-custom-sound-effects-to-iphone-app/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>How to use NSUserDefaults to save state of switch?</title>
		<link>http://inchoo.net/mobile-development/iphone-development/how-to-use-nsuserdefaults-to-save-state-of-switch/</link>
		<comments>http://inchoo.net/mobile-development/iphone-development/how-to-use-nsuserdefaults-to-save-state-of-switch/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 11:49:16 +0000</pubDate>
		<dc:creator>Ivan Kalaica</dc:creator>
				<category><![CDATA[iPhone development]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=1156</guid>
		<description><![CDATA[If you have an application that should save for example state of a switch and you don&#8217;t want use database for that small request you can simply add instance of &#8230;]]></description>
			<content:encoded><![CDATA[<p>If you have an application that should save for example state of a switch and you don&#8217;t want use database for that small request you can simply add instance of NSUserDefaults class in your implementation. It is easy job, see below;<span id="more-1156"></span></p>
<pre class="brush: cpp; title: ; notranslate">- (IBAction) saveState {

NSString *value = @&quot;ON&quot;;
NSUserDefaults *userPreferences = [NSUserDefaults standardUserDefaults];
if(!switch.on){
value = @&quot;OFF&quot;;
[userPreferences setObject:value forKey:@&quot;stateOfSwitch&quot;];
}
[userPreferences setObject:value forKey:@&quot;stateOfSwitch&quot;];

}</pre>
<p>This is part of code that loads value in a NSString *value for key stateOfSwitch. When you start your application again and view finisheds with loading button will be in lefted state.</p>
<pre class="brush: cpp; title: ; notranslate">- (void)viewWillAppear:(BOOL)animated {

NSString *_value= [[NSUserDefaults standardUserDefaults] stringForKey:@&quot;stateOfSwitch&quot;];

if([_value compare:@&quot;ON&quot;] == NSOrderedSame){
switch.on = YES;
}
else {
switch.on = NO;
}
[super viewWillAppear:animated];
}</pre>
<p>NSUserDefaults class gives us an opportunity to save values without database use. This class uses KVC structure model for saving and loading values. Key-value coding (KVC) defines generic property accessor methods—valueForKey: and setValue:forKey:—which identify properties with string-based keys.</p>
<p>KVC is not meant as a general alternative to using accessor methods—it is for use by code that has no other option, because the code cannot know the names of the relevant properties at compile time. Key-value coding and the dot syntax are orthogonal technologies. You can use KVC whether or not you use the dot syntax, and you can use the dot syntax whether or not you use KVC. Both, though, make use of a “dot syntax”.</p>
<p>In the case of KVC, the syntax is used to delimit elements in a key path. It is important to remember that when you access a property using the dot syntax, you invoke the receiver ’s standard accessor methods (as a corollary, to emphasize, the dot syntax does not result in invocation of KVC methods valueForKey: or setValue:forKey:).</p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/mobile-development/iphone-development/how-to-use-nsuserdefaults-to-save-state-of-switch/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Dose application on iTunes store!</title>
		<link>http://inchoo.net/mobile-development/iphone-development/dose-application-on-itunes-store/</link>
		<comments>http://inchoo.net/mobile-development/iphone-development/dose-application-on-itunes-store/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 09:55:09 +0000</pubDate>
		<dc:creator>Ivan Kalaica</dc:creator>
				<category><![CDATA[iPhone development]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=1015</guid>
		<description><![CDATA[Beginning from today there is one iPhone app more on iTunes store developed by Surgeworks. Name of this free application is Dose and it&#8217;s ordered by Seachem Laboratories. Here is &#8230;]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">Beginning from today there is one iPhone app more on iTunes store developed by <a href="http://surgeworks.com/">Surgeworks</a>. Name of this free application is Dose and it&#8217;s ordered by <a href="http://www.seachem.com/Home/index.html">Seachem Laboratories</a>. Here is short description that you can also find on <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=307075679&amp;mt=8">iTunes</a>.<span id="more-1015"></span></p>
<p style="text-align: left;"><img class="size-full wp-image-1032 alignright" title="screenshot-11" src="http://inchoo.net/wp-content/uploads/2009/03/screenshot-11.jpg" alt="screenshot-11" width="130" height="188" /></p>
<p style="text-align: left;">Dose is intended for use with products by Seachem Laboratories. If you use products from our reef line, plant line, or our gravels, then Dose is for you. We’ve taken our online dosing calculators and put them in your pocket.</p>
<p style="text-align: left;">Seachem provides dosing instructions on all of our products, so you can always determine the proper amounts to dose, but now we&#8217;ve made it even easier. We&#8217;ve taken our three product lines that normally require some calculation and done the work for you. Some of the values on our labels have been rounded for simplification, but Dose uses precise values to give the most accurate dosing parameters possible. Now all you have to do is enter a few known values and Dose does the rest.</p>
<p style="text-align: left;">Setting up a new aquarium? Use Dose to figure out how many bags of one of our gravels you’ll need.</p>
<p style="text-align: left;">
<p style="text-align: left;">You’ve tested your calcium levels in your reef aquarium and they’re low. Use Dose to determine how much of one our calcium supplements to use to get them back up to desired levels.</p>
<p style="text-align: left;"><img class="aligncenter size-full wp-image-1035" title="screenshot-62" src="http://inchoo.net/wp-content/uploads/2009/03/screenshot-62.jpg" alt="screenshot-62" width="130" height="187" /></p>
<p style="text-align: left;">
<p style="text-align: left;">Dose is also perfect for pet store employees. Help customers determine how much of a product they need to buy or help them set up dosing regimen.</p>
<p style="text-align: left;">
<p style="text-align: left;">You can check out <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=307075679&amp;mt=8">Dose on iTunes</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/mobile-development/iphone-development/dose-application-on-itunes-store/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to launch App Store from my iPhone application?</title>
		<link>http://inchoo.net/mobile-development/iphone-development/how-to-launch-app-store-from-my-iphone-application/</link>
		<comments>http://inchoo.net/mobile-development/iphone-development/how-to-launch-app-store-from-my-iphone-application/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 10:18:11 +0000</pubDate>
		<dc:creator>Ivan Kalaica</dc:creator>
				<category><![CDATA[iPhone development]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=859</guid>
		<description><![CDATA[This is easy. Just follow the steps below and you will be over in less then minute. Launch iTunes on your Mac. Search for the item you want to link &#8230;]]></description>
			<content:encoded><![CDATA[<p>This is easy. Just follow the steps below and you will be over in less then minute.<span id="more-859"></span></p>
<ul>
<li>Launch iTunes on your Mac.</li>
<li>Search for the item you want to link to.</li>
<li>Right-click or control-click on the item&#8217;s name in iTunes, then choose &#8220;Copy iTunes Store URL&#8221; from the pop-up menu.<br />
<img class="aligncenter size-thumbnail wp-image-862" title="itunes_link1" src="http://inchoo.net/wp-content/uploads/2009/02/itunes_link1-150x84.png" alt="itunes_link1" width="150" height="84" /></li>
<li>The returned URL is an itunes.apple.com link. However, iPhone requires phobos URLs for direct linking to the App Store.</li>
<li>Therefore, you must replace itunes with phobos in the returned URL.</li>
<li>Open the modified URL using an NSURL object and the -[UIApplication openURL] method.</li>
</ul>
<pre class="brush: cpp; title: ; notranslate">

- (IBAction)appStoreLink {

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@&quot;http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=301349397&amp;amp;amp;amp;amp;mt=8&quot;]];

}</pre>
<p>Now when you press button linked with appStoreLink IBAction, App Store application will open and you will see Divine Office application. That&#8217;s all.</p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/mobile-development/iphone-development/how-to-launch-app-store-from-my-iphone-application/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
	</channel>
</rss>

