Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5972877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:43:13+00:00 2026-05-22T20:43:13+00:00

BACKGROUND We have an iPhone app that uses sqlite for a large database. We

  • 0

BACKGROUND

We have an iPhone app that uses sqlite for a large database. We use FTS3, full text search, so we have to “roll our own” sqlite instead of using the library included in the iOS SDK. We use the amalgamated sqlite.c file, and we use FMDB as an Obj-C wrapper.

THE PROBLEM

My project compiles, but it crashes on an exception that I’ve installed to detect if the database is malfunctioning (more on that in a bit). My partner, however, is merrily coding away, with no problems – on the EXACT SAME commit revision as me. That’s what’s weird.

Specifically, the app does the following on first load:

  1. Copy the database into the user’s document directory so that it is writeable. (working OK)
  2. Open the database using FMDB’s databaseWithPath: followed by open.
  3. Calling goodConnection on FMDB at this point returns YES – the database is indeed open and working.
  4. Calling SELECT * FROM sqlite_master WHERE type = 'table' returns no records. (there should be many tables)

WHAT I’VE TRIED

Now, if you ask sqlite to “open” a database that doesn’t exist — it’ll just create one. That’s what this behavior looks like. So, I opened up a Terminal window, navigated to my app’s Documents directory on the simulator, and typed:

Makbook:Documents makdad$ sqlite3 myDB.db

Which runs sqlite3, and, of course, everything looks fine. All my data is there.

I stepped through line-by-line of FMDB’s open method to make sure I was opening the right database. It looks like I certainly am.

First thing I tried was downgrading to Xcode 3.2.6. Same problem, so I think I’ve ruled out an Xcode 3/4 difference in compiling (although I suspected that at first).

Does anyone have any debugging-fu to try, or any knowledge as to what my problem could be?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T20:43:14+00:00Added an answer on May 22, 2026 at 8:43 pm

    The problem is with the iOS 4.3 SDK Simulator. I had neglected to test the iOS device itself, and it works.

    To support older iOS versions, we use the -weak_library /usr/lib/libSystem.B.dylib linker flag. Removing that flag on iOS Simulator 4.3 stops ALL the weird behavior relating to sqlite3.

    The reason my partners weren’t having the problem is that they are running Xcode 3.2.5, which is 4.2. Even when I downgraded to Xcode 3, I still had 4 installed – so 3 was using the 4.3 SDK as well.

    I am going to open a new question about the new issue, as this question is so far off the actual issue 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my iPhone app I have a background task that starts running when the
I have an iPhone app that is using sqlite 3.6 (not with FMDB) to
Background: I have a kubuntu laptop right now that I can't use wirelessly, i.e.
I'm working on an iPhone app that uses Core Data. The app makes a
I have an iPhone VOIP app that copes with multi-multi transmit and receive (ie
Sorry but I found no clear answer on that. I have an iphone app
I have some .swf files I want to use in an iphone app for
Background - in my iPhone app I have a custom UITableViewController - I was
I'm using an SQLite database in my iPhone app. At startup, there are some
I see a lot of apps that use GPS in the iPhone have the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.