<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>technology &amp; other stuff</description><title>luacheia.com</title><generator>Tumblr (3.0; @mluisbrown)</generator><link>http://luacheia.com/</link><item><title>v1.3 de Farmácias de Serviço</title><description>&lt;div class="regular_body"&gt;
&lt;p&gt;Acabou de sair na App Store a versão 1.3 da minha app &lt;a href="http://itunes.apple.com/pt/app/farmacias-de-servico/id389764591?mt=8" title="Farmácias de Serviço na App Store"&gt;Farmácias de Serviço&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Incluí a opção, pedida por muitos utilizadores, de poder ver &lt;strong&gt;todas&lt;/strong&gt; as farmácias, e não apenas as farmácias de serviço. O botão ‘24h’ no canto superior direito muda entra os dois modos.&lt;/p&gt;
&lt;p&gt;Também mostra os vários tipos de ‘serviço’ das farmácias que estão de serviço utilizando cores diferentes nos alfinetes no mapa:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Verde: Permanente, aberto 24h.&lt;/li&gt;
&lt;li&gt;Amaerlo: Reforço, aberto até as 22h.&lt;/li&gt;
&lt;li&gt;Laranja: Disponibilidade, disponível por chamada. &lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Por favor instalem (é grátis) ou actualizem, e se gostam, deixem um comentário na App Store :)&lt;/p&gt;
&lt;p&gt;&lt;a href="http://itunes.apple.com/pt/app/farmacias-de-servico/id389764591?mt=8"&gt;&lt;a href="http://itunes.apple.com/pt/app/farmacias-de-servico/id389764591?mt=8"&gt;http://itunes.apple.com/pt/app/farmacias-de-servico/id389764591?mt=8&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;</description><link>http://luacheia.com/post/16861615602</link><guid>http://luacheia.com/post/16861615602</guid><pubDate>Wed, 01 Feb 2012 12:49:59 +0000</pubDate></item><item><title>rickwebb:

