0

macOS里面怎样通过swift在浏览器里面打开指定URL?

blue created at5 years ago view count: 306
report
回复
0
import Cocoa

if let url = URL(string: "https://www.google.com"), NSWorkspace.shared().open(url) {
   print("default browser was successfully opened")
}
5 years ago 回复

相关搜索关键词

Recent search keywords