I'm an android developer and I've started learning iOS development - not so long ago. I have
an android app which I want to port onto iOS. My app has
a background service which tracks user geoLocation and sends it to my server then receives response from it and then writes this response to SQLLite, please tell me how much it is possible to make this on iOS? I know that iPhone can receive location updates in background since iOS4, but what about background network connections and SQLLite? Also is it possible to send local push notifications in background?

- 17,418
- 8
- 58
- 76

- 926
- 3
- 21
- 52
-
Everything you mention is possible. There's 2 background modes are are going to be relevant to you: 1) Location 2) Background fetch. The term local push is used to refer to a notification the app sends, if you mean is it possible send remote notification from a server to the app while the app is in the background then that's called a remote notification and that would be a 3rd background mode of interest to you. (Background remote push and background fetch are only possible with iOS7). Finally yes there is SQLLite. – Gruntcakes Apr 15 '14 at 14:40
-
@MartinH thank you for your answer, please tell me can I work with SQLLite in background on iOS? I need to read&write some data from db while tracking gps. – whizzzkey Apr 15 '14 at 20:06
1 Answers
please tell me how much it is possible to make this on iOS?
iOS is a mature OS that comes with Cocoa Touch, a huge library of classes. So, yes it is possible. And the question of possibility shouldn't be attached with the word much
. Either something is possible, or something is impossible. Don't take it as how much. If it is possible, you can do it.
how about background network connections and SQLite?
Of course, this is possible. Like android, there is a rule in iOS that only your main thread can interact with the UI, and all other heavy tasks should be attached with other threads. You will use Blocks
to accomplish this kind of functionality.
Also is it possible to send local push notifications in background?
Yes, it is quite possible. Have a look at the following document.
Local and Push Notification Programming Guide
Do have a look at http://developer.apple.com/, here you find a lot of documents related to the tasks you have asked in your question.

- 17,418
- 8
- 58
- 76
-
"You will use Blocks to accomplish this kind of functionality." THe OP is obviously asking about background modes not a background thread, most defiantly not the same thing. Telling him this can be done using blocks is going to confuse him very much. – Gruntcakes Apr 15 '14 at 14:35
-
Thanks for your answer, I need to make something like service in Android i.e. I need that app tracks gps, sends it to server, receives a response and write this response to SQLLite - and all of this work should do in background. – whizzzkey Apr 15 '14 at 20:18