Skip to content

Commit d5a7503

Browse files
committed
update readme
1 parent 8692e8b commit d5a7503

File tree

5 files changed

+61
-2
lines changed

5 files changed

+61
-2
lines changed

WebServer/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ import (
88
func main() {
99
http.Handle("/", http.FileServer(http.Dir("./static")))
1010
log.Print("running at http://localhost")
11-
log.Fatal(http.ListenAndServe(":80", nil))
11+
log.Fatal(http.ListenAndServe(":3001", nil))
1212
}

image/finally.gif

21.8 MB
Loading

image/make_run.jpg

89.9 KB
Loading

image/simulator.jpg

12.4 KB
Loading

readme.md

+60-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,60 @@
1-
pod "CTJSBridge"
1+
# CTJSBridge
2+
3+
An iOS bridge for sending messages between Obj-C and JavaScript in WKWebView
4+
5+
### Features
6+
7+
- [x] Remote Debug
8+
- [x] Send/Handle Mesasage From Native To JS
9+
- [x] Send/Handle Mesasage From JS To Native
10+
11+
## Install
12+
13+
- You have to checkout that your mac has installed [golang](https://golang.org/doc/install)
14+
15+
- cd into `CTJSBridge/WebServer` directory and `make run`
16+
17+
![](image/make_run.jpg)
18+
19+
- if you get `listen tcp :80: bind: address already in use
20+
make: *** [run] Error 1` Error. Open then `CTJSBridge/WebServer/main.go` file and change the 80 to other port
21+
22+
- Then `pod update` and run the `CTJSBridge.xcworkspace` project on simulator
23+
24+
- When it is running, you will see the `It works` on the screen, and then click on the screen five times. And remeber the connect info.
25+
26+
![](image/simulator.jpg)
27+
28+
- Opne Safari.app and go to `localhost:3001` and enter connect info
29+
30+
- Finally you can control the simulator by safari
31+
32+
![](image/finally.gif)
33+
34+
35+
## Usage
36+
37+
38+
#### Cocoapods
39+
40+
pod 'CTJSBridge'
41+
42+
## Requirements
43+
44+
* iOS 8 or higher
45+
* golang
46+
47+
## Authors
48+
49+
* **Casa Taloyum** - [Casa Taloyum](https://github.com/casatwy)
50+
51+
## Communication
52+
53+
* If you **found a bug**, open an issue.
54+
* If you **have a feature request**, open an issue.
55+
* If you **want to contribute**, submit a pull request.
56+
57+
## License
58+
59+
This project is licensed under the MIT License.
60+

0 commit comments

Comments
 (0)