FMDatabase is currently used while running

I preload the data from the service in the mobile application.

Here I added about 7 services to NSOperationQueue, and all these operations will lead to database updates.

Here, when updating the database, I get a warning in the log, for example, "FMDatabase is currently in use", and the data was not inserted into the database.

Here's how to deal with this problem while running and updating the database in parallel.

+3
source share
1 answer

I have not used FMDatabase, but you should read the documentation

This is part of the document:

Therefore, do not instantiate a single FMDatabase object and do not use multiple threads.

FMDatabaseQueue. , .

+6

All Articles