Add Microsoft Edge open-in option

This commit is contained in:
Ilya Laktyushin 2019-10-12 09:53:43 +03:00
parent a69bd5f9d8
commit 26d63cf258
2 changed files with 12 additions and 0 deletions

View File

@ -258,6 +258,8 @@
<string>moovit</string>
<string>alook</string>
<string>dgis</string>
<string>microsoft-edge-http</string>
<string>microsoft-edge-https</string>
</array>
<key>LSRequiresIPhoneOS</key>
<true/>

View File

@ -116,6 +116,16 @@ private func allOpenInOptions(context: AccountContext, item: OpenInItem) -> [Ope
}
return .none
}))
options.append(OpenInOption(identifier: "edge", application: .other(title: "Microsoft Edge", identifier: 1288723196, scheme: "microsoft-edge-http", store: nil), action: {
if let url = URL(string: url), var components = URLComponents(url: url, resolvingAgainstBaseURL: true) {
components.scheme = components.scheme == "https" ? "microsoft-edge-https" : "microsoft-edge-http"
if let url = components.string {
return .openUrl(url: url)
}
}
return .none
}))
options.append(OpenInOption(identifier: "duckDuckGo", application: .other(title: "DuckDuckGo", identifier: 663592361, scheme: "ddgQuickLink", store: nil), action: {
return .openUrl(url: "ddgQuickLink://\(url)")