diff --git a/Lazarus VPN/PacketTunnelProvider.swift b/Lazarus VPN/PacketTunnelProvider.swift index 6e3d39f..c7509c7 100755 --- a/Lazarus VPN/PacketTunnelProvider.swift +++ b/Lazarus VPN/PacketTunnelProvider.swift @@ -26,7 +26,7 @@ class PacketTunnelProvider: NEPacketTunnelProvider { override func startTunnel(options: [String : NSObject]?, completionHandler: @escaping (Error?) -> Void) { DDLog.removeAllLoggers() - DDLog.add(DDASLLogger.sharedInstance, with: DDLogLevel.info) + DDLog.add(DDOSLogger.sharedInstance, with: DDLogLevel.info) ObserverFactory.currentFactory = DebugObserverFactory() NSLog("-------------") @@ -89,8 +89,8 @@ class PacketTunnelProvider: NEPacketTunnelProvider { let raw_dom = dom.string! let index = raw_dom.index(raw_dom.startIndex, offsetBy: 1) let index2 = raw_dom.index(raw_dom.startIndex, offsetBy: 2) - let typeStr = raw_dom.substring(to: index) - let url = raw_dom.substring(from: index2) + let typeStr = String(raw_dom[.. Bool { + internal func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } diff --git a/Lazarus/Assets.xcassets/AppIcon.appiconset/Contents.json b/Lazarus/Assets.xcassets/AppIcon.appiconset/Contents.json index 191d433..4062365 100644 --- a/Lazarus/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/Lazarus/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -149,30 +149,6 @@ "idiom" : "ios-marketing", "filename" : "ItunesArtwork@2x.png", "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@1x.png", - "scale" : "1x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@1x.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "iphone", - "filename" : "Icon-App-76x76@1x.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@3x.png", - "scale" : "3x" } ], "info" : { diff --git a/Lazarus/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@1x.png b/Lazarus/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@1x.png deleted file mode 100644 index 152cfe8..0000000 Binary files a/Lazarus/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@1x.png and /dev/null differ diff --git a/Lazarus/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@3x.png b/Lazarus/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@3x.png deleted file mode 100644 index 4ecbf18..0000000 Binary files a/Lazarus/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@3x.png and /dev/null differ diff --git a/Lazarus/Model/VPNManager.swift b/Lazarus/Model/VPNManager.swift index 96041e2..531a6d7 100755 --- a/Lazarus/Model/VPNManager.swift +++ b/Lazarus/Model/VPNManager.swift @@ -66,6 +66,8 @@ class VPNManager { self.vpnStatus = .disconnecting case .disconnected, .invalid: self.vpnStatus = .off + @unknown default: + fatalError() } print(self.vpnStatus) } diff --git a/Lazarus/ViewController.swift b/Lazarus/ViewController.swift index 27c64f8..70cd05e 100644 --- a/Lazarus/ViewController.swift +++ b/Lazarus/ViewController.swift @@ -42,23 +42,23 @@ class ViewController: UIViewController { self.status = VPNManager.shared.vpnStatus } - func onVPNStatusChanged(){ + @objc func onVPNStatusChanged(){ self.status = VPNManager.shared.vpnStatus } func updateConnectButton(){ switch status { case .connecting: - connectButton.setTitle("Starting", for: UIControlState()) + connectButton.setTitle("Starting", for: UIControl.State()) // statusLabel.text = "Starting" case .disconnecting: - connectButton.setTitle("Disconnecting", for: UIControlState()) + connectButton.setTitle("Disconnecting", for: UIControl.State()) // statusLabel.text = "Disconnecting" case .on: - connectButton.setTitle("Protecting", for: UIControlState()) + connectButton.setTitle("Protecting", for: UIControl.State()) // statusLabel.text = "Protecting" case .off: - connectButton.setTitle("Start Protecting", for: UIControlState()) + connectButton.setTitle("Start Protecting", for: UIControl.State()) // statusLabel.text = "Start Protecting" }