Sugar Rush, Removr, and iOS 5

I’ve been able to test my apps in iOS 5 and the only one that has an issue is Removr. Sugar Rush is 100% compatible with iOS 5 and doesn’t require an update.

Removr immediately returns to the menu when you tap play or try to go to a level. I’ve already fixed it and will submit the update after some further testing as soon as Apple accepts iOS 5 application updates.

There seems to be a change in SQLite’s behavior under iOS 5 which affected Removr. I’m storing the level maps as a SQLite database in the application bundle. In the current version, I’m opening the database as follows:


int err = sqlite3_open([self.dbpath UTF8String], &db);

Under iOS 5, that fails unless readonly mode is specified when opening the database. The simple fix was merely to specify read only mode as follows:


int err = sqlite3_open_v2([self.dbpath UTF8String], &db,SQLITE_OPEN_READONLY,NULL);

I will release a Removr beta in the next few days to anyone whose device ID I have (I can’t add any new devices until July 16).

2 responses to “Sugar Rush, Removr, and iOS 5

  1. Hi,
    I changed to use the function sqlite3_open_v2() with SQLITE_OPEN_READONLY flag as you post and my app worked fine on simulator of Xcode 4.2 GM seed.
    But after uploading it to iTunes Connect, Apple rejected it because they get 0 results when try to read data from DB. It's strange. Plese helpe me.

    PS: All worked fine with iOS4.x or lower

    • Are you using the right path for the database? The most common cause I've found for things to work in the simulator but fail on the device is due to case sensitive file systems. On the simulator, the file system is case insensitive, but on the device it's case sensitive. Therefore, if you open the file using a path name like "MyDatabase.sql" but the actual fie name is "MyDatabase.SQL", it will work on the simulator but not on the device.

Leave a Reply