diff --git a/WireGuard/Coordinators/AppCoordinator+TunnelInfoTableViewControllerDelegate.swift b/WireGuard/Coordinators/AppCoordinator+TunnelInfoTableViewControllerDelegate.swift index 994911a..aa6f3f2 100644 --- a/WireGuard/Coordinators/AppCoordinator+TunnelInfoTableViewControllerDelegate.swift +++ b/WireGuard/Coordinators/AppCoordinator+TunnelInfoTableViewControllerDelegate.swift @@ -20,7 +20,6 @@ extension AppCoordinator: TunnelInfoTableViewControllerDelegate { } func configure(tunnel: Tunnel, tunnelInfoTableViewController: TunnelInfoTableViewController) { - print("configure tunnel \(tunnel)") let editContext = persistentContainer.newBackgroundContext() var backgroundTunnel: Tunnel? editContext.performAndWait { diff --git a/WireGuard/Coordinators/AppCoordinator+TunnelsTableViewControllerDelegate.swift b/WireGuard/Coordinators/AppCoordinator+TunnelsTableViewControllerDelegate.swift index 2e9aebd..0357c40 100644 --- a/WireGuard/Coordinators/AppCoordinator+TunnelsTableViewControllerDelegate.swift +++ b/WireGuard/Coordinators/AppCoordinator+TunnelsTableViewControllerDelegate.swift @@ -63,14 +63,10 @@ extension AppCoordinator: TunnelsTableViewControllerDelegate { } func info(tunnel: Tunnel, tunnelsTableViewController: TunnelsTableViewController) { - print("info tunnel \(tunnel)") - showTunnelInfoViewController(tunnel: tunnel, context: self.persistentContainer.viewContext) } func delete(tunnel: Tunnel, tunnelsTableViewController: TunnelsTableViewController) { - print("delete tunnel \(tunnel)") - if let moc = tunnel.managedObjectContext { moc.perform { moc.delete(tunnel) diff --git a/WireGuard/Coordinators/AppCoordinator.swift b/WireGuard/Coordinators/AppCoordinator.swift index b3a29c3..aa20c16 100644 --- a/WireGuard/Coordinators/AppCoordinator.swift +++ b/WireGuard/Coordinators/AppCoordinator.swift @@ -71,8 +71,7 @@ class AppCoordinator: RootViewCoordinator { // swiftlint:disable:this type_body_ self.persistentContainer.viewContext.automaticallyMergesChangesFromParent = true self.persistentContainer.loadPersistentStores { [weak self] (_, error) in if let error = error { - print("Unable to Load Persistent Store. \(error), \(error.localizedDescription)") - + os_log("Unable to load Persistent Store: %{public}@", log: Log.general, type: .error, error.localizedDescription) } else { DispatchQueue.main.async { //start @@ -81,13 +80,6 @@ class AppCoordinator: RootViewCoordinator { // swiftlint:disable:this type_body_ self?.tunnelsTableViewController.viewContext = self?.persistentContainer.viewContext self?.tunnelsTableViewController.delegate = self self?.navigationController.viewControllers = [tunnelsTableViewController] - do { - if let context = self?.persistentContainer.viewContext, try Tunnel.countInContext(context) == 0 { - print("No tunnels ... yet") - } - } catch { - self?.showError(error) - } } } } diff --git a/WireGuardNetworkExtension/PacketTunnelProvider.swift b/WireGuardNetworkExtension/PacketTunnelProvider.swift index 103dc90..1480abc 100644 --- a/WireGuardNetworkExtension/PacketTunnelProvider.swift +++ b/WireGuardNetworkExtension/PacketTunnelProvider.swift @@ -75,7 +75,7 @@ class PacketTunnelProvider: NEPacketTunnelProvider { if validatedIPv6Addresses.count > 0 { let ipv6Settings = NEIPv6Settings(addresses: validatedIPv6Addresses.map { $0.ipAddress }, networkPrefixLengths: validatedIPv6Addresses.map { NSNumber(value: $0.subnet) }) ipv6Settings.includedRoutes = [NEIPv6Route.default()] - ipv6Settings.excludedRoutes = validatedEndpoints.filter { $0.addressType == .IPv6}.map { NEIPv6Route(destinationAddress: $0.ipAddress, networkPrefixLength: 128)} + ipv6Settings.excludedRoutes = validatedEndpoints.filter { $0.addressType == .IPv6 }.map { NEIPv6Route(destinationAddress: $0.ipAddress, networkPrefixLength: 128) } newSettings.ipv6Settings = ipv6Settings }