Data Oriented iOS Application

I am new to objective-c / cocoa programming. I am making an application that must constantly synchronize with the server and update its presentation. Now in a nutshell, this is what I thought: initiate NSTimer to start every second or two, contact the server, if there are changes, update the view. Is this a good way to do this? I read elsewhere that you can have a thread running in the background that tracks changes and updates the view. I have never worked with threads before, and I know that they can be quite unpleasant, and you need a lot of memory management experience to get the most out of them.

I have one month to get this app. What do you guys recommend? Just use NSTimer and do it the way I do, though ... or study multithreading and do it like that (but remember the time frames).

Thank!

+3
source share
2 answers

Think about the requirements. The most important issues are IMO:

  • Should your application receive new data while running in the background?
  • Does your application have to respond, that is, not sluggish when it retrieves new data?

, , , . , , . , iOS . , . , .

. , . , (, ) .

- -, IOS SDK . , ( , , ) . .

, , .

+1

, . , - , .

:

  • ( update) N .
  • in update .
  • NSURLConnection . : , , (, 2Mb XML), .
  • (, ) .
  • .
+2

Source: https://habr.com/ru/post/1796216/


All Articles