forked from LemonCake/JsCoreEngineiOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
29 lines (22 loc) · 743 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
JsCoreEngineWrapper
-------------------
Simple singleton iOS class that wraps a JavascriptCore library to process javascript in the background thread
Installation
------------
1. Import all the files into your project
2. Go to build phases and add the following libraries:
- libstdc++.dylib
- libicucore.dylib
- libiOSJavaScriptCore.a
3. import "JsCoreEngineWrapper.h"
Usage
-----
1. Implement delegate methods to get the callback
eg.
- (void)JsCoreEvalResultsDidLoad:(NSString *)result {
NSLog(@"results: %@", result);
}
2. Anywhere in your class, invoke javascript
eg.
[JsCoreEngineWrapper instance].evalJsString("...")];
3. Get the result in the delegate method and there you have it! Javascript in the background thread.