0

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

blue created at6 years ago view count: 312
report
回复
0
import Cocoa

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

相关搜索关键词