You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 2, 2018. It is now read-only.
@bitomule It is not possible to create a SQLite backed CoreDataStack instance synchronously and this is by design. With SQLite backed stores it can take an indefinite amount of time to map your xcdatamodel into SQLite tables/rows, especially on first time launches or between model migrations.
Its is always a good practice to architect your app with the assumption that this could take a longer amount of time than you'd want to block the main thread.
In your case I would suggest doing one of two things:
You can make the CoreDataStack dependency on your view controllers an optional that is set once the setup has called back to you. In this scenario you need to ensure you'r view controller has something to display while the CoreDataStack is absent.
You can suspend setting up these initial view controllers within the AppDelegate until the stack has been created. A splash screen/spinner type of UI can be used here while the stack is being constructed.
Is it possible to create the stack synchronously? I create it in app delegate and need to use it before any controller is created. Is it possible?
The text was updated successfully, but these errors were encountered: