标签 macos 下的文章

我的macbook是2011款,曾经换成固态硬盘,内存从2Gx2升到2G+8G,现在基本上还能应付一般开发。
10.14开始就已经不支持这台2011年款macbook。不过也是从某个网站下的patch工具,将10.14的镜像打上补丁可以升级上来。
Screen Shot 2019-10-09 at 23.54.01.png

10.15也有这样的工具,将macOS Catalina的镜像打上补丁支持旧款macbook. 这个工具网站http://dosdude1.com/catalina/

先查这个再看兼容列表是否支持。
Screen Shot 2019-10-10 at 00.12.59.png




- 阅读剩余部分 -

I'm not sure there are differences of WKWebView usage between iOS app and MacOS app. There I have an issue that a web view on the storyboard can not load a request. Typically there is always the white screen, implies nothing loads.

Finally, I found the solution here. In the Capabilities tab of the project target, it's App Sandbox, check the Network: Outgoing Connections (Client).

Screen Shot 2019-07-25 at 22.28.10.png

需要用的工具:
osascript在macos上可以执行AppleScript, JavaScript等.
这里介绍AppleScript两个常用命令: display, say.

display

这个命令可以在mac上发送系统通知,macos 会在侧边栏显示这个通知消息。
AppleStript这样写 display notification "hello world!"

为了执行这条命令需要用到osascript, 并且需要-e参数,后面跟的单引号字符引用的命令
执行发送这条通知:
osascript -e 'display notification "hello world!"'

Screen Shot 2019-07-17 at 12.31.58.png

这条通知显示在屏幕右上角,3秒后消失。






- 阅读剩余部分 -

Use find to list the current folder:

find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'

Add to ~/.bash_profile or ~/.zshrc
alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
  

Or install the tree with brew
brew install tree