Skip to content

Commit

Permalink
High Sierra as documented minimum version, fix #28
Browse files Browse the repository at this point in the history
  • Loading branch information
kofigumbs committed Dec 21, 2020
1 parent c27ba7f commit 566b63a
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import PackageDescription
let package = Package(
name: "Multi",
platforms: [
.macOS(.v10_11),
.macOS(.v10_13),
],
products: [
.executable(name: "Preferences", targets: ["Preferences"]),
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Watch me create a Slack clone from scratch in 30 seconds (click the GIF for a hi

- Create apps from a UI or the command line
- Configure settings with JSON
- Built-in ad-blocker, provided by <https://better.fyi> (macOS 10.13+)
- Built-in ad-blocker, provided by <https://better.fyi>
- View one tab at a time or all at once with side-by-side view
- Inject custom CSS and JS to any site
- Native bridges for Web APIs
Expand All @@ -23,16 +23,16 @@ Watch me create a Slack clone from scratch in 30 seconds (click the GIF for a hi
- `window.prompt`
- `<input type="file">`


## Installation

Download the latest `.dmg` file from the [releases](https://github.com/kofigumbs/multi/releases) page.

> **Note:** Multi 2.0.0 is a complete rewrite and works differently from previous versions.
> Any older Multi apps on your computer will continue but will lack the new features listed above.
> **Note:** Multi is not notarized, so you'll need to allow it to run via your "Security & Privacy" system preferences.
> See [Licensing](#licensing) for more about sponsoring Multi's development.
> **Note:** If you are on macOS 10.13 High Sierra (the minimum supported version), you'll also need to install [the Swift runtime from Apple](https://download.developer.apple.com/Developer_Tools/Swift_5_Runtime_Support_for_Command_Line_Tools/Swift_5_Runtime_Support_for_Command_Line_Tools.dmg).

## JSON configuration

Expand Down
1 change: 0 additions & 1 deletion Sources/Runtime/Browser+WKUIDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ extension Browser: WKUIDelegate {
alert.window.makeFirstResponder(textField)
}

@available(macOS 10.12, *)
func webView(_ webView: WKWebView, runOpenPanelWith: WKOpenPanelParameters, initiatedByFrame: WKFrameInfo, completionHandler: @escaping ([URL]?) -> Void) {
let openPanel = NSOpenPanel()
if #available(macOS 10.13.4, *) {
Expand Down
11 changes: 3 additions & 8 deletions Sources/Runtime/Tab.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ class Tab: NSObject {
Browser.global.notification(configuration)
Browser.global.customCss(configuration, urls: customCss)
Browser.global.customJs(configuration, urls: customJs)
if #available(macOS 10.13, *) {
WKContentRuleListStore.default().compileContentRuleList(forIdentifier: "blocklist", encodedContentRuleList: Browser.blocklist) { (rules, error) in
rules.map { configuration.userContentController.add($0) }
}
WKContentRuleListStore.default().compileContentRuleList(forIdentifier: "blocklist", encodedContentRuleList: Browser.blocklist) { (rules, error) in
rules.map { configuration.userContentController.add($0) }
}

self.title = title
Expand All @@ -23,10 +21,7 @@ class Tab: NSObject {
webView.allowsBackForwardNavigationGestures = true
webView.uiDelegate = Browser.global
webView.navigationDelegate = Browser.global
if #available(macOS 10.13, *) {
webView.customUserAgent = Browser.userAgent
}

webView.customUserAgent = Browser.userAgent
webView.load(URLRequest(url: url))
}

Expand Down
4 changes: 0 additions & 4 deletions Sources/Shared/Program.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ public class Program: NSObject {
Program.addSubmenu(NSMenu(title: name), submenu)
}

if #available(macOS 10.12, *) {
NSWindow.allowsAutomaticWindowTabbing = false
}

_ = NSApplication.shared
NSApp.delegate = self
NSApp.setActivationPolicy(.regular)
Expand Down
9 changes: 2 additions & 7 deletions Sources/Shared/Script.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,7 @@ extension Script {

private static func execute(_ process: Process) {
let url = URL(fileURLWithPath: "/usr/bin/env")
if #available(macOS 10.13, *) {
process.executableURL = url
try! process.run()
} else {
process.launchPath = url.path
process.launch()
}
process.executableURL = url
try! process.run()
}
}

0 comments on commit 566b63a

Please sign in to comment.