diff options
Diffstat (limited to '')
21 files changed, 1251 insertions, 0 deletions
diff --git a/Wireguard.xcodeproj/project.pbxproj b/Wireguard.xcodeproj/project.pbxproj new file mode 100644 index 0000000..349e152 --- /dev/null +++ b/Wireguard.xcodeproj/project.pbxproj @@ -0,0 +1,660 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 4A4BACE620B5F1BF00F12B28 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A4BACE520B5F1BF00F12B28 /* AppDelegate.swift */; }; + 4A4BACE820B5F1BF00F12B28 /* ConnectionsTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A4BACE720B5F1BF00F12B28 /* ConnectionsTableViewController.swift */; }; + 4A4BACEB20B5F1BF00F12B28 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4A4BACE920B5F1BF00F12B28 /* Main.storyboard */; }; + 4A4BACED20B5F1C100F12B28 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4A4BACEC20B5F1C100F12B28 /* Assets.xcassets */; }; + 4A4BACF020B5F1C100F12B28 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4A4BACEE20B5F1C100F12B28 /* LaunchScreen.storyboard */; }; + 4A4BACFB20B5F1C100F12B28 /* WireguardTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A4BACFA20B5F1C100F12B28 /* WireguardTests.swift */; }; + 4A4BAD0620B5F4B500F12B28 /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 4A4BAD0520B5F4B500F12B28 /* Settings.bundle */; }; + 4A4BAD0C20B5F6AA00F12B28 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A4BAD0B20B5F6AA00F12B28 /* AppCoordinator.swift */; }; + 4A4BAD0E20B5F6C300F12B28 /* Coordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A4BAD0D20B5F6C300F12B28 /* Coordinator.swift */; }; + 4A4BAD1020B5F6EC00F12B28 /* RootCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A4BAD0F20B5F6EC00F12B28 /* RootCoordinator.swift */; }; + 4A4BAD1320B5F82400F12B28 /* Identifyable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A4BAD1220B5F82400F12B28 /* Identifyable.swift */; }; + 4A4BAD1720B5F8DE00F12B28 /* Wireguard.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4A4BAD1520B5F8DE00F12B28 /* Wireguard.xcdatamodeld */; }; + 4A4BAD1A20B5F8FF00F12B28 /* Profile+CoreDataClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A4BAD1820B5F8FF00F12B28 /* Profile+CoreDataClass.swift */; }; + 4A4BAD1B20B5F8FF00F12B28 /* Profile+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A4BAD1920B5F8FF00F12B28 /* Profile+CoreDataProperties.swift */; }; + DA734B3636730B94E9C22F47 /* Pods_Wireguard.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BF50C7EC60CD91BBA05E51F /* Pods_Wireguard.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 4A4BACF720B5F1C100F12B28 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4A4BACDA20B5F1BF00F12B28 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 4A4BACE120B5F1BF00F12B28; + remoteInfo = Wireguard; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 4A4BACE220B5F1BF00F12B28 /* Wireguard.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Wireguard.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 4A4BACE520B5F1BF00F12B28 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; + 4A4BACE720B5F1BF00F12B28 /* ConnectionsTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConnectionsTableViewController.swift; sourceTree = "<group>"; }; + 4A4BACEA20B5F1BF00F12B28 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; }; + 4A4BACEC20B5F1C100F12B28 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; + 4A4BACEF20B5F1C100F12B28 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; + 4A4BACF120B5F1C100F12B28 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; + 4A4BACF620B5F1C100F12B28 /* WireguardTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WireguardTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 4A4BACFA20B5F1C100F12B28 /* WireguardTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WireguardTests.swift; sourceTree = "<group>"; }; + 4A4BACFC20B5F1C100F12B28 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; + 4A4BAD0520B5F4B500F12B28 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = "<group>"; }; + 4A4BAD0B20B5F6AA00F12B28 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = "<group>"; }; + 4A4BAD0D20B5F6C300F12B28 /* Coordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Coordinator.swift; sourceTree = "<group>"; }; + 4A4BAD0F20B5F6EC00F12B28 /* RootCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootCoordinator.swift; sourceTree = "<group>"; }; + 4A4BAD1220B5F82400F12B28 /* Identifyable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Identifyable.swift; sourceTree = "<group>"; }; + 4A4BAD1620B5F8DE00F12B28 /* Wireguard.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Wireguard.xcdatamodel; sourceTree = "<group>"; }; + 4A4BAD1820B5F8FF00F12B28 /* Profile+CoreDataClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Profile+CoreDataClass.swift"; sourceTree = "<group>"; }; + 4A4BAD1920B5F8FF00F12B28 /* Profile+CoreDataProperties.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Profile+CoreDataProperties.swift"; sourceTree = "<group>"; }; + 82069F3AE97A82448F990CFB /* Pods-Wireguard.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Wireguard.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Wireguard/Pods-Wireguard.debug.xcconfig"; sourceTree = "<group>"; }; + 8BF50C7EC60CD91BBA05E51F /* Pods_Wireguard.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Wireguard.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + FB0ABC1036F5A16B24286D3C /* Pods-Wireguard.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Wireguard.release.xcconfig"; path = "Pods/Target Support Files/Pods-Wireguard/Pods-Wireguard.release.xcconfig"; sourceTree = "<group>"; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 4A4BACDF20B5F1BF00F12B28 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + DA734B3636730B94E9C22F47 /* Pods_Wireguard.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4A4BACF320B5F1C100F12B28 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 4A4BACD920B5F1BF00F12B28 = { + isa = PBXGroup; + children = ( + 4A4BAD0720B5F4BC00F12B28 /* Resources */, + 4A4BACE420B5F1BF00F12B28 /* Wireguard */, + 4A4BACF920B5F1C100F12B28 /* WireguardTests */, + 4A4BACE320B5F1BF00F12B28 /* Products */, + 87B9E27C2D1820573644527C /* Pods */, + A447093459F091F4358E843F /* Frameworks */, + ); + sourceTree = "<group>"; + }; + 4A4BACE320B5F1BF00F12B28 /* Products */ = { + isa = PBXGroup; + children = ( + 4A4BACE220B5F1BF00F12B28 /* Wireguard.app */, + 4A4BACF620B5F1C100F12B28 /* WireguardTests.xctest */, + ); + name = Products; + sourceTree = "<group>"; + }; + 4A4BACE420B5F1BF00F12B28 /* Wireguard */ = { + isa = PBXGroup; + children = ( + 4A4BAD1420B5F8C000F12B28 /* Models */, + 4A4BAD1120B5F7A000F12B28 /* ViewControllers */, + 4A4BAD0A20B5F65800F12B28 /* Coordinators */, + 4A4BACE520B5F1BF00F12B28 /* AppDelegate.swift */, + 4A4BACE920B5F1BF00F12B28 /* Main.storyboard */, + 4A4BACEC20B5F1C100F12B28 /* Assets.xcassets */, + 4A4BACEE20B5F1C100F12B28 /* LaunchScreen.storyboard */, + 4A4BACF120B5F1C100F12B28 /* Info.plist */, + ); + path = Wireguard; + sourceTree = "<group>"; + }; + 4A4BACF920B5F1C100F12B28 /* WireguardTests */ = { + isa = PBXGroup; + children = ( + 4A4BACFA20B5F1C100F12B28 /* WireguardTests.swift */, + 4A4BACFC20B5F1C100F12B28 /* Info.plist */, + ); + path = WireguardTests; + sourceTree = "<group>"; + }; + 4A4BAD0720B5F4BC00F12B28 /* Resources */ = { + isa = PBXGroup; + children = ( + 4A4BAD0520B5F4B500F12B28 /* Settings.bundle */, + ); + path = Resources; + sourceTree = "<group>"; + }; + 4A4BAD0A20B5F65800F12B28 /* Coordinators */ = { + isa = PBXGroup; + children = ( + 4A4BAD0D20B5F6C300F12B28 /* Coordinator.swift */, + 4A4BAD0F20B5F6EC00F12B28 /* RootCoordinator.swift */, + 4A4BAD0B20B5F6AA00F12B28 /* AppCoordinator.swift */, + ); + path = Coordinators; + sourceTree = "<group>"; + }; + 4A4BAD1120B5F7A000F12B28 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + 4A4BAD1220B5F82400F12B28 /* Identifyable.swift */, + 4A4BACE720B5F1BF00F12B28 /* ConnectionsTableViewController.swift */, + ); + path = ViewControllers; + sourceTree = "<group>"; + }; + 4A4BAD1420B5F8C000F12B28 /* Models */ = { + isa = PBXGroup; + children = ( + 4A4BAD1820B5F8FF00F12B28 /* Profile+CoreDataClass.swift */, + 4A4BAD1920B5F8FF00F12B28 /* Profile+CoreDataProperties.swift */, + 4A4BAD1520B5F8DE00F12B28 /* Wireguard.xcdatamodeld */, + ); + path = Models; + sourceTree = "<group>"; + }; + 87B9E27C2D1820573644527C /* Pods */ = { + isa = PBXGroup; + children = ( + 82069F3AE97A82448F990CFB /* Pods-Wireguard.debug.xcconfig */, + FB0ABC1036F5A16B24286D3C /* Pods-Wireguard.release.xcconfig */, + ); + name = Pods; + sourceTree = "<group>"; + }; + A447093459F091F4358E843F /* Frameworks */ = { + isa = PBXGroup; + children = ( + 8BF50C7EC60CD91BBA05E51F /* Pods_Wireguard.framework */, + ); + name = Frameworks; + sourceTree = "<group>"; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 4A4BACE120B5F1BF00F12B28 /* Wireguard */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4A4BACFF20B5F1C100F12B28 /* Build configuration list for PBXNativeTarget "Wireguard" */; + buildPhases = ( + C9A2E84E53AF419288C5C4BE /* [CP] Check Pods Manifest.lock */, + 4A4BAD0820B5F53900F12B28 /* Swiftlint */, + 4A4BACDE20B5F1BF00F12B28 /* Sources */, + 4A4BACDF20B5F1BF00F12B28 /* Frameworks */, + 4A4BACE020B5F1BF00F12B28 /* Resources */, + 4A4BAD0920B5F56200F12B28 /* Set build number */, + 6F743EFD0F63EA8C605CE349 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Wireguard; + productName = Wireguard; + productReference = 4A4BACE220B5F1BF00F12B28 /* Wireguard.app */; + productType = "com.apple.product-type.application"; + }; + 4A4BACF520B5F1C100F12B28 /* WireguardTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4A4BAD0220B5F1C100F12B28 /* Build configuration list for PBXNativeTarget "WireguardTests" */; + buildPhases = ( + 4A4BACF220B5F1C100F12B28 /* Sources */, + 4A4BACF320B5F1C100F12B28 /* Frameworks */, + 4A4BACF420B5F1C100F12B28 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 4A4BACF820B5F1C100F12B28 /* PBXTargetDependency */, + ); + name = WireguardTests; + productName = WireguardTests; + productReference = 4A4BACF620B5F1C100F12B28 /* WireguardTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 4A4BACDA20B5F1BF00F12B28 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0930; + LastUpgradeCheck = 0930; + ORGANIZATIONNAME = Wireguard; + TargetAttributes = { + 4A4BACE120B5F1BF00F12B28 = { + CreatedOnToolsVersion = 9.3.1; + }; + 4A4BACF520B5F1C100F12B28 = { + CreatedOnToolsVersion = 9.3.1; + TestTargetID = 4A4BACE120B5F1BF00F12B28; + }; + }; + }; + buildConfigurationList = 4A4BACDD20B5F1BF00F12B28 /* Build configuration list for PBXProject "Wireguard" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 4A4BACD920B5F1BF00F12B28; + productRefGroup = 4A4BACE320B5F1BF00F12B28 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 4A4BACE120B5F1BF00F12B28 /* Wireguard */, + 4A4BACF520B5F1C100F12B28 /* WireguardTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 4A4BACE020B5F1BF00F12B28 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4A4BAD0620B5F4B500F12B28 /* Settings.bundle in Resources */, + 4A4BACF020B5F1C100F12B28 /* LaunchScreen.storyboard in Resources */, + 4A4BACED20B5F1C100F12B28 /* Assets.xcassets in Resources */, + 4A4BACEB20B5F1BF00F12B28 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4A4BACF420B5F1C100F12B28 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 4A4BAD0820B5F53900F12B28 /* Swiftlint */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = Swiftlint; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "${PODS_ROOT}/SwiftLint/swiftlint autocorrect\n${PODS_ROOT}/SwiftLint/swiftlint"; + }; + 4A4BAD0920B5F56200F12B28 /* Set build number */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Set build number"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = $SRCROOT/Scripts/set_build_number.sh; + }; + 6F743EFD0F63EA8C605CE349 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${SRCROOT}/Pods/Target Support Files/Pods-Wireguard/Pods-Wireguard-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/AlamofireImage/AlamofireImage.framework", + "${BUILT_PRODUCTS_DIR}/BNRCoreDataStack/BNRCoreDataStack.framework", + "${BUILT_PRODUCTS_DIR}/Disk/Disk.framework", + "${BUILT_PRODUCTS_DIR}/KeychainSwift/KeychainSwift.framework", + "${BUILT_PRODUCTS_DIR}/Moya/Moya.framework", + "${BUILT_PRODUCTS_DIR}/NVActivityIndicatorView/NVActivityIndicatorView.framework", + "${BUILT_PRODUCTS_DIR}/PromiseKit/PromiseKit.framework", + "${BUILT_PRODUCTS_DIR}/Result/Result.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AlamofireImage.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/BNRCoreDataStack.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Disk.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/KeychainSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Moya.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/NVActivityIndicatorView.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PromiseKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Result.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Wireguard/Pods-Wireguard-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + C9A2E84E53AF419288C5C4BE /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Wireguard-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 4A4BACDE20B5F1BF00F12B28 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4A4BAD0C20B5F6AA00F12B28 /* AppCoordinator.swift in Sources */, + 4A4BAD1320B5F82400F12B28 /* Identifyable.swift in Sources */, + 4A4BAD1720B5F8DE00F12B28 /* Wireguard.xcdatamodeld in Sources */, + 4A4BAD1A20B5F8FF00F12B28 /* Profile+CoreDataClass.swift in Sources */, + 4A4BACE820B5F1BF00F12B28 /* ConnectionsTableViewController.swift in Sources */, + 4A4BAD1020B5F6EC00F12B28 /* RootCoordinator.swift in Sources */, + 4A4BAD0E20B5F6C300F12B28 /* Coordinator.swift in Sources */, + 4A4BAD1B20B5F8FF00F12B28 /* Profile+CoreDataProperties.swift in Sources */, + 4A4BACE620B5F1BF00F12B28 /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4A4BACF220B5F1C100F12B28 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4A4BACFB20B5F1C100F12B28 /* WireguardTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 4A4BACF820B5F1C100F12B28 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 4A4BACE120B5F1BF00F12B28 /* Wireguard */; + targetProxy = 4A4BACF720B5F1C100F12B28 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 4A4BACE920B5F1BF00F12B28 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 4A4BACEA20B5F1BF00F12B28 /* Base */, + ); + name = Main.storyboard; + sourceTree = "<group>"; + }; + 4A4BACEE20B5F1C100F12B28 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 4A4BACEF20B5F1C100F12B28 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = "<group>"; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 4A4BACFD20B5F1C100F12B28 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 10.3; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 4A4BACFE20B5F1C100F12B28 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 10.3; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 4A4BAD0020B5F1C100F12B28 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 82069F3AE97A82448F990CFB /* Pods-Wireguard.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Manual; + DEVELOPMENT_TEAM = ""; + INFOPLIST_FILE = Wireguard/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 10.3; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.wireguard.ios.Wireguard; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 4A4BAD0120B5F1C100F12B28 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = FB0ABC1036F5A16B24286D3C /* Pods-Wireguard.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Manual; + DEVELOPMENT_TEAM = ""; + INFOPLIST_FILE = Wireguard/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 10.3; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.wireguard.ios.Wireguard; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 4A4BAD0320B5F1C100F12B28 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = WireguardTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.wireguard.ios.WireguardTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Wireguard.app/Wireguard"; + }; + name = Debug; + }; + 4A4BAD0420B5F1C100F12B28 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = WireguardTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.wireguard.ios.WireguardTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Wireguard.app/Wireguard"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 4A4BACDD20B5F1BF00F12B28 /* Build configuration list for PBXProject "Wireguard" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4A4BACFD20B5F1C100F12B28 /* Debug */, + 4A4BACFE20B5F1C100F12B28 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 4A4BACFF20B5F1C100F12B28 /* Build configuration list for PBXNativeTarget "Wireguard" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4A4BAD0020B5F1C100F12B28 /* Debug */, + 4A4BAD0120B5F1C100F12B28 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 4A4BAD0220B5F1C100F12B28 /* Build configuration list for PBXNativeTarget "WireguardTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4A4BAD0320B5F1C100F12B28 /* Debug */, + 4A4BAD0420B5F1C100F12B28 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCVersionGroup section */ + 4A4BAD1520B5F8DE00F12B28 /* Wireguard.xcdatamodeld */ = { + isa = XCVersionGroup; + children = ( + 4A4BAD1620B5F8DE00F12B28 /* Wireguard.xcdatamodel */, + ); + currentVersion = 4A4BAD1620B5F8DE00F12B28 /* Wireguard.xcdatamodel */; + path = Wireguard.xcdatamodeld; + sourceTree = "<group>"; + versionGroupType = wrapper.xcdatamodel; + }; +/* End XCVersionGroup section */ + }; + rootObject = 4A4BACDA20B5F1BF00F12B28 /* Project object */; +} diff --git a/Wireguard.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Wireguard.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..c323f27 --- /dev/null +++ b/Wireguard.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Workspace + version = "1.0"> + <FileRef + location = "self:Wireguard.xcodeproj"> + </FileRef> +</Workspace> diff --git a/Wireguard.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Wireguard.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Wireguard.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>IDEDidComputeMac32BitWarning</key> + <true/> +</dict> +</plist> diff --git a/Wireguard.xcworkspace/contents.xcworkspacedata b/Wireguard.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..7a555e1 --- /dev/null +++ b/Wireguard.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Workspace + version = "1.0"> + <FileRef + location = "group:Wireguard.xcodeproj"> + </FileRef> + <FileRef + location = "group:Pods/Pods.xcodeproj"> + </FileRef> +</Workspace> diff --git a/Wireguard.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Wireguard.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Wireguard.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>IDEDidComputeMac32BitWarning</key> + <true/> +</dict> +</plist> diff --git a/Wireguard/AppDelegate.swift b/Wireguard/AppDelegate.swift new file mode 100644 index 0000000..4c399e5 --- /dev/null +++ b/Wireguard/AppDelegate.swift @@ -0,0 +1,25 @@ +// +// AppDelegate.swift +// Wireguard +// +// Created by Jeroen Leenarts on 23-05-18. +// Copyright © 2018 Wireguard. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + var appCoordinator: AppCoordinator! + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + + self.window = UIWindow(frame: UIScreen.main.bounds) + self.appCoordinator = AppCoordinator(window: self.window!) + self.appCoordinator.start() + + return true + } +} diff --git a/Wireguard/Assets.xcassets/AppIcon.appiconset/Contents.json b/Wireguard/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d8db8d6 --- /dev/null +++ b/Wireguard/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +}
\ No newline at end of file diff --git a/Wireguard/Assets.xcassets/Contents.json b/Wireguard/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/Wireguard/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +}
\ No newline at end of file diff --git a/Wireguard/Base.lproj/LaunchScreen.storyboard b/Wireguard/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..f83f6fd --- /dev/null +++ b/Wireguard/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" systemVersion="17A277" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM"> + <dependencies> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/> + <capability name="Safe area layout guides" minToolsVersion="9.0"/> + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> + </dependencies> + <scenes> + <!--View Controller--> + <scene sceneID="EHf-IW-A2E"> + <objects> + <viewController id="01J-lp-oVM" sceneMemberID="viewController"> + <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> + <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/> + </view> + </viewController> + <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/> + </objects> + <point key="canvasLocation" x="53" y="375"/> + </scene> + </scenes> +</document> diff --git a/Wireguard/Base.lproj/Main.storyboard b/Wireguard/Base.lproj/Main.storyboard new file mode 100644 index 0000000..5703677 --- /dev/null +++ b/Wireguard/Base.lproj/Main.storyboard @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> + <device id="retina4_7" orientation="portrait"> + <adaptation id="fullscreen"/> + </device> + <dependencies> + <deployment identifier="iOS"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/> + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> + </dependencies> + <scenes> + <!--Connections Table View Controller--> + <scene sceneID="Tud-vM-cYZ"> + <objects> + <tableViewController storyboardIdentifier="ConnectionsTableViewController" id="kTU-BV-32R" customClass="ConnectionsTableViewController" customModule="Wireguard" customModuleProvider="target" sceneMemberID="viewController"> + <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" id="AJg-r0-KJH"> + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <prototypes> + <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" id="fM3-cC-KPN"> + <rect key="frame" x="0.0" y="28" width="375" height="44"/> + <autoresizingMask key="autoresizingMask"/> + <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="fM3-cC-KPN" id="Rv6-XK-aK2"> + <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/> + <autoresizingMask key="autoresizingMask"/> + </tableViewCellContentView> + </tableViewCell> + </prototypes> + <connections> + <outlet property="dataSource" destination="kTU-BV-32R" id="E0F-RC-fZE"/> + <outlet property="delegate" destination="kTU-BV-32R" id="b6T-ZR-cmO"/> + </connections> + </tableView> + </tableViewController> + <placeholder placeholderIdentifier="IBFirstResponder" id="4uZ-Vv-Fry" userLabel="First Responder" sceneMemberID="firstResponder"/> + </objects> + <point key="canvasLocation" x="34" y="154"/> + </scene> + </scenes> +</document> diff --git a/Wireguard/Coordinators/AppCoordinator.swift b/Wireguard/Coordinators/AppCoordinator.swift new file mode 100644 index 0000000..d1fd520 --- /dev/null +++ b/Wireguard/Coordinators/AppCoordinator.swift @@ -0,0 +1,102 @@ +// +// AppCoordinator.swift +// Wireguard +// +// Created by Jeroen Leenarts on 23-05-18. +// Copyright © 2018 Wireguard. All rights reserved. +// + +import Foundation + +import CoreData +import BNRCoreDataStack + +class AppCoordinator: RootViewCoordinator { + + let persistentContainer = NSPersistentContainer(name: "Wireguard") + let storyboard = UIStoryboard(name: "Main", bundle: nil) + + // MARK: - Properties + + var childCoordinators: [Coordinator] = [] + + var rootViewController: UIViewController { + return self.connectionsTableViewController + } + + var connectionsTableViewController: ConnectionsTableViewController! + + /// Window to manage + let window: UIWindow + + let navigationController: UINavigationController = { + let navController = UINavigationController() + return navController + }() + + // MARK: - Init + public init(window: UIWindow) { + self.window = window + + self.window.rootViewController = self.navigationController + self.window.makeKeyAndVisible() + } + + // MARK: - Functions + + /// Starts the coordinator + public func start() { + persistentContainer.viewContext.automaticallyMergesChangesFromParent = true + persistentContainer.loadPersistentStores { [weak self] (_, error) in + if let error = error { + print("Unable to Load Persistent Store. \(error), \(error.localizedDescription)") + + } else { + DispatchQueue.main.async { + //start + if let connectionsTableViewController = self?.storyboard.instantiateViewController(type: ConnectionsTableViewController.self) { + self?.connectionsTableViewController = connectionsTableViewController + self?.connectionsTableViewController.viewContext = self?.persistentContainer.viewContext + self?.connectionsTableViewController.delegate = self + self?.navigationController.viewControllers = [connectionsTableViewController] + do { + if let context = self?.persistentContainer.viewContext, try Profile.countInContext(context) == 0 { + print("No profiles ... yet") + } + } catch { + self?.showError(error) + } + } + } + } + } + } + + public func showError(_ error: Error) { + showAlert(title: NSLocalizedString("Error", comment: "Error alert title"), message: error.localizedDescription) + } + + private func showAlert(title: String, message: String) { + let alert = UIAlertController(title: title, message: message, preferredStyle: .alert) + alert.addAction(UIAlertAction(title: NSLocalizedString("OK", comment: "OK button"), style: .default)) + self.navigationController.present(alert, animated: true) + } +} + +extension AppCoordinator: ConnectionsTableViewControllerDelegate { + func addProvider(connectionsTableViewController: ConnectionsTableViewController) { + // TODO implement + } + + func settings(connectionsTableViewController: ConnectionsTableViewController) { + // TODO implement + } + + func connect(profile: Profile) { + // TODO implement + } + + func delete(profile: Profile) { + // TODO implement + } +} diff --git a/Wireguard/Coordinators/Coordinator.swift b/Wireguard/Coordinators/Coordinator.swift new file mode 100644 index 0000000..d1075a3 --- /dev/null +++ b/Wireguard/Coordinators/Coordinator.swift @@ -0,0 +1,34 @@ +// +// Coordinator.swift +// Wireguard +// +// Created by Jeroen Leenarts on 23-05-18. +// Copyright © 2018 Wireguard. All rights reserved. +// + +import Foundation + +/// The Coordinator protocol +public protocol Coordinator: class { + + /// Starts the coordinator + func start() + + /// The array containing any child Coordinators + var childCoordinators: [Coordinator] { get set } + +} + +public extension Coordinator { + + /// Add a child coordinator to the parent + public func addChildCoordinator(_ childCoordinator: Coordinator) { + self.childCoordinators.append(childCoordinator) + } + + /// Remove a child coordinator from the parent + public func removeChildCoordinator(_ childCoordinator: Coordinator) { + self.childCoordinators = self.childCoordinators.filter { $0 !== childCoordinator } + } + +} diff --git a/Wireguard/Coordinators/RootCoordinator.swift b/Wireguard/Coordinators/RootCoordinator.swift new file mode 100644 index 0000000..0319fef --- /dev/null +++ b/Wireguard/Coordinators/RootCoordinator.swift @@ -0,0 +1,19 @@ +// +// RootCoordinator.swift +// Wireguard +// +// Created by Jeroen Leenarts on 23-05-18. +// Copyright © 2018 Wireguard. All rights reserved. +// + +import Foundation +import UIKit + +public protocol RootViewControllerProvider: class { + // The coordinators 'rootViewController'. It helps to think of this as the view + // controller that can be used to dismiss the coordinator from the view hierarchy. + var rootViewController: UIViewController { get } +} + +/// A Coordinator type that provides a root UIViewController +public typealias RootViewCoordinator = Coordinator & RootViewControllerProvider diff --git a/Wireguard/Info.plist b/Wireguard/Info.plist new file mode 100644 index 0000000..5d036c8 --- /dev/null +++ b/Wireguard/Info.plist @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>$(DEVELOPMENT_LANGUAGE)</string> + <key>CFBundleExecutable</key> + <string>$(EXECUTABLE_NAME)</string> + <key>CFBundleIdentifier</key> + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>$(PRODUCT_NAME)</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleShortVersionString</key> + <string>1.0</string> + <key>CFBundleVersion</key> + <string>auto-generated</string> + <key>LSRequiresIPhoneOS</key> + <true/> + <key>UILaunchStoryboardName</key> + <string>LaunchScreen</string> + <key>UIRequiredDeviceCapabilities</key> + <array> + <string>armv7</string> + </array> + <key>UISupportedInterfaceOrientations</key> + <array> + <string>UIInterfaceOrientationPortrait</string> + <string>UIInterfaceOrientationLandscapeLeft</string> + <string>UIInterfaceOrientationLandscapeRight</string> + </array> + <key>UISupportedInterfaceOrientations~ipad</key> + <array> + <string>UIInterfaceOrientationPortrait</string> + <string>UIInterfaceOrientationPortraitUpsideDown</string> + <string>UIInterfaceOrientationLandscapeLeft</string> + <string>UIInterfaceOrientationLandscapeRight</string> + </array> +</dict> +</plist> diff --git a/Wireguard/Models/Profile+CoreDataClass.swift b/Wireguard/Models/Profile+CoreDataClass.swift new file mode 100644 index 0000000..ab7c2aa --- /dev/null +++ b/Wireguard/Models/Profile+CoreDataClass.swift @@ -0,0 +1,16 @@ +// +// Profile+CoreDataClass.swift +// Wireguard +// +// Created by Jeroen Leenarts on 23-05-18. +// Copyright © 2018 Wireguard. All rights reserved. +// +// + +import Foundation +import CoreData + +@objc(Profile) +public class Profile: NSManagedObject { + +} diff --git a/Wireguard/Models/Profile+CoreDataProperties.swift b/Wireguard/Models/Profile+CoreDataProperties.swift new file mode 100644 index 0000000..8e99ac2 --- /dev/null +++ b/Wireguard/Models/Profile+CoreDataProperties.swift @@ -0,0 +1,19 @@ +// +// Profile+CoreDataProperties.swift +// Wireguard +// +// Created by Jeroen Leenarts on 23-05-18. +// Copyright © 2018 Wireguard. All rights reserved. +// +// + +import Foundation +import CoreData + +extension Profile { + + @nonobjc public class func fetchRequest() -> NSFetchRequest<Profile> { + return NSFetchRequest<Profile>(entityName: "Profile") + } + +} diff --git a/Wireguard/Models/Wireguard.xcdatamodeld/Wireguard.xcdatamodel/contents b/Wireguard/Models/Wireguard.xcdatamodeld/Wireguard.xcdatamodel/contents new file mode 100644 index 0000000..7bced00 --- /dev/null +++ b/Wireguard/Models/Wireguard.xcdatamodeld/Wireguard.xcdatamodel/contents @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="14133" systemVersion="17E202" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier=""> + <entity name="Profile" representedClassName="Profile" syncable="YES"/> + <elements> + <element name="Profile" positionX="-63" positionY="-18" width="128" height="45"/> + </elements> +</model>
\ No newline at end of file diff --git a/Wireguard/ViewControllers/ConnectionsTableViewController.swift b/Wireguard/ViewControllers/ConnectionsTableViewController.swift new file mode 100644 index 0000000..38c0955 --- /dev/null +++ b/Wireguard/ViewControllers/ConnectionsTableViewController.swift @@ -0,0 +1,38 @@ +// +// ConnectionsTableViewController.swift +// Wireguard +// +// Created by Jeroen Leenarts on 23-05-18. +// Copyright © 2018 Wireguard. All rights reserved. +// + +import UIKit + +import CoreData +import BNRCoreDataStack + +protocol ConnectionsTableViewControllerDelegate: class { + func addProvider(connectionsTableViewController: ConnectionsTableViewController) + func settings(connectionsTableViewController: ConnectionsTableViewController) + func connect(profile: Profile) + func delete(profile: Profile) +} + +class ConnectionsTableViewController: UITableViewController { + weak var delegate: ConnectionsTableViewControllerDelegate? + + var viewContext: NSManagedObjectContext! + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view, typically from a nib. + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + +} + +extension ConnectionsTableViewController: Identifyable {} diff --git a/Wireguard/ViewControllers/Identifyable.swift b/Wireguard/ViewControllers/Identifyable.swift new file mode 100644 index 0000000..9312afe --- /dev/null +++ b/Wireguard/ViewControllers/Identifyable.swift @@ -0,0 +1,27 @@ +// +// Identifyable.swift +// Wireguard +// +// Created by Jeroen Leenarts on 23-05-18. +// Copyright © 2018 Wireguard. All rights reserved. +// + +import Foundation +import UIKit + +public protocol Identifyable: class { + static var identifier: String { get } +} + +public extension Identifyable { + static var identifier: String { + return String(describing: Self.self) + } +} + +extension UIStoryboard { + + public func instantiateViewController<T: Identifyable>(type: T.Type) -> T where T: UIViewController { + return self.instantiateViewController(withIdentifier: type.identifier) as! T // swiftlint:disable:this force_cast + } +} diff --git a/WireguardTests/Info.plist b/WireguardTests/Info.plist new file mode 100644 index 0000000..6c40a6c --- /dev/null +++ b/WireguardTests/Info.plist @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>$(DEVELOPMENT_LANGUAGE)</string> + <key>CFBundleExecutable</key> + <string>$(EXECUTABLE_NAME)</string> + <key>CFBundleIdentifier</key> + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>$(PRODUCT_NAME)</string> + <key>CFBundlePackageType</key> + <string>BNDL</string> + <key>CFBundleShortVersionString</key> + <string>1.0</string> + <key>CFBundleVersion</key> + <string>1</string> +</dict> +</plist> diff --git a/WireguardTests/WireguardTests.swift b/WireguardTests/WireguardTests.swift new file mode 100644 index 0000000..50448b6 --- /dev/null +++ b/WireguardTests/WireguardTests.swift @@ -0,0 +1,36 @@ +// +// WireguardTests.swift +// WireguardTests +// +// Created by Jeroen Leenarts on 23-05-18. +// Copyright © 2018 Wireguard. All rights reserved. +// + +import XCTest +@testable import Wireguard + +class WireguardTests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() { + // This is an example of a performance test case. + self.measure { + // Put the code you want to measure the time of here. + } + } + +} |