I'm developing an iOS 7 app that has scripting capabilities using JavascriptCore.
I'd like to have a way to pause or completely stop the code currently running on the JSContext. JavascriptCore isn't really well documented so I couldn't find an answer.
I have a few ideas:
- Remove from the context the bridge object used to interact with my app and just let any code still running fail.
- Getting the JSGlobalContextRef for my JSContext and releasing it using JSGlobalContextRelease and recreating a JSContext to use.
but hopefully there are better ways.
Any help would be appreciated. Thanks!