Moved Code from JavaScript file to Objective C and so avoided any JavaScript file dependency.