diff --git a/.gitignore b/.gitignore index 330d167..6978494 100644 --- a/.gitignore +++ b/.gitignore @@ -2,38 +2,17 @@ # # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore +## System Files +.DS_Store + ## User settings xcuserdata/ -## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) -*.xcscmblueprint -*.xccheckout - -## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) -build/ -DerivedData/ -*.moved-aside -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 - -## Obj-C/Swift specific -*.hmap - ## App packaging *.ipa *.dSYM.zip *.dSYM -## Playgrounds -timeline.xctimeline -playground.xcworkspace - # Swift Package Manager # # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. @@ -48,43 +27,7 @@ playground.xcworkspace .build/ -# CocoaPods -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# -# Pods/ -# -# Add this line if you want to avoid checking in source code from the Xcode workspace -# *.xcworkspace - -# Carthage -# -# Add this line if you want to avoid checking in source code from Carthage dependencies. -# Carthage/Checkouts - -Carthage/Build/ - -# Accio dependency management -Dependencies/ -.accio/ - -# fastlane -# -# It is recommended to not store the screenshots in the git repo. -# Instead, use fastlane to re-generate the screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://docs.fastlane.tools/best-practices/source-control/#source-control - fastlane/report.xml fastlane/Preview.html fastlane/screenshots/**/*.png fastlane/test_output - -# Code Injection -# -# After new code Injection tools there's a generated folder /iOSInjectionProject -# https://github.com/johnno1962/injectionforxcode - -iOSInjectionProject/ diff --git a/BrailleTeacher.xcodeproj/project.pbxproj b/BrailleTeacher.xcodeproj/project.pbxproj new file mode 100644 index 0000000..3161a89 --- /dev/null +++ b/BrailleTeacher.xcodeproj/project.pbxproj @@ -0,0 +1,666 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 55; + objects = { + +/* Begin PBXBuildFile section */ + 002A215527792EE700E97313 /* HomeButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 002A215427792EE700E97313 /* HomeButton.swift */; }; + 002A21572779324400E97313 /* DictionaryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 002A21562779324400E97313 /* DictionaryView.swift */; }; + 002A215B2779329800E97313 /* BrailleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 002A215A2779329800E97313 /* BrailleView.swift */; }; + 002A215E2779390800E97313 /* Symbol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 002A215D2779390800E97313 /* Symbol.swift */; }; + 002A21602779420900E97313 /* BrailleViewButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 002A215F2779420900E97313 /* BrailleViewButton.swift */; }; + 002A2162277943CE00E97313 /* BrailleTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 002A2161277943CE00E97313 /* BrailleTextView.swift */; }; + 00B8A21927792B5C002C11BD /* BrailleTeacherApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00B8A21827792B5C002C11BD /* BrailleTeacherApp.swift */; }; + 00B8A21B27792B5C002C11BD /* HomeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00B8A21A27792B5C002C11BD /* HomeView.swift */; }; + 00B8A21D27792B5F002C11BD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 00B8A21C27792B5F002C11BD /* Assets.xcassets */; }; + 00B8A22027792B5F002C11BD /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 00B8A21F27792B5F002C11BD /* Preview Assets.xcassets */; }; + 00B8A22A27792B60002C11BD /* BrailleTeacherTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00B8A22927792B60002C11BD /* BrailleTeacherTests.swift */; }; + 00B8A23427792B60002C11BD /* BrailleTeacherUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00B8A23327792B60002C11BD /* BrailleTeacherUITests.swift */; }; + 00B8A23627792B60002C11BD /* BrailleTeacherUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00B8A23527792B60002C11BD /* BrailleTeacherUITestsLaunchTests.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 00B8A22627792B60002C11BD /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 00B8A20D27792B5C002C11BD /* Project object */; + proxyType = 1; + remoteGlobalIDString = 00B8A21427792B5C002C11BD; + remoteInfo = BrailleTeacher; + }; + 00B8A23027792B60002C11BD /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 00B8A20D27792B5C002C11BD /* Project object */; + proxyType = 1; + remoteGlobalIDString = 00B8A21427792B5C002C11BD; + remoteInfo = BrailleTeacher; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 002A215427792EE700E97313 /* HomeButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeButton.swift; sourceTree = ""; }; + 002A21562779324400E97313 /* DictionaryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DictionaryView.swift; sourceTree = ""; }; + 002A215A2779329800E97313 /* BrailleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BrailleView.swift; sourceTree = ""; }; + 002A215D2779390800E97313 /* Symbol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Symbol.swift; sourceTree = ""; }; + 002A215F2779420900E97313 /* BrailleViewButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BrailleViewButton.swift; sourceTree = ""; }; + 002A2161277943CE00E97313 /* BrailleTextView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BrailleTextView.swift; sourceTree = ""; }; + 00B8A21527792B5C002C11BD /* BrailleTeacher.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BrailleTeacher.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 00B8A21827792B5C002C11BD /* BrailleTeacherApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BrailleTeacherApp.swift; sourceTree = ""; }; + 00B8A21A27792B5C002C11BD /* HomeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeView.swift; sourceTree = ""; }; + 00B8A21C27792B5F002C11BD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 00B8A21F27792B5F002C11BD /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + 00B8A22527792B60002C11BD /* BrailleTeacherTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BrailleTeacherTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 00B8A22927792B60002C11BD /* BrailleTeacherTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BrailleTeacherTests.swift; sourceTree = ""; }; + 00B8A22F27792B60002C11BD /* BrailleTeacherUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BrailleTeacherUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 00B8A23327792B60002C11BD /* BrailleTeacherUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BrailleTeacherUITests.swift; sourceTree = ""; }; + 00B8A23527792B60002C11BD /* BrailleTeacherUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BrailleTeacherUITestsLaunchTests.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 00B8A21227792B5C002C11BD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 00B8A22227792B60002C11BD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 00B8A22C27792B60002C11BD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 002A215327792EBD00E97313 /* Components */ = { + isa = PBXGroup; + children = ( + 002A215427792EE700E97313 /* HomeButton.swift */, + 002A215A2779329800E97313 /* BrailleView.swift */, + 002A215F2779420900E97313 /* BrailleViewButton.swift */, + 002A2161277943CE00E97313 /* BrailleTextView.swift */, + ); + path = Components; + sourceTree = ""; + }; + 002A21582779325500E97313 /* Home */ = { + isa = PBXGroup; + children = ( + 00B8A21A27792B5C002C11BD /* HomeView.swift */, + ); + path = Home; + sourceTree = ""; + }; + 002A21592779325E00E97313 /* Dictionary */ = { + isa = PBXGroup; + children = ( + 002A21562779324400E97313 /* DictionaryView.swift */, + ); + path = Dictionary; + sourceTree = ""; + }; + 002A215C277938BF00E97313 /* Models */ = { + isa = PBXGroup; + children = ( + 002A215D2779390800E97313 /* Symbol.swift */, + ); + path = Models; + sourceTree = ""; + }; + 00B8A20C27792B5C002C11BD = { + isa = PBXGroup; + children = ( + 00B8A21727792B5C002C11BD /* BrailleTeacher */, + 00B8A22827792B60002C11BD /* BrailleTeacherTests */, + 00B8A23227792B60002C11BD /* BrailleTeacherUITests */, + 00B8A21627792B5C002C11BD /* Products */, + ); + sourceTree = ""; + }; + 00B8A21627792B5C002C11BD /* Products */ = { + isa = PBXGroup; + children = ( + 00B8A21527792B5C002C11BD /* BrailleTeacher.app */, + 00B8A22527792B60002C11BD /* BrailleTeacherTests.xctest */, + 00B8A22F27792B60002C11BD /* BrailleTeacherUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 00B8A21727792B5C002C11BD /* BrailleTeacher */ = { + isa = PBXGroup; + children = ( + 002A215C277938BF00E97313 /* Models */, + 002A21592779325E00E97313 /* Dictionary */, + 002A21582779325500E97313 /* Home */, + 002A215327792EBD00E97313 /* Components */, + 00B8A21827792B5C002C11BD /* BrailleTeacherApp.swift */, + 00B8A21C27792B5F002C11BD /* Assets.xcassets */, + 00B8A21E27792B5F002C11BD /* Preview Content */, + ); + path = BrailleTeacher; + sourceTree = ""; + }; + 00B8A21E27792B5F002C11BD /* Preview Content */ = { + isa = PBXGroup; + children = ( + 00B8A21F27792B5F002C11BD /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; + 00B8A22827792B60002C11BD /* BrailleTeacherTests */ = { + isa = PBXGroup; + children = ( + 00B8A22927792B60002C11BD /* BrailleTeacherTests.swift */, + ); + path = BrailleTeacherTests; + sourceTree = ""; + }; + 00B8A23227792B60002C11BD /* BrailleTeacherUITests */ = { + isa = PBXGroup; + children = ( + 00B8A23327792B60002C11BD /* BrailleTeacherUITests.swift */, + 00B8A23527792B60002C11BD /* BrailleTeacherUITestsLaunchTests.swift */, + ); + path = BrailleTeacherUITests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 00B8A21427792B5C002C11BD /* BrailleTeacher */ = { + isa = PBXNativeTarget; + buildConfigurationList = 00B8A23927792B60002C11BD /* Build configuration list for PBXNativeTarget "BrailleTeacher" */; + buildPhases = ( + 00B8A21127792B5C002C11BD /* Sources */, + 00B8A21227792B5C002C11BD /* Frameworks */, + 00B8A21327792B5C002C11BD /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = BrailleTeacher; + productName = BrailleTeacher; + productReference = 00B8A21527792B5C002C11BD /* BrailleTeacher.app */; + productType = "com.apple.product-type.application"; + }; + 00B8A22427792B60002C11BD /* BrailleTeacherTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 00B8A23C27792B60002C11BD /* Build configuration list for PBXNativeTarget "BrailleTeacherTests" */; + buildPhases = ( + 00B8A22127792B60002C11BD /* Sources */, + 00B8A22227792B60002C11BD /* Frameworks */, + 00B8A22327792B60002C11BD /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 00B8A22727792B60002C11BD /* PBXTargetDependency */, + ); + name = BrailleTeacherTests; + productName = BrailleTeacherTests; + productReference = 00B8A22527792B60002C11BD /* BrailleTeacherTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 00B8A22E27792B60002C11BD /* BrailleTeacherUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 00B8A23F27792B60002C11BD /* Build configuration list for PBXNativeTarget "BrailleTeacherUITests" */; + buildPhases = ( + 00B8A22B27792B60002C11BD /* Sources */, + 00B8A22C27792B60002C11BD /* Frameworks */, + 00B8A22D27792B60002C11BD /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 00B8A23127792B60002C11BD /* PBXTargetDependency */, + ); + name = BrailleTeacherUITests; + productName = BrailleTeacherUITests; + productReference = 00B8A22F27792B60002C11BD /* BrailleTeacherUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 00B8A20D27792B5C002C11BD /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1310; + LastUpgradeCheck = 1310; + TargetAttributes = { + 00B8A21427792B5C002C11BD = { + CreatedOnToolsVersion = 13.1; + }; + 00B8A22427792B60002C11BD = { + CreatedOnToolsVersion = 13.1; + TestTargetID = 00B8A21427792B5C002C11BD; + }; + 00B8A22E27792B60002C11BD = { + CreatedOnToolsVersion = 13.1; + TestTargetID = 00B8A21427792B5C002C11BD; + }; + }; + }; + buildConfigurationList = 00B8A21027792B5C002C11BD /* Build configuration list for PBXProject "BrailleTeacher" */; + compatibilityVersion = "Xcode 13.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 00B8A20C27792B5C002C11BD; + productRefGroup = 00B8A21627792B5C002C11BD /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 00B8A21427792B5C002C11BD /* BrailleTeacher */, + 00B8A22427792B60002C11BD /* BrailleTeacherTests */, + 00B8A22E27792B60002C11BD /* BrailleTeacherUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 00B8A21327792B5C002C11BD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 00B8A22027792B5F002C11BD /* Preview Assets.xcassets in Resources */, + 00B8A21D27792B5F002C11BD /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 00B8A22327792B60002C11BD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 00B8A22D27792B60002C11BD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 00B8A21127792B5C002C11BD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 002A215B2779329800E97313 /* BrailleView.swift in Sources */, + 002A21572779324400E97313 /* DictionaryView.swift in Sources */, + 00B8A21B27792B5C002C11BD /* HomeView.swift in Sources */, + 002A2162277943CE00E97313 /* BrailleTextView.swift in Sources */, + 002A215527792EE700E97313 /* HomeButton.swift in Sources */, + 002A21602779420900E97313 /* BrailleViewButton.swift in Sources */, + 00B8A21927792B5C002C11BD /* BrailleTeacherApp.swift in Sources */, + 002A215E2779390800E97313 /* Symbol.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 00B8A22127792B60002C11BD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 00B8A22A27792B60002C11BD /* BrailleTeacherTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 00B8A22B27792B60002C11BD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 00B8A23427792B60002C11BD /* BrailleTeacherUITests.swift in Sources */, + 00B8A23627792B60002C11BD /* BrailleTeacherUITestsLaunchTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 00B8A22727792B60002C11BD /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 00B8A21427792B5C002C11BD /* BrailleTeacher */; + targetProxy = 00B8A22627792B60002C11BD /* PBXContainerItemProxy */; + }; + 00B8A23127792B60002C11BD /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 00B8A21427792B5C002C11BD /* BrailleTeacher */; + targetProxy = 00B8A23027792B60002C11BD /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 00B8A23727792B60002C11BD /* 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++17"; + 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_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; + 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 = 15.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 00B8A23827792B60002C11BD /* 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++17"; + 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_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; + 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 = 15.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 00B8A23A27792B60002C11BD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"BrailleTeacher/Preview Content\""; + DEVELOPMENT_TEAM = 54MQQS737M; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.gabecode.BrailleTeacher; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 00B8A23B27792B60002C11BD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"BrailleTeacher/Preview Content\""; + DEVELOPMENT_TEAM = 54MQQS737M; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.gabecode.BrailleTeacher; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 00B8A23D27792B60002C11BD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 54MQQS737M; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.gabecode.BrailleTeacherTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BrailleTeacher.app/BrailleTeacher"; + }; + name = Debug; + }; + 00B8A23E27792B60002C11BD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 54MQQS737M; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.gabecode.BrailleTeacherTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BrailleTeacher.app/BrailleTeacher"; + }; + name = Release; + }; + 00B8A24027792B60002C11BD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 54MQQS737M; + GENERATE_INFOPLIST_FILE = YES; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.gabecode.BrailleTeacherUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = BrailleTeacher; + }; + name = Debug; + }; + 00B8A24127792B60002C11BD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 54MQQS737M; + GENERATE_INFOPLIST_FILE = YES; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.gabecode.BrailleTeacherUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = BrailleTeacher; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 00B8A21027792B5C002C11BD /* Build configuration list for PBXProject "BrailleTeacher" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 00B8A23727792B60002C11BD /* Debug */, + 00B8A23827792B60002C11BD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 00B8A23927792B60002C11BD /* Build configuration list for PBXNativeTarget "BrailleTeacher" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 00B8A23A27792B60002C11BD /* Debug */, + 00B8A23B27792B60002C11BD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 00B8A23C27792B60002C11BD /* Build configuration list for PBXNativeTarget "BrailleTeacherTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 00B8A23D27792B60002C11BD /* Debug */, + 00B8A23E27792B60002C11BD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 00B8A23F27792B60002C11BD /* Build configuration list for PBXNativeTarget "BrailleTeacherUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 00B8A24027792B60002C11BD /* Debug */, + 00B8A24127792B60002C11BD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 00B8A20D27792B5C002C11BD /* Project object */; +} diff --git a/BrailleTeacher.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/BrailleTeacher.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/BrailleTeacher.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/BrailleTeacher.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/BrailleTeacher.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/BrailleTeacher.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/BrailleTeacher/Assets.xcassets/AccentColor.colorset/Contents.json b/BrailleTeacher/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/BrailleTeacher/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/BrailleTeacher/Assets.xcassets/AppIcon.appiconset/Contents.json b/BrailleTeacher/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..9221b9b --- /dev/null +++ b/BrailleTeacher/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/BrailleTeacher/Assets.xcassets/Contents.json b/BrailleTeacher/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/BrailleTeacher/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/BrailleTeacher/BrailleTeacherApp.swift b/BrailleTeacher/BrailleTeacherApp.swift new file mode 100644 index 0000000..04922bf --- /dev/null +++ b/BrailleTeacher/BrailleTeacherApp.swift @@ -0,0 +1,17 @@ +// +// BrailleTeacherApp.swift +// BrailleTeacher +// +// Created by Gabriel Beltrame Silva on 26/12/21. +// + +import SwiftUI + +@main +struct BrailleTeacherApp: App { + var body: some Scene { + WindowGroup { + HomeView() + } + } +} diff --git a/BrailleTeacher/Components/BrailleTextView.swift b/BrailleTeacher/Components/BrailleTextView.swift new file mode 100644 index 0000000..0d89cc5 --- /dev/null +++ b/BrailleTeacher/Components/BrailleTextView.swift @@ -0,0 +1,28 @@ +// +// BrailleTextView.swift +// BrailleTeacher +// +// Created by Gabriel Beltrame Silva on 26/12/21. +// + +import SwiftUI + +struct BrailleTextView: View { + var symbol: Symbol + var isEditable: Bool + + var body: some View { + VStack { + Text(symbol.rawValue) + .font(.system(size: 14, weight: .bold)) + + BrailleView(symbol: symbol, isEditable: isEditable) + } + } +} + +struct BrailleTextView_Previews: PreviewProvider { + static var previews: some View { + BrailleTextView(symbol: .a, isEditable: false) + } +} diff --git a/BrailleTeacher/Components/BrailleView.swift b/BrailleTeacher/Components/BrailleView.swift new file mode 100644 index 0000000..f01eb4d --- /dev/null +++ b/BrailleTeacher/Components/BrailleView.swift @@ -0,0 +1,67 @@ +// +// BrailleView.swift +// BrailleTeacher +// +// Created by Gabriel Beltrame Silva on 26/12/21. +// + +import SwiftUI + +struct BrailleView: View { + var symbol: Symbol + var isEditable: Bool + + var body: some View { + VStack { + Spacer(minLength: 4) + + HStack{ + Spacer(minLength: 4) + + BrailleViewButton(isSelected: (symbol.toInt & 0b10000000) >> 7 == 1) + + Spacer(minLength: 4) + + BrailleViewButton(isSelected: (symbol.toInt & 0b01000000) >> 6 == 1) + + Spacer(minLength: 4) + } + + Spacer(minLength: 4) + + HStack { + Spacer(minLength: 4) + + BrailleViewButton(isSelected: (symbol.toInt & 0b00100000) >> 5 == 1) + + Spacer(minLength: 4) + + BrailleViewButton(isSelected: (symbol.toInt & 0b00010000) >> 4 == 1) + + Spacer(minLength: 4) + } + + Spacer(minLength: 4) + + HStack { + Spacer(minLength: 4) + + BrailleViewButton(isSelected: (symbol.toInt & 0b00001000) >> 3 == 1) + + Spacer(minLength: 4) + + BrailleViewButton(isSelected: (symbol.toInt & 0b00000100) >> 2 == 1) + + Spacer(minLength: 4) + } + + Spacer(minLength: 4) + } + } +} + +struct BrailleView_Previews: PreviewProvider { + static var previews: some View { + BrailleView(symbol: .h, isEditable: false) + } +} diff --git a/BrailleTeacher/Components/BrailleViewButton.swift b/BrailleTeacher/Components/BrailleViewButton.swift new file mode 100644 index 0000000..ff46fc9 --- /dev/null +++ b/BrailleTeacher/Components/BrailleViewButton.swift @@ -0,0 +1,25 @@ +// +// BrailleViewButton.swift +// BrailleTeacher +// +// Created by Gabriel Beltrame Silva on 26/12/21. +// + +import SwiftUI + +struct BrailleViewButton: View { + var isSelected: Bool + + var body: some View { + GeometryReader { metrics in + Circle() + .fill(isSelected ? .black : .gray) + } + } +} + +struct BrailleViewButton_Previews: PreviewProvider { + static var previews: some View { + BrailleViewButton(isSelected: false) + } +} diff --git a/BrailleTeacher/Components/HomeButton.swift b/BrailleTeacher/Components/HomeButton.swift new file mode 100644 index 0000000..871984e --- /dev/null +++ b/BrailleTeacher/Components/HomeButton.swift @@ -0,0 +1,30 @@ +// +// HomeButton.swift +// BrailleTeacher +// +// Created by Gabriel Beltrame Silva on 26/12/21. +// + +import SwiftUI + +struct HomeButton: View { + var text: String + + var body: some View { + Button { + + } label: { + Text(text) + .padding() + .background(.blue) + .foregroundColor(.white) + } + .cornerRadius(15) + } +} + +struct HomeButton_Previews: PreviewProvider { + static var previews: some View { + HomeButton(text: "Example") + } +} diff --git a/BrailleTeacher/Dictionary/DictionaryView.swift b/BrailleTeacher/Dictionary/DictionaryView.swift new file mode 100644 index 0000000..6b35ea0 --- /dev/null +++ b/BrailleTeacher/Dictionary/DictionaryView.swift @@ -0,0 +1,33 @@ +// +// DictionaryView.swift +// BrailleTeacher +// +// Created by Gabriel Beltrame Silva on 26/12/21. +// + +import SwiftUI + +struct DictionaryView: View { + + let columns = [ + GridItem(.adaptive(minimum: 60, maximum: 80)) + ] + + var body: some View { + ScrollView { + LazyVGrid(columns: columns) { + ForEach(Symbol.allCases) { symbol in + BrailleTextView(symbol: symbol, isEditable: false) + .frame(minHeight: 120, maxHeight: 140) + } + } + } + .navigationTitle("Dictionary") + } +} + +struct DictionaryView_Previews: PreviewProvider { + static var previews: some View { + DictionaryView() + } +} diff --git a/BrailleTeacher/Home/HomeView.swift b/BrailleTeacher/Home/HomeView.swift new file mode 100644 index 0000000..4a3e00d --- /dev/null +++ b/BrailleTeacher/Home/HomeView.swift @@ -0,0 +1,46 @@ +// +// HomeView.swift +// BrailleTeacher +// +// Created by Gabriel Beltrame Silva on 26/12/21. +// + +import SwiftUI + +struct HomeView: View { + var body: some View { + NavigationView { + VStack { + Text("Braille Teacher") + .font(.system(size: 25, weight: .bold)) + .padding() + + Spacer(minLength: 20) + + NavigationLink(destination: DictionaryView()) { + Text("Dictionary") + .padding() + .background(.blue) + .foregroundColor(.white) + } + .cornerRadius(15) + + HomeButton(text: "Classes") + + HomeButton(text: "Free Practice") + + Spacer(minLength: 20) + + HomeButton(text: "Settings") + + Spacer(minLength: 20) + } + } + } +} + +struct ContentView_Previews: PreviewProvider { + static var previews: some View { + HomeView() + } +} diff --git a/BrailleTeacher/Models/Symbol.swift b/BrailleTeacher/Models/Symbol.swift new file mode 100644 index 0000000..c155fc4 --- /dev/null +++ b/BrailleTeacher/Models/Symbol.swift @@ -0,0 +1,115 @@ +// +// Symbol.swift +// BrailleTeacher +// +// Created by Gabriel Beltrame Silva on 26/12/21. +// + +import Foundation + +enum Symbol: String, CaseIterable, Identifiable { + var id: String { + return self.rawValue + } + + // MARK: - Letters + case a = "A" + case b = "B" + case c = "C" + case d = "D" + case e = "E" + case f = "F" + case g = "G" + case h = "H" + case i = "I" + case j = "J" + case k = "K" + case l = "L" + case m = "M" + case n = "N" + case o = "O" + case p = "P" + case q = "Q" + case r = "R" + case s = "S" + case t = "T" + case u = "U" + case v = "V" + case w = "W" + case x = "X" + case y = "Y" + case z = "Z" + + // MARK: - Numbers + case zero = "0" + case one = "1" + case two = "2" + case three = "3" + case four = "4" + case five = "5" + case six = "6" + case seven = "7" + case eight = "8" + case nine = "9" + + // MARK: - Functions + + var toInt: UInt8 { + switch self { + case .a, .one: + return 0b10000000 + case .b, .two: + return 0b10100000 + case .c, .three: + return 0b11000000 + case .d, .four: + return 0b11010000 + case .e, .five: + return 0b10010000 + case .f, .six: + return 0b11100000 + case .g, .seven: + return 0b11110000 + case .h, .eight: + return 0b10110000 + case .i, .nine: + return 0b01100000 + case .j: + return 0b01110000 + case .k: + return 0b10001000 + case .l: + return 0b10101000 + case .m: + return 0b11001000 + case .n: + return 0b11011000 + case .o: + return 0b10011000 + case .p: + return 0b11101000 + case .q: + return 0b11111000 + case .r: + return 0b10111000 + case .s: + return 0b01101000 + case .t: + return 0b01111000 + case .u: + return 0b10001100 + case .v: + return 0b10101100 + case .w: + return 0b01110100 + case .x: + return 0b11001100 + case .y: + return 0b11011100 + case .z: + return 0b10011100 + default: + return 0b00000000 + } + } +} diff --git a/BrailleTeacher/Preview Content/Preview Assets.xcassets/Contents.json b/BrailleTeacher/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/BrailleTeacher/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/BrailleTeacherTests/BrailleTeacherTests.swift b/BrailleTeacherTests/BrailleTeacherTests.swift new file mode 100644 index 0000000..1e13187 --- /dev/null +++ b/BrailleTeacherTests/BrailleTeacherTests.swift @@ -0,0 +1,33 @@ +// +// BrailleTeacherTests.swift +// BrailleTeacherTests +// +// Created by Gabriel Beltrame Silva on 26/12/21. +// + +import XCTest +@testable import BrailleTeacher + +class BrailleTeacherTests: XCTestCase { + + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() throws { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() throws { + // This is an example of a performance test case. + self.measure { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/BrailleTeacherUITests/BrailleTeacherUITests.swift b/BrailleTeacherUITests/BrailleTeacherUITests.swift new file mode 100644 index 0000000..3f2d05b --- /dev/null +++ b/BrailleTeacherUITests/BrailleTeacherUITests.swift @@ -0,0 +1,42 @@ +// +// BrailleTeacherUITests.swift +// BrailleTeacherUITests +// +// Created by Gabriel Beltrame Silva on 26/12/21. +// + +import XCTest + +class BrailleTeacherUITests: 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. + } + + func testExample() throws { + // UI tests must launch the application that they test. + let app = XCUIApplication() + app.launch() + + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + 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/BrailleTeacherUITests/BrailleTeacherUITestsLaunchTests.swift b/BrailleTeacherUITests/BrailleTeacherUITestsLaunchTests.swift new file mode 100644 index 0000000..0177383 --- /dev/null +++ b/BrailleTeacherUITests/BrailleTeacherUITestsLaunchTests.swift @@ -0,0 +1,32 @@ +// +// BrailleTeacherUITestsLaunchTests.swift +// BrailleTeacherUITests +// +// Created by Gabriel Beltrame Silva on 26/12/21. +// + +import XCTest + +class BrailleTeacherUITestsLaunchTests: XCTestCase { + + override class var runsForEachTargetApplicationUIConfiguration: Bool { + true + } + + override func setUpWithError() throws { + continueAfterFailure = false + } + + 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) + } +}