Aleksandar • Vacić

iOS bits and pieces

Apps have infinite worth

Florian Kugler wrote a post yesterday arguing that for most people the apps we write are worth next to nothing. That their value is determined by how much are people paying for that. Increasingly, that’s a dolar or nothing. Hence, we - app developers - create products of little value.

Here’s a direct quote:

Another approach – and I would argue a more insightful one – is to learn about the nature of the market we’re working in. And not only about the market as an abstract whole, but about the value of our products specifically. The economic reality is that most apps offer next to no value to people. They might say otherwise when asked about, but their actions speak pretty clearly: A cup of coffee is worth more than almost every app on the store.

This is so not true.

Fix corrupted SQLite3 database

I tackled a very strange support request last few days, which escalated to the point that customer extracted the .sqlite database from the iPhone and sent it to me. I’m a SQLite3 rookie, but this worked for this particular case and I need to write for future reference. :)

When trying to open the file, Base would complain that file is either encrypted or damaged. When I placed it on my test device and started the app, it would immediatelly crash with this message in the console:

disk image is malformed

This usually happen if database file is accessed while still in use, but it can also happen if app is terminated during the save. In any case, I now needed to fix the database file and here’s how to do that.

Using State Preservation with Core Data

In previous post on state preservation and restoration, I presented the basics. This post deals with something that’s fairly common in data-driven apps.

Core Data is one of my favourite iOS frameworks; I use it in almost all of my apps, anything that requires even a minor object graph. So, let’s see how to save/restore state of table views (it’s the same for collection views) fueled by NSFetchedResultsController.

Fix AirPlay on Huawei E586 mifi

I’ve been using Hauwei E586 as my mobile 3G modem for quite a while. It works really good for up to 4 devices. One thing that did not work properly was AirPlay. Devices would see each other at first, make a connection and immediatelly drop it. I did not have a solution for this until recently where I stumbled on cause of the problem. By default, this little setting is set to ON:

One little setting to fixed

Switch it to OFF and - no restart needed - AirPlay works great. Apparently Huawei added this at some point late in the firmware update cycle so not a lot of people encountered this. Nor many of them need AirPlay on the go. :)