God. I am getting so fed up with Google. This is this...</title><description>&lt;img src="http://29.media.tumblr.com/tumblr_lwgurmscpl1qz7908o1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a class="tumblr_blog" href="http://rickwebb.tumblr.com/post/14467269283/god-i-am-getting-so-fed-up-with-google-this-is"&gt;rickwebb&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;God. I am getting so fed up with Google. This is this morning’s comparison. I experience this at least once a day now for a variety of things. &lt;/p&gt;
&lt;p&gt;I may not be done with Google yet, but I can see the day I will be on the horizon, and I am looking forward to it. &lt;/p&gt;
&lt;/blockquote&gt;</description><link>http://luacheia.com/post/14504323921</link><guid>http://luacheia.com/post/14504323921</guid><pubDate>Tue, 20 Dec 2011 10:00:33 +0000</pubDate></item><item><title>v1.2 de Farmácias de Serviço</title><description>&lt;p&gt;Acabou de sair na App Store a versão 1.2 da minha app &lt;a href="http://itunes.apple.com/pt/app/farmacias-de-servico/id389764591?mt=8" title="Farmácias de Serviço na App Store"&gt;Farmácias de Serviço&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Além de ter as localizações das farmácias muito melhoradas, agora também podem ver as farmácias de serviço perto de sua localização. De resto, está mais rápida e mais estável.&lt;/p&gt;
&lt;p&gt;Por favor instalem (é grátis) ou actualizem, e se gostam, deixem um comentário na App Store :)&lt;/p&gt;
&lt;p&gt;&lt;a href="http://itunes.apple.com/pt/app/farmacias-de-servico/id389764591?mt=8" title="Farmácias de Serviço na App Store"&gt;&lt;a href="http://itunes.apple.com/pt/app/farmacias-de-servico/id389764591?mt=8"&gt;http://itunes.apple.com/pt/app/farmacias-de-servico/id389764591?mt=8&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://luacheia.com/post/14374437686</link><guid>http://luacheia.com/post/14374437686</guid><pubDate>Sat, 17 Dec 2011 23:02:10 +0000</pubDate></item><item><title>"Remembering that I’ll be dead soon is the most important tool I’ve ever encountered to help me make..."</title><description>“Remembering that I’ll be dead soon is the most important tool I’ve ever encountered to help me make the big choices in life. Because almost everything — all external expectations, all pride, all fear of embarrassment or failure — these things just fall away in the face of death, leaving only what is truly important. Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose. You are already naked. There is no reason not to follow your heart.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;Steve Jobs - via &lt;a href="http://www.twitter.com/pedrocustodio"&gt;@pedrocustodio&lt;/a&gt; (via &lt;a href="http://dramalho.tumblr.com/"&gt;dramalho&lt;/a&gt;)&lt;/em&gt;</description><link>http://luacheia.com/post/11138842423</link><guid>http://luacheia.com/post/11138842423</guid><pubDate>Fri, 07 Oct 2011 14:08:32 +0100</pubDate></item><item><title>Rope-A-Dope, Indeed</title><description>&lt;p&gt;&lt;a href="http://parislemon.com/post/8964980217" class="tumblr_blog"&gt;parislemon&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lpzmimPqMg1qz4gev.jpg"/&gt;&lt;/p&gt;
&lt;p&gt;Sometimes you want so badly to say “I told you so!” after months of getting kicked in the ass, that you do so without really looking into what you’re writing about. Or even thinking, really.&lt;/p&gt;
&lt;p&gt;Such is the predicament Dan Lyons finds himself in today.&lt;/p&gt;
&lt;p&gt;The artist formerly known as Fake Steve Jobs &lt;a href="http://realdanlyons.com/blog/2011/08/15/suck-on-it-applesoft/"&gt;wrote the following&lt;/a&gt; this morning immediately after hearing about Google buying Motorola:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://parislemon.com/post/8964980217"&gt;Read More&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;</description><link>http://luacheia.com/post/8990137597</link><guid>http://luacheia.com/post/8990137597</guid><pubDate>Tue, 16 Aug 2011 09:20:42 +0100</pubDate></item><item><title>2010 iMac 27" Core i7 por €900? Com certeza...</title><description>&lt;p&gt;Estava a procura de um iMac em 2ª mão no &lt;a href="http://www.coisas.com"&gt;coisas.com&lt;/a&gt; quando encontrei este &lt;a href="http://lisboa.coisas.com/para_venda/informatica/mac/imac-intel-core-i7-2-8ghz-1tb-7200-8gb-de-ram-27-excelente/3015395/"&gt;belo exemplo&lt;/a&gt; de um iMac 27” de topo e quase novo por apenas €900. Isso é quase metade do preço do mercado, então como é que isso podia ser possível?&lt;/p&gt;

&lt;p&gt;Toca de enviar um email a mostrar interesse. Passado um dia recebi o seguinte email de resposta. Basta dizer apenas “a fool and his money are soon parted” :-)&lt;/p&gt;

&lt;p&gt;Email recebido de “fred.bitmanager@gmail.com”:&lt;/p&gt;

&lt;p&gt;     Hello,&lt;/p&gt;

&lt;p&gt;&lt;br/&gt;
 I write you this email because you contacted me regarding my product,iMac&lt;br/&gt;
Intel i7 2.8ghz 1TB 7200 8GB ram 27 excellent .The product is as new, it&lt;br/&gt;
comes with 23 months warranty ,all original packaging and accessories. Now I&lt;br/&gt;
work in London, for Britain’s Royal Guard and I received it from a friend of&lt;br/&gt;
mine as a gift on my birthday,one month ago.&lt;br/&gt;
 I decided to sell it together with my wife because I want to do a good&lt;br/&gt;
deed: the money which I will get after selling  will be donated to people in&lt;br/&gt;
need from Japan who suffered after earthquake and tsunami flood. Also, I&lt;br/&gt;
want to sell it  at a good price ( 900 € )  to somebody who really need it.&lt;br/&gt;
 Due to the job I have, my free time is limeted and because of it I can&lt;br/&gt;
not meet somebody face to face for my sell. So, I sell it via DPD&lt;br/&gt;
International and I will pay all the shipping cost, you must only pay for my&lt;br/&gt;
Apple iMac. You will make the payment to DPD and they will withhold the&lt;br/&gt;
money until you receive and inspect the product (you have 7 days for&lt;br/&gt;
inspection).&lt;br/&gt;
 The inspection period will begin as soon as you receive the product at&lt;br/&gt;
