How to fetch data asynchronously in Cocoa Application using objective C

| | August 5, 2015

I am fetching some system information e.g. processor name processor cores and many more and then showing them on NSTextFeild.

The issue is for the time the information is getting fetched, the application hangs.

So, I want to run the task asynchronously.

Note: I have just started with cocoa so please do describe your solution. pretty please..
thanks in advance.

One Response to “How to fetch data asynchronously in Cocoa Application using objective C”

  1. Your UI hangs because you are doing work on the main thread. Hence this is a thread problem. You can then run that fetch for information on another thread, a background thread that doesn’t interact with the UI, display something to the user that the data is currently getting retrieved and then, when the data is ready, display it in your NSTextField.

    Read more

Leave a Reply