Clarify App Groups usage in Demo
This commit is contained in:
parent
07b69f2a34
commit
4f8a669967
|
@ -78,7 +78,7 @@ YDQ8z9v+DMO6iwyIDRiU
|
|||
extension ViewController {
|
||||
private static let appGroup = "group.com.algoritmico.ios.demo.BasicTunnel"
|
||||
|
||||
private static let bundleIdentifier = "com.algoritmico.ios.demo.BasicTunnel.BasicTunnelExtension"
|
||||
private static let tunnelIdentifier = "com.algoritmico.ios.demo.BasicTunnel.BasicTunnelExtension"
|
||||
|
||||
private func makeProtocol() -> NETunnelProviderProtocol {
|
||||
let server = textServer.text!
|
||||
|
@ -105,7 +105,7 @@ extension ViewController {
|
|||
|
||||
let configuration = builder.build()
|
||||
return try! configuration.generatedTunnelProtocol(
|
||||
withBundleIdentifier: ViewController.bundleIdentifier,
|
||||
withBundleIdentifier: ViewController.tunnelIdentifier,
|
||||
appGroup: ViewController.appGroup,
|
||||
credentials: credentials
|
||||
)
|
||||
|
@ -263,7 +263,7 @@ class ViewController: UIViewController, URLSessionDataDelegate {
|
|||
|
||||
for m in managers! {
|
||||
if let p = m.protocolConfiguration as? NETunnelProviderProtocol {
|
||||
if (p.providerBundleIdentifier == ViewController.bundleIdentifier) {
|
||||
if (p.providerBundleIdentifier == ViewController.tunnelIdentifier) {
|
||||
manager = m
|
||||
break
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ YDQ8z9v+DMO6iwyIDRiU
|
|||
extension ViewController {
|
||||
private static let appGroup = "DTDYD63ZX9.group.com.algoritmico.macos.demo.BasicTunnel"
|
||||
|
||||
private static let bundleIdentifier = "com.algoritmico.macos.demo.BasicTunnel.BasicTunnelExtension"
|
||||
private static let tunnelIdentifier = "com.algoritmico.macos.demo.BasicTunnel.BasicTunnelExtension"
|
||||
|
||||
private func makeProtocol() -> NETunnelProviderProtocol {
|
||||
let server = textServer.stringValue
|
||||
|
@ -106,7 +106,7 @@ extension ViewController {
|
|||
|
||||
let configuration = builder.build()
|
||||
return try! configuration.generatedTunnelProtocol(
|
||||
withBundleIdentifier: ViewController.bundleIdentifier,
|
||||
withBundleIdentifier: ViewController.tunnelIdentifier,
|
||||
appGroup: ViewController.appGroup,
|
||||
credentials: credentials
|
||||
)
|
||||
|
@ -239,7 +239,7 @@ class ViewController: NSViewController {
|
|||
|
||||
for m in managers! {
|
||||
if let p = m.protocolConfiguration as? NETunnelProviderProtocol {
|
||||
if (p.providerBundleIdentifier == ViewController.bundleIdentifier) {
|
||||
if (p.providerBundleIdentifier == ViewController.tunnelIdentifier) {
|
||||
manager = m
|
||||
break
|
||||
}
|
||||
|
|
|
@ -119,6 +119,13 @@ Example:
|
|||
-----END CERTIFICATE-----
|
||||
""")
|
||||
|
||||
Make sure to also update the following constants in the same files, according to your developer account and your target bundle identifiers:
|
||||
|
||||
public static let appGroup
|
||||
public static let tunnelIdentifier
|
||||
|
||||
Remember that the App Group on macOS requires a team ID prefix.
|
||||
|
||||
## Documentation
|
||||
|
||||
The library is split into two modules, in order to decouple the low-level protocol implementation from the platform-specific bridging, namely the [NetworkExtension][ne-home] VPN framework.
|
||||
|
|
Loading…
Reference in New Issue