your address.Meanwhile DPD International will protect your money! You can&lt;br/&gt;
see the product before you decide to buy it. This way we are both protected:&lt;br/&gt;
I will know that I have a serious buyer, who has the money to pay me and you&lt;br/&gt;
will be able to&lt;br/&gt;
see and inspect the product before buying it.&lt;br/&gt;
You will receive the package in approx. 48 hours after the payment to DPD is&lt;br/&gt;
checked!&lt;br/&gt;
After you will inspect the product and decide to keep it, DPD will forward&lt;br/&gt;
me the funds and the deal is done.&lt;br/&gt;
Remember you have 7 days to test it. If by any reason the product is not as&lt;br/&gt;
described or if you find any problems, you will return the product to DPD&lt;br/&gt;
International with no expenses. The payment details will remain at DPD until&lt;br/&gt;
you confirm that everything is OK and you want to keep it.&lt;br/&gt;
 If you think the delivery terms are OK please send your shipping detaills:&lt;br/&gt;
- First &amp; last name:&lt;br/&gt;
- Address :&lt;br/&gt;
- City &amp; State:&lt;br/&gt;
- Postal Code:&lt;br/&gt;
- Country:&lt;br/&gt;
- E-mail &amp; second e-mail address:&lt;br/&gt;
- Phone number:&lt;/p&gt;

&lt;p&gt;I am waiting your reply,&lt;br/&gt;
Kind regards,&lt;br/&gt;
 Fred Bates&lt;/p&gt;

&lt;p&gt;PS:  I attached you some pictures.I would rather talk about our bussiness in&lt;br/&gt;
English for a better communication.&lt;br/&gt;
———————————————————————————————————————————————&lt;/p&gt;

&lt;p&gt;iMac Intel i7 2.8ghz 1TB 7200 8GB ram 27” excellent&lt;br/&gt;
RAM memory has been upgraded to 8GB.&lt;br/&gt;
The mouse and keyboard have never been used.&lt;br/&gt;
I just did a fresh install of the Snow Leopard. All CDs are included, even&lt;br/&gt;
the Apple logo stickers.&lt;br/&gt;
Please note no aditional software is included - just the Snow Leopard, just&lt;br/&gt;
like when you buy it from Apple.&lt;br/&gt;
Processor: Intel i7 2.8Ghz Quad-core&lt;br/&gt;
1TB 7200RPM hard drive&lt;br/&gt;
8GB RAM&lt;br/&gt;
SD card slot&lt;br/&gt;
27” glossy screen&lt;br/&gt;
Superdrive (burn and read DVDs)&lt;br/&gt;
Comes with Apple wireless keyboard and Apple Magic mouse (also wireless).&lt;br/&gt;
Will be sent in the original box.&lt;/p&gt;</description><link>http://luacheia.com/post/8172364179</link><guid>http://luacheia.com/post/8172364179</guid><pubDate>Thu, 28 Jul 2011 16:00:21 +0100</pubDate></item><item><title>alanvanroemburg:

