(Never mind) UITableView not properly populating until 2nd app launch (Swift CoreData)

I've pre-populated some Core Data using a .plist file and persistentContainer.newBackgroundContext(). I have it so that the data only loads upon launching the app for the first time (by taking advantage of user defaults in AppDelegate). The problem is that the first screen which shows when the app is launched is a UITableViewController, and when the app is launching for the first time (and thus loading in all of the Core Data using that .plist file and a for loop), the TableView initially shows up as empty. I think it just takes a second for the backgroundContext to do its thing, and when I quit out of the app and reopen it, the table is properly populated. How can I make it so that when a user first launches the app, the table is properly populated?

EDIT: Never mind! Just decided to have a different ViewController launch on first open, and once that ViewController is dismissed I restart the application. This gives the TableView the time it needs to load up.