Remove a few prints, add some whitespace.

This commit is contained in:
Jeroen Leenarts 2018-10-02 22:36:39 +02:00
parent 03c257cfcc
commit ae1af569d6
4 changed files with 2 additions and 15 deletions

View File

@ -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 {

View File

@ -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)

View File

@ -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)
}
}
}
}

View File

@ -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
}