Apple iCloud icon golden ratio
Alan van...</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_lmtv7t2pkX1qbpnjzo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://alanvanroemburg.tumblr.com/post/6550997276" class="tumblr_blog"&gt;alanvanroemburg&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Apple iCloud icon golden ratio&lt;/p&gt;
&lt;p&gt;&lt;a href="http://twitter.com/alanvanroemburg"&gt;Alan van Roemburg&lt;/a&gt; thanks to &lt;a title="Takamasa" href="http://stam-design-stam.blogspot.com/2011/06/icloud.html"&gt;Takamasa!&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;</description><link>http://luacheia.com/post/6616403615</link><guid>http://luacheia.com/post/6616403615</guid><pubDate>Fri, 17 Jun 2011 09:43:59 +0100</pubDate><category>iCloud</category><category>Apple</category></item><item><title>App Farmácias de Serviço de novo a funcionar</title><description>&lt;p&gt;Depois de mais de uma semana “em manutenção” o site da Associação Nacional das Farmácias (&lt;a href="http://www.anf.pt"&gt;www.anf.pt&lt;/a&gt;) voltou, e assim, a fonte de dados para a minha App também voltou. Tudo está novamente a funcionar como deve ser.&lt;/p&gt;
&lt;p&gt;Embora sendo um problema fora do meu controlo, peço desculpa para o incómodo.&lt;/p&gt;</description><link>http://luacheia.com/post/5362233758</link><guid>http://luacheia.com/post/5362233758</guid><pubDate>Tue, 10 May 2011 16:45:12 +0100</pubDate></item><item><title>App Farmácias de Serviço não funciona</title><description>&lt;p&gt;Pois é, a App deixou de funcionar porque o servidor da Associação Nacional de Farmácias (&lt;a title="www.anf.pt" target="_blank" href="http://www.anf.pt"&gt;&lt;a href="http://www.anf.pt"&gt;www.anf.pt&lt;/a&gt;&lt;/a&gt;), onde vou buscar os dados para a App, deixou de ter registo de DNS a assim, por todos efeitos, não existe (experimentem ir à &lt;a title="www.anf.pt" target="_blank" href="http://www.anf.pt"&gt;&lt;a href="http://www.anf.pt"&gt;www.anf.pt&lt;/a&gt;&lt;/a&gt; e vão ver o que acontece).&lt;/p&gt;
&lt;p&gt;Num ‘whois’ (na &lt;a title="www.dns.pt" target="_blank" href="http://www.dns.pt/"&gt;&lt;a href="http://www.dns.pt"&gt;www.dns.pt&lt;/a&gt;&lt;/a&gt;) parece que está tudo OK, mas qualquer ‘lookup’ de DNS para o domínio &lt;strong&gt;anf.pt&lt;/strong&gt; não devolve nada.&lt;/p&gt;
&lt;p&gt;É um problema totalmente fora do meu controlo, infelizmente. É isto que dá criar serviços que dependem dos dados dos outros.&lt;/p&gt;
&lt;p&gt;Só posso esperar que essa situação se resolve o mais rápido possível, e vou fazer o que posso para tentar alertar as pessoas que podem ajudar a resolver o problema.&lt;/p&gt;</description><link>http://luacheia.com/post/5158081931</link><guid>http://luacheia.com/post/5158081931</guid><pubDate>Tue, 03 May 2011 11:36:22 +0100</pubDate></item><item><title>dramalho:

