I'm not an app developer so this may be very simple to answer.
I have a webview that displays a simple HTML page. On top of this I have a simple bride from objective-c to javascript so I can send messages between the HTML page and the app.
In the HTML page there's a button, when you click it a message is sent to objective-c that starts an NSTimer. The timer calls a function every 300ms. The function sends a random number to the HTML page through the objective-c to javascript bridge.
This function is supposed to do some heavy processing and then send the result back to the HTML page. This function needs as much "power" as possible.
My question is simply, do I need to create a separate thread to handle the working and posting or is this not an issue since the communication is to a HTML page in a webview?
If I need a separate thread, please point me in the right direction where I can learn about it.