diff --git a/Examples/CitadelCLI/CitadelCLI.xcodeproj/project.pbxproj b/Examples/CitadelCLI/CitadelCLI.xcodeproj/project.pbxproj new file mode 100644 index 0000000..4562f0d --- /dev/null +++ b/Examples/CitadelCLI/CitadelCLI.xcodeproj/project.pbxproj @@ -0,0 +1,606 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 77; + objects = { + +/* Begin PBXBuildFile section */ + 247A3D692CDB320A003B8A01 /* SwiftTerm in Frameworks */ = {isa = PBXBuildFile; productRef = 247A3D682CDB320A003B8A01 /* SwiftTerm */; }; + 247A3D6F2CDB3AD2003B8A01 /* Citadel in Frameworks */ = {isa = PBXBuildFile; productRef = 247A3D6E2CDB3AD2003B8A01 /* Citadel */; }; + 24B73C512CDE8A0C00310BEA /* Citadel in Frameworks */ = {isa = PBXBuildFile; productRef = 24B73C502CDE8A0C00310BEA /* Citadel */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 247A3D482CDB31C1003B8A01 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 247A3D2E2CDB31BF003B8A01 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 247A3D352CDB31BF003B8A01; + remoteInfo = CitadelCLI; + }; + 247A3D522CDB31C1003B8A01 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 247A3D2E2CDB31BF003B8A01 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 247A3D352CDB31BF003B8A01; + remoteInfo = CitadelCLI; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 247A3D362CDB31BF003B8A01 /* CitadelCLI.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CitadelCLI.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 247A3D472CDB31C1003B8A01 /* CitadelCLITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CitadelCLITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 247A3D512CDB31C1003B8A01 /* CitadelCLIUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CitadelCLIUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFileSystemSynchronizedRootGroup section */ + 247A3D382CDB31BF003B8A01 /* CitadelCLI */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = CitadelCLI; + sourceTree = ""; + }; + 247A3D4A2CDB31C1003B8A01 /* CitadelCLITests */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = CitadelCLITests; + sourceTree = ""; + }; + 247A3D542CDB31C1003B8A01 /* CitadelCLIUITests */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = CitadelCLIUITests; + sourceTree = ""; + }; +/* End PBXFileSystemSynchronizedRootGroup section */ + +/* Begin PBXFrameworksBuildPhase section */ + 247A3D332CDB31BF003B8A01 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 24B73C512CDE8A0C00310BEA /* Citadel in Frameworks */, + 247A3D692CDB320A003B8A01 /* SwiftTerm in Frameworks */, + 247A3D6F2CDB3AD2003B8A01 /* Citadel in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 247A3D442CDB31C1003B8A01 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 247A3D4E2CDB31C1003B8A01 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 247A3D2D2CDB31BF003B8A01 = { + isa = PBXGroup; + children = ( + 247A3D382CDB31BF003B8A01 /* CitadelCLI */, + 247A3D4A2CDB31C1003B8A01 /* CitadelCLITests */, + 247A3D542CDB31C1003B8A01 /* CitadelCLIUITests */, + 247A3D372CDB31BF003B8A01 /* Products */, + ); + sourceTree = ""; + }; + 247A3D372CDB31BF003B8A01 /* Products */ = { + isa = PBXGroup; + children = ( + 247A3D362CDB31BF003B8A01 /* CitadelCLI.app */, + 247A3D472CDB31C1003B8A01 /* CitadelCLITests.xctest */, + 247A3D512CDB31C1003B8A01 /* CitadelCLIUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 247A3D352CDB31BF003B8A01 /* CitadelCLI */ = { + isa = PBXNativeTarget; + buildConfigurationList = 247A3D5B2CDB31C1003B8A01 /* Build configuration list for PBXNativeTarget "CitadelCLI" */; + buildPhases = ( + 247A3D322CDB31BF003B8A01 /* Sources */, + 247A3D332CDB31BF003B8A01 /* Frameworks */, + 247A3D342CDB31BF003B8A01 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + fileSystemSynchronizedGroups = ( + 247A3D382CDB31BF003B8A01 /* CitadelCLI */, + ); + name = CitadelCLI; + packageProductDependencies = ( + 247A3D682CDB320A003B8A01 /* SwiftTerm */, + 247A3D6E2CDB3AD2003B8A01 /* Citadel */, + 24B73C502CDE8A0C00310BEA /* Citadel */, + ); + productName = CitadelCLI; + productReference = 247A3D362CDB31BF003B8A01 /* CitadelCLI.app */; + productType = "com.apple.product-type.application"; + }; + 247A3D462CDB31C1003B8A01 /* CitadelCLITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 247A3D5E2CDB31C1003B8A01 /* Build configuration list for PBXNativeTarget "CitadelCLITests" */; + buildPhases = ( + 247A3D432CDB31C1003B8A01 /* Sources */, + 247A3D442CDB31C1003B8A01 /* Frameworks */, + 247A3D452CDB31C1003B8A01 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 247A3D492CDB31C1003B8A01 /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + 247A3D4A2CDB31C1003B8A01 /* CitadelCLITests */, + ); + name = CitadelCLITests; + packageProductDependencies = ( + ); + productName = CitadelCLITests; + productReference = 247A3D472CDB31C1003B8A01 /* CitadelCLITests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 247A3D502CDB31C1003B8A01 /* CitadelCLIUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 247A3D612CDB31C1003B8A01 /* Build configuration list for PBXNativeTarget "CitadelCLIUITests" */; + buildPhases = ( + 247A3D4D2CDB31C1003B8A01 /* Sources */, + 247A3D4E2CDB31C1003B8A01 /* Frameworks */, + 247A3D4F2CDB31C1003B8A01 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 247A3D532CDB31C1003B8A01 /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + 247A3D542CDB31C1003B8A01 /* CitadelCLIUITests */, + ); + name = CitadelCLIUITests; + packageProductDependencies = ( + ); + productName = CitadelCLIUITests; + productReference = 247A3D512CDB31C1003B8A01 /* CitadelCLIUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 247A3D2E2CDB31BF003B8A01 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1600; + LastUpgradeCheck = 1600; + TargetAttributes = { + 247A3D352CDB31BF003B8A01 = { + CreatedOnToolsVersion = 16.0; + }; + 247A3D462CDB31C1003B8A01 = { + CreatedOnToolsVersion = 16.0; + TestTargetID = 247A3D352CDB31BF003B8A01; + }; + 247A3D502CDB31C1003B8A01 = { + CreatedOnToolsVersion = 16.0; + TestTargetID = 247A3D352CDB31BF003B8A01; + }; + }; + }; + buildConfigurationList = 247A3D312CDB31BF003B8A01 /* Build configuration list for PBXProject "CitadelCLI" */; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 247A3D2D2CDB31BF003B8A01; + minimizedProjectReferenceProxies = 1; + packageReferences = ( + 247A3D672CDB320A003B8A01 /* XCRemoteSwiftPackageReference "SwiftTerm" */, + 24B73C4F2CDE8A0C00310BEA /* XCRemoteSwiftPackageReference "Citadel" */, + ); + preferredProjectObjectVersion = 77; + productRefGroup = 247A3D372CDB31BF003B8A01 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 247A3D352CDB31BF003B8A01 /* CitadelCLI */, + 247A3D462CDB31C1003B8A01 /* CitadelCLITests */, + 247A3D502CDB31C1003B8A01 /* CitadelCLIUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 247A3D342CDB31BF003B8A01 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 247A3D452CDB31C1003B8A01 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 247A3D4F2CDB31C1003B8A01 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 247A3D322CDB31BF003B8A01 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 247A3D432CDB31C1003B8A01 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 247A3D4D2CDB31C1003B8A01 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 247A3D492CDB31C1003B8A01 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 247A3D352CDB31BF003B8A01 /* CitadelCLI */; + targetProxy = 247A3D482CDB31C1003B8A01 /* PBXContainerItemProxy */; + }; + 247A3D532CDB31C1003B8A01 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 247A3D352CDB31BF003B8A01 /* CitadelCLI */; + targetProxy = 247A3D522CDB31C1003B8A01 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 247A3D592CDB31C1003B8A01 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + 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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + 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; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + 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; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MACOSX_DEPLOYMENT_TARGET = 15.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 247A3D5A2CDB31C1003B8A01 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + 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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + 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; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + 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; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MACOSX_DEPLOYMENT_TARGET = 15.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + }; + name = Release; + }; + 247A3D5C2CDB31C1003B8A01 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = CitadelCLI/CitadelCLI.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"CitadelCLI/Preview Content\""; + DEVELOPMENT_TEAM = 6U5LP2533T; + ENABLE_HARDENED_RUNTIME = YES; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = software.unbeatable.CitadelCLI; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 247A3D5D2CDB31C1003B8A01 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = CitadelCLI/CitadelCLI.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"CitadelCLI/Preview Content\""; + DEVELOPMENT_TEAM = 6U5LP2533T; + ENABLE_HARDENED_RUNTIME = YES; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = software.unbeatable.CitadelCLI; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 247A3D5F2CDB31C1003B8A01 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 6U5LP2533T; + GENERATE_INFOPLIST_FILE = YES; + MACOSX_DEPLOYMENT_TARGET = 15.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = software.unbeatable.CitadelCLITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CitadelCLI.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/CitadelCLI"; + }; + name = Debug; + }; + 247A3D602CDB31C1003B8A01 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 6U5LP2533T; + GENERATE_INFOPLIST_FILE = YES; + MACOSX_DEPLOYMENT_TARGET = 15.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = software.unbeatable.CitadelCLITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CitadelCLI.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/CitadelCLI"; + }; + name = Release; + }; + 247A3D622CDB31C1003B8A01 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 6U5LP2533T; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = software.unbeatable.CitadelCLIUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TEST_TARGET_NAME = CitadelCLI; + }; + name = Debug; + }; + 247A3D632CDB31C1003B8A01 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 6U5LP2533T; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = software.unbeatable.CitadelCLIUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TEST_TARGET_NAME = CitadelCLI; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 247A3D312CDB31BF003B8A01 /* Build configuration list for PBXProject "CitadelCLI" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 247A3D592CDB31C1003B8A01 /* Debug */, + 247A3D5A2CDB31C1003B8A01 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 247A3D5B2CDB31C1003B8A01 /* Build configuration list for PBXNativeTarget "CitadelCLI" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 247A3D5C2CDB31C1003B8A01 /* Debug */, + 247A3D5D2CDB31C1003B8A01 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 247A3D5E2CDB31C1003B8A01 /* Build configuration list for PBXNativeTarget "CitadelCLITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 247A3D5F2CDB31C1003B8A01 /* Debug */, + 247A3D602CDB31C1003B8A01 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 247A3D612CDB31C1003B8A01 /* Build configuration list for PBXNativeTarget "CitadelCLIUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 247A3D622CDB31C1003B8A01 /* Debug */, + 247A3D632CDB31C1003B8A01 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + 247A3D672CDB320A003B8A01 /* XCRemoteSwiftPackageReference "SwiftTerm" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/migueldeicaza/SwiftTerm.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 1.2.5; + }; + }; + 24B73C4F2CDE8A0C00310BEA /* XCRemoteSwiftPackageReference "Citadel" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/orlandos-nl/Citadel.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 0.8.0; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 247A3D682CDB320A003B8A01 /* SwiftTerm */ = { + isa = XCSwiftPackageProductDependency; + package = 247A3D672CDB320A003B8A01 /* XCRemoteSwiftPackageReference "SwiftTerm" */; + productName = SwiftTerm; + }; + 247A3D6E2CDB3AD2003B8A01 /* Citadel */ = { + isa = XCSwiftPackageProductDependency; + productName = Citadel; + }; + 24B73C502CDE8A0C00310BEA /* Citadel */ = { + isa = XCSwiftPackageProductDependency; + package = 24B73C4F2CDE8A0C00310BEA /* XCRemoteSwiftPackageReference "Citadel" */; + productName = Citadel; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = 247A3D2E2CDB31BF003B8A01 /* Project object */; +} diff --git a/Examples/CitadelCLI/CitadelCLI.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Examples/CitadelCLI/CitadelCLI.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/Examples/CitadelCLI/CitadelCLI.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Examples/CitadelCLI/CitadelCLI.xcodeproj/xcshareddata/xcschemes/CitadelCLI.xcscheme b/Examples/CitadelCLI/CitadelCLI.xcodeproj/xcshareddata/xcschemes/CitadelCLI.xcscheme new file mode 100644 index 0000000..bf06f45 --- /dev/null +++ b/Examples/CitadelCLI/CitadelCLI.xcodeproj/xcshareddata/xcschemes/CitadelCLI.xcscheme @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Examples/CitadelCLI/CitadelCLI/Assets.xcassets/AccentColor.colorset/Contents.json b/Examples/CitadelCLI/CitadelCLI/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Examples/CitadelCLI/CitadelCLI/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/CitadelCLI/CitadelCLI/Assets.xcassets/AppIcon.appiconset/Contents.json b/Examples/CitadelCLI/CitadelCLI/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..3f00db4 --- /dev/null +++ b/Examples/CitadelCLI/CitadelCLI/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,58 @@ +{ + "images" : [ + { + "idiom" : "mac", + "scale" : "1x", + "size" : "16x16" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "16x16" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "32x32" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "32x32" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "128x128" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "128x128" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "512x512" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "512x512" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/CitadelCLI/CitadelCLI/Assets.xcassets/Contents.json b/Examples/CitadelCLI/CitadelCLI/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Examples/CitadelCLI/CitadelCLI/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/CitadelCLI/CitadelCLI/CitadelCLI.entitlements b/Examples/CitadelCLI/CitadelCLI/CitadelCLI.entitlements new file mode 100644 index 0000000..625af03 --- /dev/null +++ b/Examples/CitadelCLI/CitadelCLI/CitadelCLI.entitlements @@ -0,0 +1,12 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.files.user-selected.read-only + + com.apple.security.network.client + + + diff --git a/Examples/CitadelCLI/CitadelCLI/CitadelCLIApp.swift b/Examples/CitadelCLI/CitadelCLI/CitadelCLIApp.swift new file mode 100644 index 0000000..324cd23 --- /dev/null +++ b/Examples/CitadelCLI/CitadelCLI/CitadelCLIApp.swift @@ -0,0 +1,150 @@ +// +// CitadelCLIApp.swift +// CitadelCLI +// +// Created by Joannis Orlandos on 06/11/2024. +// + +import SwiftUI +import NIOCore +import Citadel +import SwiftTerm + +@main +struct CitadelCLIApp: App { + var body: some Scene { + WindowGroup { + SSHView() + .frame(width: 500, height: 500) + } + } +} + +struct SSHView: View { + @State var client: SSHClient? + + var body: some View { + if let client { + Terminal(client: client) + } else { + ProgressView().task { + self.client = try! await SSHClient + .connect( + host: "127.0.0.1", + port: 2222, + authenticationMethod: .passwordBased(username: "ubuntu", password: "test"), + hostKeyValidator: .acceptAnything(), + reconnect: .never + ) + } + } + } +} + +struct Terminal: NSViewRepresentable { + let client: SSHClient + + enum Event { + case send(ByteBuffer) + case changeSize(cols: Int, rows: Int) + } + + final class Coordinator: TerminalViewDelegate { + let client: SSHClient + weak var terminalView: TerminalView! + private let events = AsyncStream.makeStream() + + init(client: SSHClient) { + self.client = client + } + + func sizeChanged(source: TerminalView, newCols: Int, newRows: Int) { + guard newCols > 0, newRows > 0 else { + return + } + + events.continuation.yield(.changeSize(cols: newCols, rows: newRows)) + } + + func setTerminalTitle(source: TerminalView, title: String) { + + } + + func hostCurrentDirectoryUpdate(source: TerminalView, directory: String?) { + + } + + func send(source: TerminalView, data: ArraySlice) { + events.continuation.yield(.send(ByteBuffer(bytes: data))) + } + + func scrolled(source: TerminalView, position: Double) { + + } + + func clipboardCopy(source: TerminalView, content: Data) { + + } + + func rangeChanged(source: TerminalView, startY: Int, endY: Int) { + + } + + func run() async throws { + try await client.withPTY( + .init( + wantReply: true, + term: "", + terminalCharacterWidth: 0, + terminalRowHeight: 0, + terminalPixelWidth: 0, + terminalPixelHeight: 0, + terminalModes: .init([.ECHO: 5]) + ) + ) { [events = events.stream] inbound, outbound in + await withThrowingTaskGroup(of: Void.self) { taskGroup in + taskGroup.addTask { + for try await input in inbound { + switch input { + case .stdout(var buffer), .stderr(var buffer): + let bytes = buffer.readBytes(length: buffer.readableBytes)![...] + await self.terminalView!.feed(byteArray: bytes) + } + } + } + + taskGroup.addTask { + for try await event in events { + switch event { + case .send(let buffer): + try await outbound.write(buffer) + case .changeSize(let cols, let rows): + try await outbound.changeSize(cols: cols, rows: rows) + } + } + } + } + } + } + } + + func makeNSView(context: Context) -> TerminalView { + let terminalView = TerminalView() + terminalView.terminalDelegate = context.coordinator + context.coordinator.terminalView = terminalView + + Task { + try await context.coordinator.run() + } + + return terminalView + } + + func updateNSView(_ nsView: TerminalView, context: Context) { + + } + + func makeCoordinator() -> Coordinator { + Coordinator(client: client) + } +} diff --git a/Examples/CitadelCLI/CitadelCLI/ContentView.swift b/Examples/CitadelCLI/CitadelCLI/ContentView.swift new file mode 100644 index 0000000..655cfe5 --- /dev/null +++ b/Examples/CitadelCLI/CitadelCLI/ContentView.swift @@ -0,0 +1,24 @@ +// +// ContentView.swift +// CitadelCLI +// +// Created by Joannis Orlandos on 06/11/2024. +// + +import SwiftUI + +struct ContentView: View { + var body: some View { + VStack { + Image(systemName: "globe") + .imageScale(.large) + .foregroundStyle(.tint) + Text("Hello, world!") + } + .padding() + } +} + +#Preview { + ContentView() +} diff --git a/Examples/CitadelCLI/CitadelCLI/Preview Content/Preview Assets.xcassets/Contents.json b/Examples/CitadelCLI/CitadelCLI/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Examples/CitadelCLI/CitadelCLI/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/CitadelCLI/CitadelCLITests/CitadelCLITests.swift b/Examples/CitadelCLI/CitadelCLITests/CitadelCLITests.swift new file mode 100644 index 0000000..e895774 --- /dev/null +++ b/Examples/CitadelCLI/CitadelCLITests/CitadelCLITests.swift @@ -0,0 +1,17 @@ +// +// CitadelCLITests.swift +// CitadelCLITests +// +// Created by Joannis Orlandos on 06/11/2024. +// + +import Testing +@testable import CitadelCLI + +struct CitadelCLITests { + + @Test func example() async throws { + // Write your test here and use APIs like `#expect(...)` to check expected conditions. + } + +} diff --git a/Examples/CitadelCLI/CitadelCLIUITests/CitadelCLIUITests.swift b/Examples/CitadelCLI/CitadelCLIUITests/CitadelCLIUITests.swift new file mode 100644 index 0000000..b7ea310 --- /dev/null +++ b/Examples/CitadelCLI/CitadelCLIUITests/CitadelCLIUITests.swift @@ -0,0 +1,43 @@ +// +// CitadelCLIUITests.swift +// CitadelCLIUITests +// +// Created by Joannis Orlandos on 06/11/2024. +// + +import XCTest + +final class CitadelCLIUITests: XCTestCase { + + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + continueAfterFailure = false + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. + } + + override func tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + @MainActor + func testExample() throws { + // UI tests must launch the application that they test. + let app = XCUIApplication() + app.launch() + + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + @MainActor + func testLaunchPerformance() throws { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) { + // This measures how long it takes to launch your application. + measure(metrics: [XCTApplicationLaunchMetric()]) { + XCUIApplication().launch() + } + } + } +} diff --git a/Examples/CitadelCLI/CitadelCLIUITests/CitadelCLIUITestsLaunchTests.swift b/Examples/CitadelCLI/CitadelCLIUITests/CitadelCLIUITestsLaunchTests.swift new file mode 100644 index 0000000..0357b79 --- /dev/null +++ b/Examples/CitadelCLI/CitadelCLIUITests/CitadelCLIUITestsLaunchTests.swift @@ -0,0 +1,33 @@ +// +// CitadelCLIUITestsLaunchTests.swift +// CitadelCLIUITests +// +// Created by Joannis Orlandos on 06/11/2024. +// + +import XCTest + +final class CitadelCLIUITestsLaunchTests: XCTestCase { + + override class var runsForEachTargetApplicationUIConfiguration: Bool { + true + } + + override func setUpWithError() throws { + continueAfterFailure = false + } + + @MainActor + func testLaunch() throws { + let app = XCUIApplication() + app.launch() + + // Insert steps here to perform after app launch but before taking a screenshot, + // such as logging into a test account or navigating somewhere in the app + + let attachment = XCTAttachment(screenshot: app.screenshot()) + attachment.name = "Launch Screen" + attachment.lifetime = .keepAlways + add(attachment) + } +}