SeaSky
SeaSky

Reputation: 1312

Preprocessing in Swift application

In my swift app, during the initialization and load process I need to check CoreData for the availability of some records and further more make some bluetooth connections before display to the user.

Is there a recommendation on how to do this? Should I write this code directly in the AppDelegate or should I write it in a different Swift class and then invoke from the AppDelegate?

I am new to Swift so your suggestions are appreciated.

Upvotes: 0

Views: 111

Answers (2)

Sumit Jangra
Sumit Jangra

Reputation: 631

Don't be Confuse , just create a function checkRecords in appDelegate and put your code inside it and Call this function.

Upvotes: 0

mukul
mukul

Reputation: 382

You Can do all this stuff in your View Controller i.e. your rootViewController by showing loader on screen to user and Checking the records in core data if present ,then retrieve them.

Upvotes: 2

Related Questions