<?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/"
	>

<channel>
	<title>sixtemia · iPhone &#38; Web Studio · Journal</title>
	<atom:link href="http://www.sixtemia.com/journal/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sixtemia.com/journal</link>
	<description>iPhone &#38; Web Studio</description>
	<pubDate>Thu, 21 Jan 2010 09:42:26 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>FCBNEWS &amp; RMNEWS updated</title>
		<link>http://www.sixtemia.com/journal/2010/01/21/fcbnews-rmnews-updated/</link>
		<comments>http://www.sixtemia.com/journal/2010/01/21/fcbnews-rmnews-updated/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 09:41:59 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
		
		<category><![CDATA[iPhone Apps]]></category>

		<guid isPermaLink="false">http://www.sixtemia.com/journal/?p=116</guid>
		<description><![CDATA[A few days ago we updated both applications to v1.2, so let&#8217;s take a look at what&#8217;s new on that versions:
- Loading time improved: now it&#8217;s much more faster.
- News quick summary: to read while waiting for the website to load.
- New share functionality: send the news links you find interesting
	to all of your friends [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago we updated both applications to <strong>v1.2</strong>, so let&#8217;s take a look at what&#8217;s new on that versions:</p>
<ul>- Loading time improved: now it&#8217;s much more faster.</ul>
<ul>- News quick summary: to read while waiting for the website to load.</ul>
<ul>- New share functionality: send the news links you find interesting<br />
	to all of your friends by email.</ul>
<ul>- Interface redesign: a new set of icons added to make the<br />
	application look more clear and fancy.</ul>
<ul>- New headlines&#8217; styles: to quickly identify which has been read and<br />
	which not.</ul>
<p>We also want to announce that we are waiting for the approval of the <strong>v2.0</strong> version of both applications which will have some minor changes. I&#8217;m sure you will be wondering why we have moved application version from <strong>1.2</strong> to<strong> 2.0</strong> if there is no big changes on it.<br />
That&#8217;s &#8217;cause <strong>the big changes</strong> are in <strong>the way we are going to sell it</strong>.</p>
<p>From now and on you&#8217;ll find both applications with a <strong>15 days FREE trial</strong> and <strong>WITHOUT</strong> any kind of <strong>SUBSCRIPTION</strong>. </p>
<p>Once the trial time expires you will be asked to buy the application using the <strong>InAppPurchase</strong> system, so if you liked it, don&#8217;t hesitate to buy it just for .<strong>99 $</strong>, and enjoy the application for the rest of your life.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sixtemia.com/journal/2010/01/21/fcbnews-rmnews-updated/feed/</wfw:commentRss>
		</item>
		<item>
		<title>2 New iPhone Apps: ZARA &amp; ZARA HOME</title>
		<link>http://www.sixtemia.com/journal/2009/12/21/2-new-iphone-apps-zara-zara-home/</link>
		<comments>http://www.sixtemia.com/journal/2009/12/21/2-new-iphone-apps-zara-zara-home/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 17:10:38 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
		
		<category><![CDATA[iPhone Apps]]></category>

		<guid isPermaLink="false">http://www.sixtemia.com/journal/?p=103</guid>
		<description><![CDATA[Last week two brand new iPhone apps where released, ZARA and ZARA HOME, both under Inditex license. We&#8217;ve worked closer with our client Abuse to make them a completely success, both apps appeared at top lists in just a few days. 
These apps are pocket catalogues of all the products that can be found in [...]]]></description>
			<content:encoded><![CDATA[<p>Last week two brand new iPhone apps where released, <a href="http://itunes.apple.com/es/app/zara/id341323282?mt=8"><strong>ZARA</strong></a> and <a href="http://itunes.apple.com/es/app/zara-home/id344574713?mt=8"><strong>ZARA HOME</strong></a>, both under <a href="http://www.inditex.es/"><strong>Inditex</strong></a> license. We&#8217;ve worked closer with our client <a href="http://www.abuse.es"><strong>Abuse</strong></a> to make them a <strong>completely success</strong>, both apps appeared at top lists in just a few days. </p>
<p>These apps are <strong>pocket catalogues</strong> of all the products that can be found in each ZARA store, organized by sections which is very useful for all customers, but one of the most important features of the application is the <strong>update frequency</strong>: ZARA&#8217;s team will update the content <strong>weekly</strong> to keep you informed about all its new products.</p>
<p>I would like to take this post to talk about <strong>mobile marketing posibilities</strong>, there is a lot of companies around the world using mobile marketing solutions to promote their products. iPhone and large set of latest mobile devices has the multimedia capabilities to provide a <strong>very easy, clear and useful channel of communication</strong> between companies and it&#8217;s potential customers. </p>
<p>The fact of ZARA releasing a set of applications available in most important plattforms(iPhone, Android, Nokia, Blackberry,&#8230;) it&#8217;s just another example of how useful can be for the companies to keep his customers updated with it&#8217;s latest products through a maketing mobile application.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sixtemia.com/journal/2009/12/21/2-new-iphone-apps-zara-zara-home/feed/</wfw:commentRss>
		</item>
		<item>
		<title>New iPhone App: RMNEWS</title>
		<link>http://www.sixtemia.com/journal/2009/12/09/new-iphone-app-rmnews/</link>
		<comments>http://www.sixtemia.com/journal/2009/12/09/new-iphone-app-rmnews/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 15:51:30 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
		
		<category><![CDATA[iPhone Apps]]></category>

		<guid isPermaLink="false">http://www.sixtemia.com/journal/?p=100</guid>
		<description><![CDATA[We are very proud to announce a brand new application. The RMNEWS application is a news reader about the Real Madrid Club de Fútbol. It keeps you updated with the latest news published about your favorite football club.
We have designed it in a very nice look &#038; feel interface using the club’s colors to make [...]]]></description>
			<content:encoded><![CDATA[<p>We are very proud to announce a brand new application. The RMNEWS application is a news reader about the Real Madrid Club de Fútbol. It keeps you updated with the latest news published about your favorite football club.<br />
We have designed it in a very nice look &#038; feel interface using the club’s colors to make all fans feel the colors while have a good news reading experience.</p>
<p>We wanted to provide the application with the best news quality we could and that’s why we work with the top spanish online press clipping company as a partner that provides us all the application news content. It has more than 2500 online sports sources in 13 languages.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sixtemia.com/journal/2009/12/09/new-iphone-app-rmnews/feed/</wfw:commentRss>
		</item>
		<item>
		<title>CGPoint and other CG variable can store in NSArray</title>
		<link>http://www.sixtemia.com/journal/2009/11/10/cgpoint-and-other-cg-variable-can-store-in-nsarray/</link>
		<comments>http://www.sixtemia.com/journal/2009/11/10/cgpoint-and-other-cg-variable-can-store-in-nsarray/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 14:45:32 +0000</pubDate>
		<dc:creator>Tesh</dc:creator>
		
		<category><![CDATA[iPhone Dev SDK]]></category>

		<guid isPermaLink="false">http://www.sixtemia.com/journal/?p=96</guid>
		<description><![CDATA[Often is possible that we need to store CG variables in NSArray. You can follow this code to do it.
For example we need to store CGPoints. 

NSArray *points = [NSArray arrayWithObjects:
[NSValue valueWithCGPoint:CGPointMake(5.5, 8.3)],
[NSValue valueWithCGPoint:CGPointMake(11.9, 8.5)],
nil];

And when we need to get these points, for example the first point

NSValue *val = [points objectAtIndex:0];
CGPoint p = [val CGPointValue];

]]></description>
			<content:encoded><![CDATA[<p>Often is possible that we need to store CG variables in NSArray. You can follow this code to do it.</p>
<p>For example we need to store CGPoints. </p>
<p><code><br />
NSArray *points = [NSArray arrayWithObjects:<br />
[NSValue valueWithCGPoint:CGPointMake(5.5, 8.3)],<br />
[NSValue valueWithCGPoint:CGPointMake(11.9, 8.5)],<br />
nil];<br />
</code></p>
<p>And when we need to get these points, for example the first point</p>
<p><code><br />
NSValue *val = [points objectAtIndex:0];<br />
CGPoint p = [val CGPointValue];<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sixtemia.com/journal/2009/11/10/cgpoint-and-other-cg-variable-can-store-in-nsarray/feed/</wfw:commentRss>
		</item>
		<item>
		<title>New iPhone App: FCBNEWS</title>
		<link>http://www.sixtemia.com/journal/2009/10/30/new-iphone-app-fcbnews/</link>
		<comments>http://www.sixtemia.com/journal/2009/10/30/new-iphone-app-fcbnews/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 10:14:55 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
		
		<category><![CDATA[iPhone Apps]]></category>

		<guid isPermaLink="false">http://www.sixtemia.com/journal/?p=91</guid>
		<description><![CDATA[We are very proud to announce a brand new application. The FCBNEWS application is a news reader about the Futbol Club Barcelona. It keeps you updated with the latest news published about your favorite football club.
We have designed it in a very nice look &#038; feel interface using the club&#8217;s colors to make all fans [...]]]></description>
			<content:encoded><![CDATA[<p>We are very proud to announce a brand new application. The <a href="http://www.sixtemia.com/fcbnews.html"><strong>FCBNEWS</strong></a> application is a news reader about the <strong>Futbol Club Barcelona</strong>. It keeps you updated with the latest news published about your favorite football club.<br />
We have designed it in a<strong> very nice look &#038; feel interface</strong> using the club&#8217;s colors to make all fans feel the colors while have a good news reading experience.</p>
<p>We wanted to provide the application with the <strong>best news quality</strong> we could and that&#8217;s why we work with the <strong>top spanish online press clipping company</strong> as a partner that provides us all the application news content. It has <strong>more than 2500 online sports sources in 13 languages</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sixtemia.com/journal/2009/10/30/new-iphone-app-fcbnews/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Website Update: Work</title>
		<link>http://www.sixtemia.com/journal/2009/10/30/website-update-works/</link>
		<comments>http://www.sixtemia.com/journal/2009/10/30/website-update-works/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 09:52:02 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
		
		<category><![CDATA[Sixtemia News]]></category>

		<guid isPermaLink="false">http://www.sixtemia.com/journal/?p=85</guid>
		<description><![CDATA[Today, we release a new section of our website:Work.
We&#8217;ve been working on this section for a long time and finally we can bring it to you.

Probably you are wondering why we haven&#8217;t done it before, as this is a corporate website it is essential to have a section talking about our work and about the [...]]]></description>
			<content:encoded><![CDATA[<p>Today, we release a new section of our website:<a href="http://www.sixtemia.com/work.html"><strong>Work</strong></a>.<br />
We&#8217;ve been working on this section for a long time and finally we can bring it to you.<br />
<span id="more-85"></span><br />
Probably you are wondering why we haven&#8217;t done it before, as this is a corporate website it is essential to have a section talking about our work and about the applications and developments we make, because each potential customer likes to have a look to the previous works to make sure this is the company he/she is looking for. </p>
<p>The answer to question that is as simple as: <strong>&#8220;we haven&#8217;t done it before because the 90% of our works are confidential&#8221;</strong>. We thought it would be better to wait until we had at least 2 own applications or 2 non-confidential applications on the store.</p>
<p>We want to communicate that we are working on a serial of <strong>&#8220;Football Club News Reader&#8221;</strong> applications based on our <strong>MobileNewsApp engine</strong>. So you could expect more applications on that field before the end of the year. We are also  working on 2 non-confidential projects which are going to be released soon. Because of that serial of events we are pretty sure that now is the best moment to update this website with the <strong>work</strong> section. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.sixtemia.com/journal/2009/10/30/website-update-works/feed/</wfw:commentRss>
		</item>
		<item>
		<title>About EXEC_BAD_ACCESS error</title>
		<link>http://www.sixtemia.com/journal/2009/10/19/about-exec_bad_access-error/</link>
		<comments>http://www.sixtemia.com/journal/2009/10/19/about-exec_bad_access-error/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 08:08:55 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
		
		<category><![CDATA[iPhone Dev SDK]]></category>

		<guid isPermaLink="false">http://www.sixtemia.com/journal/?p=80</guid>
		<description><![CDATA[I know that It&#8217;s been so far since my last post, but I have been very very very busy since then, but I&#8217;m here again, this time to talk about the EXEC_BAD_ACCESS error.
This kind of error is hard to debug, it happens when a message is sent to a released object, but the Xcode debugger [...]]]></description>
			<content:encoded><![CDATA[<p>I know that It&#8217;s been so far since my last post, but I have been very very very busy since then, but I&#8217;m here again, this time to talk about the <strong>EXEC_BAD_ACCESS</strong> error.</p>
<p>This kind of error is hard to debug, it happens when a message is sent to a released object, but the Xcode debugger doesn&#8217;t give any kind of information about which is the released object, because it is already released and it isn&#8217;t allocated in memory anymore, so the debugger doesn&#8217;t know it&#8217;s structure and it only has a pointer to an &#8220;empty&#8221; memory address. As the application can crash at anytime before the object is released it seems to be quite aleatory and sometimes hard to reproduce and trace.<br />
<span id="more-80"></span><br />
So &#8217;cause each <strong>EXEC_BAD_ACCESS</strong> error is different depending on your specific source code, I can&#8217;t give a generic solution, but I can explain you a way to trace it. you should know that exists an environment variable called <strong>NSZombieEnabled</strong>. If you set it to <strong>yes</strong>, Objective-C will leave in memory a dummy object for each deallocated object, then if your application send a message to the zombie object, execution will stop and you will be able to take a look at the stack and see from where the object is called. It can&#8217;t tell you the specific line of your source where the object is released, but it shows you the method where your object is called before being released and this should you get an idea of where the problem is.</p>
<p>So I imagine that now you are wondering hot to set up this variable, so let’s go on. To do it you have to create a new instance variable right clicking on your executable name, inside the executables group on the left side column of your Xcode’s project screen. Then choose the <strong>get info</strong> option. Then tap on the <strong>Arguments tab</strong>. You will see to white boxes, the second one is the one to set up environment variables, so press the <strong>+</strong> symbol under the white box and name the variable <strong>NSZombieEnabled</strong> with the word <strong>YES</strong> as the value. Make sure the checkbox is selected.</p>
<p>So you just have to run your application in debug mode, next time the <strong>EXEC_BAD_ACCESS</strong> occurs, the application will stop and you will see this kind of message in the debugger console:</p>
<p><code>2009-10-19 09:33:00.000 xxxxx[3997:20b] *** -[YourObject retain]: message sent to deallocated instance 0xXXXXXXX</code></p>
<p>Now you are able to click on the debugger and take a look at the stack. You will see some methods in bold, these are the ones you should take a look to review where your object is called after being released.</p>
<p>Remember that you have to <strong>uncheck</strong> the checkbox of the <strong>NSZombieEnabled</strong> variable once you fix the problem, or delete the variable if you prefer, or you will experience memory crashes, because of the zombie objects allocated and never freed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sixtemia.com/journal/2009/10/19/about-exec_bad_access-error/feed/</wfw:commentRss>
		</item>
		<item>
		<title>iPhone icon without shine &amp; gloss effect</title>
		<link>http://www.sixtemia.com/journal/2009/09/16/iphone-icon-without-shine-gloss-effect/</link>
		<comments>http://www.sixtemia.com/journal/2009/09/16/iphone-icon-without-shine-gloss-effect/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 13:47:39 +0000</pubDate>
		<dc:creator>Tesh</dc:creator>
		
		<category><![CDATA[iPhone Dev SDK]]></category>

		<guid isPermaLink="false">http://www.sixtemia.com/journal/?p=72</guid>
		<description><![CDATA[The default icon, in a iPhone projects, has a shine and gloss effect by default. If you want create your effects in the icon image, you must disable this effect. To do it, you need to add a new property in the info.plist file. The key of this property is UIPrerenderedIcon and it needs to [...]]]></description>
			<content:encoded><![CDATA[<p>The default icon, in a iPhone projects, has a shine and gloss effect by default. If you want create your effects in the icon image, you must disable this effect. To do it, you need to add a new property in the info.plist file. The key of this property is <strong>UIPrerenderedIcon</strong> and it needs to be set to YES. If you are editing the info.plist XML, you can add it using this new tags</p>
<p><code>&lt;key&gt;UIPrerenderedIcon&lt;/key&gt;<br />
&lt;string&gt;YES&lt;/string&gt;</code></p>
<p>And then you`&#8217;ll see your icon without this effect. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.sixtemia.com/journal/2009/09/16/iphone-icon-without-shine-gloss-effect/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using Store Kit Framework</title>
		<link>http://www.sixtemia.com/journal/2009/08/12/using-store-kit-framework/</link>
		<comments>http://www.sixtemia.com/journal/2009/08/12/using-store-kit-framework/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 15:59:01 +0000</pubDate>
		<dc:creator>Tesh</dc:creator>
		
		<category><![CDATA[iPhone Dev SDK]]></category>

		<category><![CDATA[Store kit iphone 3.0 dev sixtemia]]></category>

		<guid isPermaLink="false">http://www.sixtemia.com/journal/?p=53</guid>
		<description><![CDATA[One of the new framework in firmware 3.0 is the Store Kit. It can be very usefull to get a new business model in iPhone applications. For example, you can create a subscription magazine app where you ask for payment on a monthly, yearly or periodic basis of your choice. Sell extra levels to extend the experience of your game,...

The main steps to use this framework are:

    * - Create “In App Purchase Test User”  in iTunes Connect Portal.
    * - Have create App ID in the Developer Portal and enabled in-App purchases for that.
    * - Create the new App on in iTunes Connect Portal, and Register a product for this App.
    * - Develop the store in your App.
]]></description>
			<content:encoded><![CDATA[<p>One of the new framework in firmware 3.0 is the Store Kit. It can be very usefull to get a new business model in iPhone applications. For example, you can create a subscription magazine app where you ask for payment on a monthly, yearly or periodic basis of your choice. Sell extra levels to extend the experience of your game,&#8230;</p>
<p>The main steps to use this framework are:</p>
<ul>
<li>- Create “In App Purchase Test User”  in iTunes Connect Portal.</li>
<li>- Have create App ID in the Developer Portal and enabled in-App purchases for that.</li>
<li>- Create the new App on in iTunes Connect Portal, and Register a product for this App.</li>
<li>- Develop the store in your App.</li>
</ul>
<p><span id="more-53"></span><br />
<strong><br />
1.- Create “In App Purchase Test User”  in iTunes Connect Portal.</strong></p>
<p>Go to iTunes Connect Portal, (https://itunesconnect.apple.com), and click the option “Manage Users”, once on there, choose “In App Purchase Test User” option, and add a new User. The email that they requiere must be different of your iTunes Connect mail, it can be a dummy mail.</p>
<p><em>iTunesConnect-&gt;Manage Users-&gt; In App Purchase Test User-&gt; Add New User.</em></p>
<p><strong>2.- Have create App ID in the Developer Program Portal and enabled in-App purchases for that.</strong></p>
<p>Go to Developer Program Portal (http://developer.apple.com) and select “App IDs” section. The next step will be create a new App ID. Select the top right button “New App ID”. In bundle identifier I recomend to use a string like this, “com.yourcompany.appname”.</p>
<p><em>Developer Program Portal -&gt; App IDs -&gt; New App ID.</em></p>
<p><strong>3.- Create the new App on in iTunes Connect Portal, and Register a product for this App.</strong></p>
<p>Now we create the app on iTunes Connect. Again go to iTunes Connect Portal and select “manage your applications”. On left top you can see the “add new application” button, click it, and follow the steps. On Pricing step, it’s very important that you select a payment application (Not free), cause the app purchases are only available on this kind of App.</p>
<p><em>iTunes Connect -&gt; Manage your Applications -&gt; Add new Application</em></p>
<p>Once the App has been created, you can see it on “Manage your applications”. To add In-app purchase, select the button “Manage in-app purchase”. In this page, you can create your app purchases using the top left button, “Create New”.</p>
<p><em>iTunes Connect -&gt; Manage your Applications -&gt; Manage in-app purchase.</em></p>
<p><span style="color: #800000;"><em>* If your application is free, you can’t see this option</em></span></p>
<p><strong>4.- Develop the store in your App.</strong></p>
<p>This is the final step to use store kit. First of all it’s very important decide your application store model. Depending on how many items your store offers and how often you add new items, you may want to use one of two basic models: self-contained or downloadable content. In this tutorial we use a self-contained model.</p>
<p>In XCode, when you set up the project, make sure to link to StoreKit.framework.</p>
<p>Store Kit does not allow your application to patch itself or download additional code. For this the new feature must already exist in your application waiting to be unlocked</p>
<p><strong>4.1.- Get the in-app purchase.</strong></p>
<p>If you want to check the in-app purchase on your iphone app.</p>
<p><code><strong>DummyView.h</strong><br/><br />
#import &lt;UIKit/UIKit.h&gt;<br />
#import &lt;StoreKit/StoreKit.h&gt;<br/><br />
@interface DummyView : UIView &lt;SKProductsRequestDelegate&gt; {<br />
}<br/><br />
- (void) requestProductData;<br />
@end<br />
</code></p>
<p><code><strong>DummyView.m</strong><br/><br />
#import &#8220;DummyView.h&#8221;<br/><br />
@implementation DummyView<br/><br />
- (id)initWithFrame:(CGRect)frame {<br />
   if (self = [super initWithFrame:frame]) {<br />
        [self requestProductData];<br />
   }<br />
return self;<br />
}<br/><br />
- (void)dealloc {<br />
   [super dealloc];<br />
}<br/><br />
- (void) requestProductData<br />
{<br />
   SKProductsRequest *request= [[SKProductsRequest alloc] initWithProductIdentifiers: [NSSet setWithObject: @"com.yourcompany.product "]];<br />
   request.delegate = self;<br />
   [request start];<br />
}<br/><br />
//***************************************<br />
// PRAGMA_MARK: Delegate Methods<br />
//***************************************<br />
- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response<br />
{<br />
   NSArray *myProduct = response.products;<br />
   // populate UI<br />
   for(int i=0;i&lt;[myProduct count];i++)<br />
   {<br />
       SKProduct *product = [myProduct objectAtIndex:i];<br />
       NSLog(@&#8221;Name: %@ - Price: %f&#8221;,[product localizedTitle],[[product price] doubleValue]);<br />
       NSLog(@&#8221;Product identifier: %@&#8221;, [product productIdentifier]);<br />
   }<br />
}<br/><br />
@end</code></p>
<p><strong>4.2.- Buy a in-app purchase.</strong></p>
<p>First of all you need register a transaction observer with the payment queue. For this you must create a instance class like this.</p>
<p><code><strong>CustomStoreObserver.h</strong><br/><br />
#import &lt;Foundation/Foundation.h&gt;<br />
#import &lt;StoreKit/StoreKit.h&gt;<br/><br />
@interface CustomStoreObserver : NSObject&lt;SKPaymentTransactionObserver&gt; {<br />
}<br/><br />
- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions;<br />
- (void) failedTransaction: (SKPaymentTransaction *)transaction;<br />
- (void) restoreTransaction: (SKPaymentTransaction *)transaction;<br />
- (void) completeTransaction: (SKPaymentTransaction *)transaction;<br/><br />
@end</code></p>
<p><code><strong>CustomStoreObserver.m</strong><br/><br />
#import &#8220;CustomStoreObserver.h&#8221;<br/><br />
@implementation CustomStoreObserver<br/><br />
- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions<br />
{<br />
for (SKPaymentTransaction *transaction in transactions)<br />
{<br />
switch (transaction.transactionState)<br />
{<br />
case SKPaymentTransactionStatePurchased:<br />
[self completeTransaction:transaction];<br />
break;<br />
case SKPaymentTransactionStateFailed:<br />
[self failedTransaction:transaction];<br />
break;<br />
case SKPaymentTransactionStateRestored:<br />
[self restoreTransaction:transaction];<br />
default:<br />
break;<br />
}<br />
}<br />
}<br/><br />
- (void) failedTransaction: (SKPaymentTransaction *)transaction<br />
{<br />
if (transaction.error.code != SKErrorPaymentCancelled)<br />
{<br />
// Optionally, display an error here.<br />
}<br />
[[SKPaymentQueue defaultQueue] finishTransaction: transaction];<br />
}<br/><br />
- (void) restoreTransaction: (SKPaymentTransaction *)transaction<br />
{<br />
//If you want to save the transaction<br />
// [self recordTransaction: transaction];<br/><br />
//Provide the new content<br />
//  [self provideContent: transaction.originalTransaction.payment.productIdentifier];<br/><br />
//Finish the transaction<br />
[[SKPaymentQueue defaultQueue] finishTransaction: transaction];<br/><br />
}<br/><br />
- (void) completeTransaction: (SKPaymentTransaction *)transaction<br />
{<br />
//If you want to save the transaction<br />
// [self recordTransaction: transaction];<br/><br />
//Provide the new content<br />
//[self provideContent: transaction.payment.productIdentifier];<br/><br />
[[SKPaymentQueue defaultQueue] finishTransaction: transaction];<br/><br />
}<br/><br />
@end</code><br/><br />
And in DummyView.m you can add a button with this Event Method to buy in-app purchase.<br/><br />
<code>-(void) subscribe:(id) sender{<br />
SKPayment *payment = [SKPayment paymentWithProductIdentifier:productIdentifier];<br />
[[SKPaymentQueue defaultQueue] addPayment:payment];<br />
}</code><br />
<br/><br />
This is a simple tutorial to take a first look to Store Kit. I hope that it will be usefull for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sixtemia.com/journal/2009/08/12/using-store-kit-framework/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SoundEngine.cpp building errors in SDK 3.0</title>
		<link>http://www.sixtemia.com/journal/2009/08/07/40/</link>
		<comments>http://www.sixtemia.com/journal/2009/08/07/40/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 16:52:12 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
		
		<category><![CDATA[iPhone Dev SDK]]></category>

		<guid isPermaLink="false">http://www.sixtemia.com/journal/?p=40</guid>
		<description><![CDATA[Hi everyone,
I&#8217;m back with another fix that is usefull if you are using the SoundEngine.cpp library combined with the 3.0 version of the iPhone OS.
This morning I needed to use this lib for one of the projects I&#8217;m working in, but when I added the library to the project and tried to compile, it came [...]]]></description>
			<content:encoded><![CDATA[<p>Hi everyone,</p>
<p>I&#8217;m back with another fix that is usefull if you are using the <strong>SoundEngine.cpp</strong> library combined with the <strong>3.0</strong> version of the iPhone OS.</p>
<p>This morning I needed to use this lib for one of the projects I&#8217;m working in, but when I added the library to the project and tried to compile, it came up with several understanding and anoying errors. I don&#8217;t know exactly why, but it stopped compiling since the version 3.0 came out.<br />
I&#8217;ve tried and I can confirm that it still compiles perfectly with the <strong>2.2</strong> version of the SDK.</p>
<p>The solution I&#8217;m posting is simple, I&#8217;ve done some searches using <a href="http://www.google.com">Google</a>, of course. I found several solutions to the problem, but only one of them is the easyest and simpliest to implement.</p>
<p>You just have to solve only two of the errors listed by the compiler to solve them all:</p>
<p><code>1. "crosses initialization of OSStatus err" in <strong>line 686</strong>:<br />
OSStatus err = AudioFileGetPropertyInfo(inFileInfo-&gt;mAFID, kAudioFilePropertyChannelLayout, &amp;size, NULL);</code></p>
<p><code>2. "crosses initialization of bool isFormatVBR" in <strong>line 722</strong>:<br />
bool isFormatVBR = (inFileInfo-&gt;mFileFormat.mBytesPerPacket == 0 || inFileInfo-&gt;mFileFormat.mFramesPerPacket == 0);<br />
</code></p>
<p>You just have to move the initialization of these structures, just a few lines before.<br />
If you take a look at the source, the line just before both initializations it&#8217;s an <strong>AssertNoError</strong> that redirects to the label end in case of no error. You just have to initialize this structures:</p>
<p><code>OSStatus err;<br />
bool isFormatVBR;</code></p>
<p>Just before of that <strong>AssertNoError</strong> call, at the beginning of the method/function is a good place. It seems like the compiler doesn&#8217;t like the order of the labels, maybe it became more strict since the update.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sixtemia.com/journal/2009/08/07/40/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to change the UITableViewCell backgroundColor / backgroundView</title>
		<link>http://www.sixtemia.com/journal/2009/07/23/how-to-change-the-uitableviewcell-backgroundcolor-backgroundview/</link>
		<comments>http://www.sixtemia.com/journal/2009/07/23/how-to-change-the-uitableviewcell-backgroundcolor-backgroundview/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 07:36:51 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
		
		<category><![CDATA[iPhone Dev SDK]]></category>

		<guid isPermaLink="false">http://www.sixtemia.com/journal/?p=30</guid>
		<description><![CDATA[I recently found out that the properties backgroundColor and backgroundView of an UITableViewCell can&#8217;t be changed easily, or at least using the setBackgroundColor message and setBackgroundView.  
If you try the setBackgroundColor nothing happens and if you try the setBackgroundView a white rectangle appears just under the textLabel I think it&#8217;s the textLabel backgroundColor, but [...]]]></description>
			<content:encoded><![CDATA[<p>I recently found out that the properties <strong>backgroundColor</strong> and <strong>backgroundView</strong> of an <strong>UITableViewCell</strong> can&#8217;t be changed easily, or at least using the <strong>setBackgroundColor</strong> message and <strong>setBackgroundView</strong>.  </p>
<p>If you try the <strong>setBackgroundColor</strong> nothing happens and if you try the <strong>setBackgroundView</strong> a white rectangle appears just under the <strong>textLabel</strong> I think it&#8217;s the <strong>textLabel backgroundColor</strong>, but changing this property to <strong>[UIColor ClearColor]</strong>(that means transparent), doesn&#8217;t do anything.  </p>
<p>Surfing the forums I found one solution that works for me and I&#8217;d like to share. In my case I was re-writting the <strong>UItableViewCell</strong> definition to build my own &#8220;Custom UITableViewCell&#8221; &#8217;cause I need to display the information I had in an specific way, if this is your case too, you can override the <strong>layoutSubviews</strong> method to this one:  </p>
<p><code>- (void)layoutSubviews {     <br />
&nbsp;&nbsp;&nbsp;&nbsp;[super layoutSubviews];     <br />
&nbsp;&nbsp;&nbsp;&nbsp;[self setBackgroundColor:[UIColor clearColor]];<br />
}<br />
</code> </p>
<p>This changes the background to transparent and allows to show up my backgroundView. If you don&#8217;t want to change the backgroundView and you just want to change the backgroundColor you just have to set up the color you like where I set up the &#8220;clearColor&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sixtemia.com/journal/2009/07/23/how-to-change-the-uitableviewcell-backgroundcolor-backgroundview/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Hello World!</title>
		<link>http://www.sixtemia.com/journal/2009/06/09/hello-world/</link>
		<comments>http://www.sixtemia.com/journal/2009/06/09/hello-world/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 15:37:34 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
		
		<category><![CDATA[Sixtemia News]]></category>

		<guid isPermaLink="false">http://www.sixtemia.com/journal/?p=12</guid>
		<description><![CDATA[We are very proud to present to you our new look &#38; feel and website.
]]></description>
			<content:encoded><![CDATA[<p>We are very proud to present to you our new look &amp; feel and website.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sixtemia.com/journal/2009/06/09/hello-world/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
