Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lightweight migration completed notification

I've been using lightweight migration for several versions successfully, but in my newest version I need to load some tables that are created during the migration with data after the migration completes. I imagine it's possible that when my initial UIViewController calls the method to load data into the new tables, the migration hasn't completed and the app will crash, so:

How can I determine that lightweight migration has completed?

like image 791
DiscDev Avatar asked Jul 13 '26 16:07

DiscDev


1 Answers

The automatic lightweight migration happens when you call addPersistentStoreWithType:... with the corresponding options, and is completed when that call returns. There is no asynchronous migration in the background.

like image 93
Martin R Avatar answered Jul 15 '26 07:07

Martin R