-
Notifications
You must be signed in to change notification settings - Fork 423
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Siri support to start and stop the VPN. (#3415)
Task/Issue URL: https://app.asana.com/0/1207603085593419/1208485618883329/f ## Description Adds Siri support to start and stop the VPN.
- Loading branch information
1 parent
d909c58
commit b05a83c
Showing
28 changed files
with
1,012 additions
and
566 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
// | ||
// VPNAutoShortcuts.swift | ||
// DuckDuckGo | ||
// | ||
// Copyright © 2024 DuckDuckGo. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
import AppIntents | ||
import Foundation | ||
import VPNAppIntents | ||
/* | ||
@available(iOS 17.0, *) | ||
public struct VPNAppIntents: AppIntentsPackage { | ||
public static var includedPackages: [any AppIntentsPackage.Type] { | ||
[VPNAppIntents.self] | ||
} | ||
}*/ | ||
|
||
@available(iOS 17.0, *) | ||
struct VPNAutoShortcutsiOS17: AppShortcutsProvider { | ||
|
||
@AppShortcutsBuilder | ||
static var appShortcuts: [AppShortcut] { | ||
AppShortcut(intent: EnableVPNIntent(), | ||
phrases: [ | ||
"Connect \(.applicationName) VPN", | ||
"Connect the \(.applicationName) VPN", | ||
"Turn \(.applicationName) VPN on", | ||
"Turn the \(.applicationName) VPN on", | ||
"Turn on \(.applicationName) VPN", | ||
"Turn on the \(.applicationName) VPN", | ||
"Enable \(.applicationName) VPN", | ||
"Enable the \(.applicationName) VPN", | ||
"Start \(.applicationName) VPN", | ||
"Start the \(.applicationName) VPN", | ||
"Start the VPN connection with \(.applicationName)", | ||
"Secure my connection with \(.applicationName)", | ||
"Protect my connection with \(.applicationName)" | ||
], | ||
systemImageName: "globe") | ||
AppShortcut(intent: DisableVPNIntent(), | ||
phrases: [ | ||
"Disconnect \(.applicationName) VPN", | ||
"Disconnect the \(.applicationName) VPN", | ||
"Turn \(.applicationName) VPN off", | ||
"Turn the \(.applicationName) VPN off", | ||
"Turn off \(.applicationName) VPN", | ||
"Turn off the \(.applicationName) VPN", | ||
"Disable \(.applicationName) VPN", | ||
"Disable the \(.applicationName) VPN", | ||
"Stop \(.applicationName) VPN", | ||
"Stop the \(.applicationName) VPN", | ||
"Stop a VPN connection with \(.applicationName)" | ||
], | ||
systemImageName: "globe") | ||
} | ||
} |
Oops, something went wrong.