dimanche 27 mars 2016

Swift - Run SQL query in background thread

I'm still fairly new to swift even it's an easy language to learn but i'm stuck here.

Basically, in my app, I want the user to be able to set a timer, like an amount of minutes, & then the app uses that time variable in an interval. It needs to perform a SQL query, in every possibly state the app can be in, and then create a push notification.

You know, like how Facebook works with comments & posts but my app doesn't use any type of remote service/server, it's all local.

Can someone help me point me in the right direction, resources or just explain to me, how this can be done?

I'm aware of NSTimer & dispatch_sync methods but not sure how to use them in this case.

After i solve this, my app is done.

Thanks guys.

Aucun commentaire:

Enregistrer un commentaire