Impossible Lego - frustrating Hu-mans every day 
</title><description>&lt;img src="http://30.media.tumblr.com/tumblr_lk2kvr7ezz1qcqriwo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://dramalho.tumblr.com/post/5080678627"&gt;dramalho&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Impossible Lego - frustrating Hu-mans every day &lt;/p&gt;
&lt;/blockquote&gt;</description><link>http://luacheia.com/post/5157857763</link><guid>http://luacheia.com/post/5157857763</guid><pubDate>Tue, 03 May 2011 11:16:23 +0100</pubDate></item><item><title>Taken with Instagram at CGD Sede</title><description>&lt;img src="http://28.media.tumblr.com/tumblr_li3ryflag21qermvzo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Taken with &lt;a href="http://instagr.am"&gt;Instagram&lt;/a&gt; at CGD Sede&lt;/p&gt;</description><link>http://luacheia.com/post/3877094699</link><guid>http://luacheia.com/post/3877094699</guid><pubDate>Tue, 15 Mar 2011 18:23:05 +0000</pubDate></item><item><title>Another beautiful Lisbon building left to rot away :( (Taken...</title><description>&lt;img src="http://29.media.tumblr.com/tumblr_lhdsu0QWW61qermvzo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Another beautiful Lisbon building left to rot away :( (Taken with &lt;a href="http://instagr.am"&gt;Instagram&lt;/a&gt; at Av. Elias Garcia)&lt;/p&gt;</description><link>http://luacheia.com/post/3582089344</link><guid>http://luacheia.com/post/3582089344</guid><pubDate>Tue, 01 Mar 2011 17:44:27 +0000</pubDate></item><item><title>Reflections (Taken with Instagram at CGD Sede)</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_lhbn1kkO0P1qermvzo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Reflections (Taken with &lt;a href="http://instagr.am"&gt;Instagram&lt;/a&gt; at CGD Sede)&lt;/p&gt;</description><link>http://luacheia.com/post/3561754649</link><guid>http://luacheia.com/post/3561754649</guid><pubDate>Mon, 28 Feb 2011 13:44:10 +0000</pubDate></item><item><title>Conselho = Concelho&lt;br /&gt;&#13;
;)</title><description>&lt;p&gt;Obrigado, já corrigi ;)&lt;/p&gt;</description><link>http://luacheia.com/post/2956035222</link><guid>http://luacheia.com/post/2956035222</guid><pubDate>Thu, 27 Jan 2011 10:16:38 +0000</pubDate></item><item><title>Idea to Market in 5 Months: Making the Glif</title><description>&lt;a href="http://www.therussiansusedapencil.com/post/2794775825/idea-to-market-in-5-months-making-the-glif"&gt;Idea to Market in 5 Months: Making the Glif&lt;/a&gt;: &lt;p&gt;Really inspiring write up. Got an idea for a product? Then just do it! The old excuses just aren’t valid anymore. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.therussiansusedapencil.com/post/2794775825/idea-to-market-in-5-months-making-the-glif"&gt;russianpencil&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;On July 11th, 2010, Tom Gerhardt and I had an idea for an iPhone accessory: a tripod mount that doubled as a stand. Five months later, customers began to receive our product, the &lt;a target="_blank" href="http://www.theglif.com/"&gt;Glif&lt;/a&gt;, in the mail. This turnaround, from idea to market in five months by two guys with no retail or manufacturing…&lt;/p&gt;
&lt;/blockquote&gt;</description><link>http://luacheia.com/post/2795102115</link><guid>http://luacheia.com/post/2795102115</guid><pubDate>Mon, 17 Jan 2011 15:06:59 +0000</pubDate></item><item><title>App Farmácias de Serviço actualizada</title><description>&lt;p&gt;Só para informar que a App &lt;a title="Farmácias de Serviço" target="_blank" href="http://itunes.apple.com/pt/app/id389764591?mt=8"&gt;Farmácias de Serviço&lt;/a&gt; foi actualizada para a versão 1.1. O bug que à que tinha referido &lt;a title="bug" href="http://luacheia.com/post/2060492240/app-farmacias-de-servico-tem-bug-no-ios-4-x"&gt;neste post&lt;/a&gt; foi corrigido. Ou seja, se a App estiver a correr em background, quando ela é aberto de novo, vai actualizar as Farmácias de Serviço se for preciso. Também corrigi alguns bugs que podiam causar a app de ir abaixo. Em termos de funcionalidade, infelizmente ainda não tem nada de novo.&lt;/p&gt;
&lt;p&gt;Espero em breve conseguir fazer uma actualização para corrigir a situação em que, em alguns casos, a localização da farmácia no mapa não corresponde à verdade, e também para conseguir fazer uma pesquisa baseada na localização da pessoa, sem ter de escolher o Distrito e Concelho.&lt;/p&gt;</description><link>http://luacheia.com/post/2745538551</link><guid>http://luacheia.com/post/2745538551</guid><pubDate>Fri, 14 Jan 2011 16:14:00 +0000</pubDate><category>iOS</category><category>iPhone</category><category>iPad</category><category>Farmácias de Serviço</category></item><item><title>Fog in the Orient (Taken with Instagram at Gare do Oriente)</title><description>&lt;img src="http://26.media.tumblr.com/tumblr_ldevbd2j711qermvzo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Fog in the Orient (Taken with &lt;a href="http://instagr.am"&gt;Instagram&lt;/a&gt; at Gare do Oriente)&lt;/p&gt;</description><link>http://luacheia.com/post/2311016979</link><guid>http://luacheia.com/post/2311016979</guid><pubDate>Tue, 14 Dec 2010 09:21:14 +0000</pubDate></item><item><title>Careful with iOS 4 (iPhone) multitasking and threads.</title><description>&lt;p&gt;In updating my &lt;a title="iTunes Link" target="_blank" href="http://itunes.apple.com/pt/app/id389764591?mt=8"&gt;Farmácias de Serviço&lt;/a&gt; App for iOS 4.x and multitasking I ran into an interesting problem related to multithreading. Whenever the app starts, as well as getting the current list of ‘service’ (open 24hrs) pharmacies, it also updates its database of all the pharmacies in Portugal. That update of the full database can take quite a long time (a minute or two) and is kicked off in its own thread so as not to interfere with the running of the app.&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;Pre iOS 4.x&lt;/strong&gt;&lt;br/&gt;Before iOS 4.x, when 3rd party app multitasking wasn’t available, when the app was closed, the thread updating the full database was killed off along with the rest of the app. If the update had only got halfway, no problem, it will be kicked off again the next time the user launches the app. Sooner or later the user is likely to keep the app open for long enough that the full update completes.&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;Post iOS 4.x&lt;/strong&gt;&lt;br/&gt;Since iOS 4.x, 3rd party app multitasking is allowed. Unless you explicitly disable multitasking (setting the &lt;a title="Apple Developer docs" target="_blank" href="https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW23"&gt;UIApplicationExitsOnSuspend&lt;/a&gt; key to YES in Info.plist), your app will continue ‘running’ in background when the user presses the Home button. I put the word running in quotes because most of the documentation seemed to imply that unless your app registered to do one of three allowed background tasks (audio, location or voip), it was effectively suspended until the user opened your app again. On that basis, I didn’t see the need to change my code regarding the update of the database. When the user re-opened the app, if the refresh hadn’t completed, it would be kicked off again in a new thread. &lt;br/&gt;&lt;br/&gt;In the iPhone simulator running on my iMac (where the database update runs much quicker than on the iPhone) that didn’t seem to cause any problems. However, when I started testing on my iPhone 4, every time I re-opened my app it crashed with an EXC_BAD_ACCESS in the database update code. I just couldn’t understand what was going on, until I left a couple of breakpoints in the database update code and, to my huge surprise, I was hitting those breakpoints repeatedly even when the app was closed / suspended! I finally realized what was going on: if you start a separate, relatively long running, thread in iOS 4.x (either using old school NSThreads or the now recommended &lt;a title="Migrating from threads to GCD" target="_blank" href="https://developer.apple.com/library/ios/#documentation/General/Conceptual/ConcurrencyProgrammingGuide/ThreadMigration/ThreadMigration.html"&gt;Grand Central Dispatch&lt;/a&gt;), when the user closes your app that thread will continue running and doing its thing, regardless of whether you use UIApplication’s &lt;a title="Apple Developer docs" target="_blank" href="https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplication_Class/Reference/Reference.html#//apple_ref/occ/instm/UIApplication/beginBackgroundTaskWithExpirationHandler:"&gt;beginBackgroundTaskWithExpirationHandler:&lt;/a&gt; or not.&lt;br/&gt;&lt;br/&gt;So, what was causing my app to crash was that I had two threads accessing the sqlite3 database at the same time. Neither the sqlite3 code nor my code is thread safe, so that led to the two threads inevitably crapping over each other. BANG.&lt;br/&gt;&lt;br/&gt;The solution was to keep a reference to the DB refresh thread when I started it and, when the app was re-opened, only kick off a new database update if there isn’t already one in progress. No more crashes.&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br/&gt;Contrary to what the Apple documentation seems to imply, if you create a separate background thread in your app, if it hasn’t finished when your app is suspended, it will carry on doing its thing in background. It will not get killed off or suspended. So, think carefully how do deal with background threads you create when your app is suspended and then re-opened.&lt;/p&gt;
&lt;p&gt;Wow! My first iPhone development related post!&lt;/p&gt;</description><link>http://luacheia.com/post/2302006429</link><guid>http://luacheia.com/post/2302006429</guid><pubDate>Mon, 13 Dec 2010 17:20:47 +0000</pubDate><category>iPhone</category><category>iOS</category><category>iOS 4.2</category><category>multitasking</category><category>multithreading</category></item><item><title>Foggy morning (Taken with Instagram at CGD Sede)</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_ldd1cyybNq1qermvzo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Foggy morning (Taken with &lt;a href="http://instagr.am"&gt;Instagram&lt;/a&gt; at CGD Sede)&lt;/p&gt;</description><link>http://luacheia.com/post/2197792802</link><guid>http://luacheia.com/post/2197792802</guid><pubDate>Mon, 13 Dec 2010 09:36:35 +0000</pubDate></item><item><title>Stunning.</title><description>&lt;iframe src="http://player.vimeo.com/video/369591" width="400" height="300" frameborder="0"&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Stunning.&lt;/p&gt;</description><link>http://luacheia.com/post/2091627062</link><guid>http://luacheia.com/post/2091627062</guid><pubDate>Sat, 04 Dec 2010 15:52:20 +0000</pubDate></item></channel></rss>

