What’s Up With the New Fundometer Database Code (iPhone/iPad) (Updated)

If you have updated your Fundometer app for iPhone or iPad in the last few days, you will have seen a popup message referring to new database code for the app. If you don’t care how the app works behind the scenes or why this is happening, you don’t need to worry. I have designed the upgrade to take all of your existing data and put in in the new database. As long as you run Fundometer 1.4.1 or later before I am no longer able to support the old database code (mid September, I expect) all of the old data will be transferred. You can either skip to the “Benefits” section below or skip the article altogether and go back to Fundometer or Dodgy Dingbat or something…

iOS Simulator Screen shot Jun 10, 2014, 10.32.07 PM

The Problem With the Old Fundometer Database

If you are interested in the technical details on how this works and why this is happening, read on! First a bit about how Fundometer works. The data for each thermometer you create in Fundometer is stored in a sqlite database. This allows significant amounts of data to be stored in organized tables, and is built into both iOS and Android operating systems. Specifically, each thermometer is a row, and each piece of information, the title, the amount raised etc. is a column. Now, sql is different from the regular Objective C code used to program iPhone/iPad apps, and in order to easily interface between the two, a set of wrapper code, also called a database adapter, is usually used.

The original Fundometer database adapter was adapted from a tutorial video I watched to learn how databases on iOS worked. That code was likely a few years old, and when I tried to implement 64-bit builds for Fundometer, it would no longer compile. This is not a problem at the moment, I can and have continued to build Fundometer in the 32-bit architecture. But this means that I cannot take advantage of 64-bit in any way, and if Apple ever makes 64-bit builds mandatory, which I suspect they might with the public release of iOS 8 this September, then I would no longer be able to publish updates to the application.

In order to avoid these problems, I searched for some database adapter code that would likely have 64-bit compatible code. I quickly came across FMDB, an MIT-Licensed database wrapper. I then set about integrating and adapting the code into Fundometer in such a way that existing user’s data would not be lost. For now, this means running with both database wrappers in use (I also have each wrapper use a distinct database file as the index rows are structured a little differently.) The old database is only used once, to transfer the user’s data to the new database.

iOS  Screenshot

Benefits

Once the transition is complete, there will be benefits to all Fundometer users. First of all, the new code is 64-bit compatible and community supported, so it is future-proofed and should work with new iOS updates for years to come. As well the new database will be copied to the documents directory of the iPhone/iPad so it will automatically be saved whenever the device backed up to the cloud. This new database code is also more flexible, allowing me to add features like a Contributors List or thank you cards to the app. So stay tuned for some great Fundometer stuff coming up, including Fundometer 2.0 this August.
Update September 20, 2014:
One of the new features of iOS I would like to take advantage of is Today View widgets. The idea is that you could set the app to add funds to your thermometer on a recurring basis. You would be notified each time the funds are added and you could see a widget showing your fundraising progress. However to implement Today View widgets, the app needs to run 64 bit, which means the next version of Fundometer for iPhone/iPad will not support the old database code. You must run Fundometer 1.4.1 or 2.0.0 before the next update for your data to be transferred over.

If you haven’t already downloaded Fundometer, Version 1.4.1 2.0.0is now available on iTunes.

UP-Download_on_the_App_Store_Badge_US-UK_135x40

Apple, the Apple logo, iPad, and iPhone are trademarks of Apple Inc., registered in the U.S. and other countries. App Store is a service mark of Apple Inc.

Share This: Facebooktwittergoogle_plusredditpinterestlinkedintumblrmailby feather

Trackbacks & Pings

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.