In your Xcode project, navigate to Build Settings -> Build Options, and set ENABLE_USER_SCRIPT_SANDBOXING to No.
Alternatively, search for ENABLE_USER_SCRIPT_SANDBOXING, and if it's set to Yes, change it to No.