Skip to content

Commit 905c1d0

Browse files
committed
更新Mac文档说明
1 parent 4c4b895 commit 905c1d0

1 file changed

Lines changed: 109 additions & 0 deletions

File tree

Mac.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,3 +122,112 @@ at now + 10 minutes <<< "/bin/echo `date` > /tmp/time.log" # 创建任务
122122
at -l # 列出任务
123123
at -c 1 # 显示任务内容
124124
```
125+
126+
127+
## Mac 键盘图标与对应快捷按键
128+
129+
键盘图标 | 快捷按键
130+
| --- | --- |
131+
⌘ | Command () win
132+
⌃ | Control ctrl
133+
⌥ | Option alt
134+
⇧ | Shift
135+
⇪ | Caps Lock
136+
137+
138+
### 文件校验
139+
Mac md5 替代 md5sum
140+
```
141+
$ md5 .bashrc
142+
MD5 (.bashrc) = 1f98b8f3f3c8f8927eca945d59dcc1c6
143+
$ shasum .bashrc
144+
c4d853993e323432cb84359de2c319b9a767b729 .bashrc
145+
```
146+
147+
148+
## Mac 安装 matplotlib
149+
150+
```bash
151+
pip install matplotlib
152+
```
153+
测试导入报错
154+
```
155+
Traceback (most recent call last):
156+
File "wechat_jump_iOS_py3.py", line 3, in <module>
157+
import matplotlib.pyplot as plt
158+
File "/Users/zhanghe/code/wechat_jump_game/wechat_jump_game.env/lib/python3.6/site-packages/matplotlib/pyplot.py", line 116, in <module>
159+
_backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
160+
File "/Users/zhanghe/code/wechat_jump_game/wechat_jump_game.env/lib/python3.6/site-packages/matplotlib/backends/__init__.py", line 60, in pylab_setup
161+
[backend_name], 0)
162+
File "/Users/zhanghe/code/wechat_jump_game/wechat_jump_game.env/lib/python3.6/site-packages/matplotlib/backends/backend_macosx.py", line 17, in <module>
163+
from matplotlib.backends import _macosx
164+
RuntimeError: Python is not installed as a framework. The Mac OS X backend will not be able to function correctly if Python is not installed as a framework. See the Python documentation for more information on installing Python as a framework on Mac OS X. Please either reinstall Python as a framework, or try one of the other backends. If you are using (Ana)Conda please install python.app and replace the use of 'python' with 'pythonw'. See 'Working with Matplotlib on OSX' in the Matplotlib FAQ for more information.
165+
```
166+
167+
解决办法:
168+
```bash
169+
echo "backend: TkAgg" > ~/.matplotlib/matplotlibrc
170+
```
171+
172+
173+
## iphone 真机调试
174+
175+
https://github.com/openatx/facebook-wda
176+
177+
Install python wda client
178+
```bash
179+
pip install --pre facebook-wda
180+
```
181+
182+
https://github.com/Carthage/Carthage
183+
```bash
184+
brew install carthage
185+
```
186+
187+
iOS 真机如何安装 WebDriverAgent
188+
```bash
189+
git clone https://github.com/facebook/WebDriverAgent
190+
cd WebDriverAgent
191+
./Scripts/bootstrap.sh
192+
```
193+
安装完成, 双击`WebDriverAgent.xcodeproj`文件
194+
195+
设置证书, 参考:
196+
- https://testerhome.com/topics/7220
197+
- https://testerhome.com/topics/8085
198+
199+
200+
```bash
201+
brew install libimobiledevice
202+
```
203+
204+
端口转发
205+
```bash
206+
iproxy --help
207+
usage: iproxy LOCAL_TCP_PORT DEVICE_TCP_PORT [UDID]
208+
209+
iproxy 8100 8100
210+
```
211+
212+
验证服务状态
213+
```
214+
curl http://localhost:8100/status
215+
{
216+
"value": {
217+
"state": "success",
218+
"os": {
219+
"name": "iOS",
220+
"version": "11.2.1"
221+
},
222+
"ios": {
223+
"simulatorVersion": "11.2.1",
224+
"ip": "192.168.3.44"
225+
},
226+
"build": {
227+
"time": "Dec 30 2017 21:05:55"
228+
}
229+
},
230+
"sessionId": "BC69BB2F-945F-4EBC-B94B-5E8C01696F82",
231+
"status": 0
232+
}
233+
```

0 commit comments

Comments
 (0)