I have a specific requirement for my IOS native app to call a remote server javascript function. Here is an example scenario:
In Objective-C, I am creating a UI with two textfields, one button, and one label. I input two integers into the textfields, let's say 5 and 7, and upon clicking the button I expect the sum (12) to be displayed on the label.
The calculation will be performed on a remote server using javascript: The javascript file is located on a remote web server at
Here is the code inside the javascript file:
function sum(x,y) {
var z = parseInt(x)+parseInt(y);
return z;
}
How should the Objective-C code look like?