From 91b928d59fdc5ff8998076e33eb7f2825d7932ce Mon Sep 17 00:00:00 2001 From: Aldin Duraki <62dual1bif@hft-stuttgart.de> Date: Sat, 18 Apr 2020 12:39:42 +0200 Subject: [PATCH] Projectinit --- .gitignore | 112 ++++ GoldWars/GoldWars.xcodeproj/project.pbxproj | 597 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + GoldWars/GoldWars/Actions.sks | Bin 0 -> 1892 bytes GoldWars/GoldWars/AppDelegate.swift | 41 ++ .../AppIcon.appiconset/Contents.json | 98 +++ .../GoldWars/Assets.xcassets/Contents.json | 6 + .../Base.lproj/LaunchScreen.storyboard | 25 + GoldWars/GoldWars/Base.lproj/Main.storyboard | 24 + GoldWars/GoldWars/GameScene.sks | Bin 0 -> 4694 bytes GoldWars/GoldWars/GameScene.swift | 110 ++++ GoldWars/GoldWars/GameViewController.swift | 60 ++ GoldWars/GoldWars/Info.plist | 47 ++ GoldWars/GoldWarsTests/GoldWarsTests.swift | 34 + GoldWars/GoldWarsTests/Info.plist | 22 + .../GoldWarsUITests/GoldWarsUITests.swift | 43 ++ GoldWars/GoldWarsUITests/Info.plist | 22 + 17 files changed, 1248 insertions(+) create mode 100644 .gitignore create mode 100644 GoldWars/GoldWars.xcodeproj/project.pbxproj create mode 100644 GoldWars/GoldWars.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 GoldWars/GoldWars/Actions.sks create mode 100644 GoldWars/GoldWars/AppDelegate.swift create mode 100644 GoldWars/GoldWars/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 GoldWars/GoldWars/Assets.xcassets/Contents.json create mode 100644 GoldWars/GoldWars/Base.lproj/LaunchScreen.storyboard create mode 100644 GoldWars/GoldWars/Base.lproj/Main.storyboard create mode 100644 GoldWars/GoldWars/GameScene.sks create mode 100644 GoldWars/GoldWars/GameScene.swift create mode 100644 GoldWars/GoldWars/GameViewController.swift create mode 100644 GoldWars/GoldWars/Info.plist create mode 100644 GoldWars/GoldWarsTests/GoldWarsTests.swift create mode 100644 GoldWars/GoldWarsTests/Info.plist create mode 100644 GoldWars/GoldWarsUITests/GoldWarsUITests.swift create mode 100644 GoldWars/GoldWarsUITests/Info.plist diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..47933d4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,112 @@ + +# Created by https://www.gitignore.io/api/macos,swift +# Edit at https://www.gitignore.io/?templates=macos,swift + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### Swift ### +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData/ + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata/ + +## Other +*.moved-aside +*.xccheckout +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.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. +# Packages/ +# Package.pins +# Package.resolved +.build/ +# Add this line if you want to avoid checking in Xcode SPM integration. +# .swiftpm/xcode + +# 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/ + +# End of https://www.gitignore.io/api/macos,swift diff --git a/GoldWars/GoldWars.xcodeproj/project.pbxproj b/GoldWars/GoldWars.xcodeproj/project.pbxproj new file mode 100644 index 0000000..226fabe --- /dev/null +++ b/GoldWars/GoldWars.xcodeproj/project.pbxproj @@ -0,0 +1,597 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 110360D3244B101A008610AF /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 110360D2244B101A008610AF /* AppDelegate.swift */; }; + 110360D5244B101A008610AF /* GameScene.sks in Resources */ = {isa = PBXBuildFile; fileRef = 110360D4244B101A008610AF /* GameScene.sks */; }; + 110360D7244B101A008610AF /* Actions.sks in Resources */ = {isa = PBXBuildFile; fileRef = 110360D6244B101A008610AF /* Actions.sks */; }; + 110360D9244B101A008610AF /* GameScene.swift in Sources */ = {isa = PBXBuildFile; fileRef = 110360D8244B101A008610AF /* GameScene.swift */; }; + 110360DB244B101A008610AF /* GameViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 110360DA244B101A008610AF /* GameViewController.swift */; }; + 110360DE244B101A008610AF /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 110360DC244B101A008610AF /* Main.storyboard */; }; + 110360E0244B101B008610AF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 110360DF244B101B008610AF /* Assets.xcassets */; }; + 110360E3244B101B008610AF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 110360E1244B101B008610AF /* LaunchScreen.storyboard */; }; + 110360EE244B101B008610AF /* GoldWarsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 110360ED244B101B008610AF /* GoldWarsTests.swift */; }; + 110360F9244B101B008610AF /* GoldWarsUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 110360F8244B101B008610AF /* GoldWarsUITests.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 110360EA244B101B008610AF /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 110360C7244B101A008610AF /* Project object */; + proxyType = 1; + remoteGlobalIDString = 110360CE244B101A008610AF; + remoteInfo = GoldWars; + }; + 110360F5244B101B008610AF /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 110360C7244B101A008610AF /* Project object */; + proxyType = 1; + remoteGlobalIDString = 110360CE244B101A008610AF; + remoteInfo = GoldWars; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 110360CF244B101A008610AF /* GoldWars.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GoldWars.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 110360D2244B101A008610AF /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 110360D4244B101A008610AF /* GameScene.sks */ = {isa = PBXFileReference; lastKnownFileType = file.sks; path = GameScene.sks; sourceTree = ""; }; + 110360D6244B101A008610AF /* Actions.sks */ = {isa = PBXFileReference; lastKnownFileType = file.sks; path = Actions.sks; sourceTree = ""; }; + 110360D8244B101A008610AF /* GameScene.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameScene.swift; sourceTree = ""; }; + 110360DA244B101A008610AF /* GameViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameViewController.swift; sourceTree = ""; }; + 110360DD244B101A008610AF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 110360DF244B101B008610AF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 110360E2244B101B008610AF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 110360E4244B101B008610AF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 110360E9244B101B008610AF /* GoldWarsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = GoldWarsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 110360ED244B101B008610AF /* GoldWarsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GoldWarsTests.swift; sourceTree = ""; }; + 110360EF244B101B008610AF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 110360F4244B101B008610AF /* GoldWarsUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = GoldWarsUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 110360F8244B101B008610AF /* GoldWarsUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GoldWarsUITests.swift; sourceTree = ""; }; + 110360FA244B101B008610AF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 110360CC244B101A008610AF /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 110360E6244B101B008610AF /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 110360F1244B101B008610AF /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 110360C6244B101A008610AF = { + isa = PBXGroup; + children = ( + 110360D1244B101A008610AF /* GoldWars */, + 110360EC244B101B008610AF /* GoldWarsTests */, + 110360F7244B101B008610AF /* GoldWarsUITests */, + 110360D0244B101A008610AF /* Products */, + ); + sourceTree = ""; + }; + 110360D0244B101A008610AF /* Products */ = { + isa = PBXGroup; + children = ( + 110360CF244B101A008610AF /* GoldWars.app */, + 110360E9244B101B008610AF /* GoldWarsTests.xctest */, + 110360F4244B101B008610AF /* GoldWarsUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 110360D1244B101A008610AF /* GoldWars */ = { + isa = PBXGroup; + children = ( + 110360D2244B101A008610AF /* AppDelegate.swift */, + 110360D4244B101A008610AF /* GameScene.sks */, + 110360D6244B101A008610AF /* Actions.sks */, + 110360D8244B101A008610AF /* GameScene.swift */, + 110360DA244B101A008610AF /* GameViewController.swift */, + 110360DC244B101A008610AF /* Main.storyboard */, + 110360DF244B101B008610AF /* Assets.xcassets */, + 110360E1244B101B008610AF /* LaunchScreen.storyboard */, + 110360E4244B101B008610AF /* Info.plist */, + ); + path = GoldWars; + sourceTree = ""; + }; + 110360EC244B101B008610AF /* GoldWarsTests */ = { + isa = PBXGroup; + children = ( + 110360ED244B101B008610AF /* GoldWarsTests.swift */, + 110360EF244B101B008610AF /* Info.plist */, + ); + path = GoldWarsTests; + sourceTree = ""; + }; + 110360F7244B101B008610AF /* GoldWarsUITests */ = { + isa = PBXGroup; + children = ( + 110360F8244B101B008610AF /* GoldWarsUITests.swift */, + 110360FA244B101B008610AF /* Info.plist */, + ); + path = GoldWarsUITests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 110360CE244B101A008610AF /* GoldWars */ = { + isa = PBXNativeTarget; + buildConfigurationList = 110360FD244B101B008610AF /* Build configuration list for PBXNativeTarget "GoldWars" */; + buildPhases = ( + 110360CB244B101A008610AF /* Sources */, + 110360CC244B101A008610AF /* Frameworks */, + 110360CD244B101A008610AF /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = GoldWars; + productName = GoldWars; + productReference = 110360CF244B101A008610AF /* GoldWars.app */; + productType = "com.apple.product-type.application"; + }; + 110360E8244B101B008610AF /* GoldWarsTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 11036100244B101B008610AF /* Build configuration list for PBXNativeTarget "GoldWarsTests" */; + buildPhases = ( + 110360E5244B101B008610AF /* Sources */, + 110360E6244B101B008610AF /* Frameworks */, + 110360E7244B101B008610AF /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 110360EB244B101B008610AF /* PBXTargetDependency */, + ); + name = GoldWarsTests; + productName = GoldWarsTests; + productReference = 110360E9244B101B008610AF /* GoldWarsTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 110360F3244B101B008610AF /* GoldWarsUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 11036103244B101B008610AF /* Build configuration list for PBXNativeTarget "GoldWarsUITests" */; + buildPhases = ( + 110360F0244B101B008610AF /* Sources */, + 110360F1244B101B008610AF /* Frameworks */, + 110360F2244B101B008610AF /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 110360F6244B101B008610AF /* PBXTargetDependency */, + ); + name = GoldWarsUITests; + productName = GoldWarsUITests; + productReference = 110360F4244B101B008610AF /* GoldWarsUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 110360C7244B101A008610AF /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1130; + LastUpgradeCheck = 1130; + ORGANIZATIONNAME = SP2; + TargetAttributes = { + 110360CE244B101A008610AF = { + CreatedOnToolsVersion = 11.3.1; + }; + 110360E8244B101B008610AF = { + CreatedOnToolsVersion = 11.3.1; + TestTargetID = 110360CE244B101A008610AF; + }; + 110360F3244B101B008610AF = { + CreatedOnToolsVersion = 11.3.1; + TestTargetID = 110360CE244B101A008610AF; + }; + }; + }; + buildConfigurationList = 110360CA244B101A008610AF /* Build configuration list for PBXProject "GoldWars" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 110360C6244B101A008610AF; + productRefGroup = 110360D0244B101A008610AF /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 110360CE244B101A008610AF /* GoldWars */, + 110360E8244B101B008610AF /* GoldWarsTests */, + 110360F3244B101B008610AF /* GoldWarsUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 110360CD244B101A008610AF /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 110360DE244B101A008610AF /* Main.storyboard in Resources */, + 110360D5244B101A008610AF /* GameScene.sks in Resources */, + 110360E0244B101B008610AF /* Assets.xcassets in Resources */, + 110360E3244B101B008610AF /* LaunchScreen.storyboard in Resources */, + 110360D7244B101A008610AF /* Actions.sks in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 110360E7244B101B008610AF /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 110360F2244B101B008610AF /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 110360CB244B101A008610AF /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 110360D9244B101A008610AF /* GameScene.swift in Sources */, + 110360DB244B101A008610AF /* GameViewController.swift in Sources */, + 110360D3244B101A008610AF /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 110360E5244B101B008610AF /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 110360EE244B101B008610AF /* GoldWarsTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 110360F0244B101B008610AF /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 110360F9244B101B008610AF /* GoldWarsUITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 110360EB244B101B008610AF /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 110360CE244B101A008610AF /* GoldWars */; + targetProxy = 110360EA244B101B008610AF /* PBXContainerItemProxy */; + }; + 110360F6244B101B008610AF /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 110360CE244B101A008610AF /* GoldWars */; + targetProxy = 110360F5244B101B008610AF /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 110360DC244B101A008610AF /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 110360DD244B101A008610AF /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 110360E1244B101B008610AF /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 110360E2244B101B008610AF /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 110360FB244B101B008610AF /* 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; + 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 = 13.2; + 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; + }; + 110360FC244B101B008610AF /* 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; + 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 = 13.2; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 110360FE244B101B008610AF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = GoldWars/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.hft.stuttgart.GoldWars; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 2; + }; + name = Debug; + }; + 110360FF244B101B008610AF /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = GoldWars/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.hft.stuttgart.GoldWars; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 2; + }; + name = Release; + }; + 11036101244B101B008610AF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = GoldWarsTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.2; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.hft.stuttgart.GoldWarsTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GoldWars.app/GoldWars"; + }; + name = Debug; + }; + 11036102244B101B008610AF /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = GoldWarsTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.2; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.hft.stuttgart.GoldWarsTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GoldWars.app/GoldWars"; + }; + name = Release; + }; + 11036104244B101B008610AF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = GoldWarsUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.hft.stuttgart.GoldWarsUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = GoldWars; + }; + name = Debug; + }; + 11036105244B101B008610AF /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = GoldWarsUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.hft.stuttgart.GoldWarsUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = GoldWars; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 110360CA244B101A008610AF /* Build configuration list for PBXProject "GoldWars" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 110360FB244B101B008610AF /* Debug */, + 110360FC244B101B008610AF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 110360FD244B101B008610AF /* Build configuration list for PBXNativeTarget "GoldWars" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 110360FE244B101B008610AF /* Debug */, + 110360FF244B101B008610AF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 11036100244B101B008610AF /* Build configuration list for PBXNativeTarget "GoldWarsTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 11036101244B101B008610AF /* Debug */, + 11036102244B101B008610AF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 11036103244B101B008610AF /* Build configuration list for PBXNativeTarget "GoldWarsUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 11036104244B101B008610AF /* Debug */, + 11036105244B101B008610AF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 110360C7244B101A008610AF /* Project object */; +} diff --git a/GoldWars/GoldWars.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/GoldWars/GoldWars.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..d670590 --- /dev/null +++ b/GoldWars/GoldWars.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/GoldWars/GoldWars/Actions.sks b/GoldWars/GoldWars/Actions.sks new file mode 100644 index 0000000000000000000000000000000000000000..053052001e4f4fd4d597c1c74f1ab1919ec27642 GIT binary patch literal 1892 zcmZ`)Yj6`)6uz&eFQ92@dGy_G5(=enKp96$L5ff*(6lru;IeI&c1yYm*-fOibnb+L ziXbnkh*;Vbc~r*AOL@vLhztS(Eh-2K3jT3q#^DDlI*vCFpjFt+-Fx=z-gC}(zVF^t zIc&13<>Xv}2or9=_dl5RZpo?2cEzl>SJg??nrhLD&gxp3xy$sL-4PAo%Jy#ExRB7O z=;0$qjm{X8nUz1WVA9l@TDfkqtzNM^URk~7t+ngczrESpxqbJc!$*#v{qo#bm#=+y z{YJT7aoKFWVc`)22kRh)+mNN=`{lyd%r-RrS+&|N#FSadQUV85ii(Z)Lojir=Xgp25sf#I^mi%JG^u!s( zDK90>ESWVseojKEiRVofW{c67zTjnHp|OhRCDS|~Hp#}|yCp#v&7R6cXN{zpHl6qjc~w zO^^60c+l0=&Y0pK8ex^M=H}##Nny8TJxiRbRvFNpBGyahfGMdJrec2&I#rk3Y$`7F z3(;I+n&saXPvL;~aj>kJao}0*@fbZkzslsVHh?CDCI!(X(?pugej#l5uqHea4dM%e z66;^_hK+3V6gr(^gLi|QA=uPf$*Pr>xFn@o>U_uL?(_Iqi|;ZmzHivZr&D84a(X5? z1Iyk=+z&g+B=nU9kANsdi(Vlc;w};)px&M>h$e%Kt=8c|UIN$CZ z!@_0y!zDj4-1!TP&S_4&%h7q>Ck6S(A!oZEoOf^keleoobaeyEEu6&wVy4H$NJL0wCxjOH9R5gJdlX z9-cinZ~gdFxgaZx>}5{7U86Y^vM-}R96L}lK^}Mp*ntZ)ffle9w1UlG3)l+UKs(q4 zy1`zs9~=aqg2UhhxCE|&+u$zv6A~B+<6$C9hN+N;1~?Lqf*Eiud>$6TX>d9$fpee< zmct5I2baSY@HO}bd=svLYvFph5pIHQa3|aYyWw8AA0C9a;I9ax5Htj(pbRtx%|SA9 zqZYIdwW7^v3)+g>P&@LX?Pv$ug}Trl^bz_P?L!C9C+HA5f{vlj&>3_I^`PtM4!Vo( zqu(*YAvhYxV;+yhId}rL;zhU?*I^r0umd}>hTV86Zp2Nv8B^@REqEn<9k0Tx@h04c z+wpFE03XID@#pv~zJjmf+xR~I13$oj<9`Ssh!8S>gpw!{N0Lbz(Gw#{Ck12%5s5+^ z#7Q*bCQC^pX(G*p5)Wx1Ye*}3k9f%ra-5tXC&?*tnw%kL$vJX?TqKuCFS$W}Cclt- zP%{{=8& BT4?|P literal 0 HcmV?d00001 diff --git a/GoldWars/GoldWars/AppDelegate.swift b/GoldWars/GoldWars/AppDelegate.swift new file mode 100644 index 0000000..17e9b6c --- /dev/null +++ b/GoldWars/GoldWars/AppDelegate.swift @@ -0,0 +1,41 @@ +// +// AppDelegate.swift +// GoldWars +// +// Created by Aldin Duraki on 18.04.20. +// Copyright © 2020 SP2. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + func applicationWillResignActive(_ application: UIApplication) { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(_ application: UIApplication) { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + } + + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. + } + + func applicationDidBecomeActive(_ application: UIApplication) { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + } + + +} + diff --git a/GoldWars/GoldWars/Assets.xcassets/AppIcon.appiconset/Contents.json b/GoldWars/GoldWars/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d8db8d6 --- /dev/null +++ b/GoldWars/GoldWars/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/GoldWars/GoldWars/Assets.xcassets/Contents.json b/GoldWars/GoldWars/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/GoldWars/GoldWars/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/GoldWars/GoldWars/Base.lproj/LaunchScreen.storyboard b/GoldWars/GoldWars/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/GoldWars/GoldWars/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/GoldWars/GoldWars/Base.lproj/Main.storyboard b/GoldWars/GoldWars/Base.lproj/Main.storyboard new file mode 100644 index 0000000..2cc971a --- /dev/null +++ b/GoldWars/GoldWars/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/GoldWars/GoldWars/GameScene.sks b/GoldWars/GoldWars/GameScene.sks new file mode 100644 index 0000000000000000000000000000000000000000..4fe4d9f41e763cb136277f8a00e3f7ce3ea3daa1 GIT binary patch literal 4694 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 literal 0 HcmV?d00001 diff --git a/GoldWars/GoldWars/GameScene.swift b/GoldWars/GoldWars/GameScene.swift new file mode 100644 index 0000000..fa462af --- /dev/null +++ b/GoldWars/GoldWars/GameScene.swift @@ -0,0 +1,110 @@ +// +// GameScene.swift +// GoldWars +// +// Created by Aldin Duraki on 18.04.20. +// Copyright © 2020 SP2. All rights reserved. +// + +import SpriteKit +import GameplayKit + +class GameScene: SKScene { + + var entities = [GKEntity]() + var graphs = [String : GKGraph]() + + private var lastUpdateTime : TimeInterval = 0 + private var label : SKLabelNode? + private var spinnyNode : SKShapeNode? + + override func sceneDidLoad() { + + self.lastUpdateTime = 0 + + // Get label node from scene and store it for use later + self.label = self.childNode(withName: "//helloLabel") as? SKLabelNode + if let label = self.label { + label.alpha = 0.0 + label.run(SKAction.fadeIn(withDuration: 2.0)) + } + + // Create shape node to use during mouse interaction + let w = (self.size.width + self.size.height) * 0.05 + self.spinnyNode = SKShapeNode.init(rectOf: CGSize.init(width: w, height: w), cornerRadius: w * 0.3) + + if let spinnyNode = self.spinnyNode { + spinnyNode.lineWidth = 2.5 + + spinnyNode.run(SKAction.repeatForever(SKAction.rotate(byAngle: CGFloat(Double.pi), duration: 1))) + spinnyNode.run(SKAction.sequence([SKAction.wait(forDuration: 0.5), + SKAction.fadeOut(withDuration: 0.5), + SKAction.removeFromParent()])) + } + } + + + func touchDown(atPoint pos : CGPoint) { + if let n = self.spinnyNode?.copy() as! SKShapeNode? { + n.position = pos + n.strokeColor = SKColor.green + self.addChild(n) + } + } + + func touchMoved(toPoint pos : CGPoint) { + if let n = self.spinnyNode?.copy() as! SKShapeNode? { + n.position = pos + n.strokeColor = SKColor.blue + self.addChild(n) + } + } + + func touchUp(atPoint pos : CGPoint) { + if let n = self.spinnyNode?.copy() as! SKShapeNode? { + n.position = pos + n.strokeColor = SKColor.red + self.addChild(n) + } + } + + override func touchesBegan(_ touches: Set, with event: UIEvent?) { + if let label = self.label { + label.run(SKAction.init(named: "Pulse")!, withKey: "fadeInOut") + } + + for t in touches { self.touchDown(atPoint: t.location(in: self)) } + } + + override func touchesMoved(_ touches: Set, with event: UIEvent?) { + for t in touches { self.touchMoved(toPoint: t.location(in: self)) } + } + + override func touchesEnded(_ touches: Set, with event: UIEvent?) { + for t in touches { self.touchUp(atPoint: t.location(in: self)) } + } + + override func touchesCancelled(_ touches: Set, with event: UIEvent?) { + for t in touches { self.touchUp(atPoint: t.location(in: self)) } + } + + + override func update(_ currentTime: TimeInterval) { + // Called before each frame is rendered + + // Initialize _lastUpdateTime if it has not already been + if (self.lastUpdateTime == 0) { + self.lastUpdateTime = currentTime + } + + // Calculate time since last update + let dt = currentTime - self.lastUpdateTime + + // Update entities + for entity in self.entities { + entity.update(deltaTime: dt) + } + + self.lastUpdateTime = currentTime + } +} diff --git a/GoldWars/GoldWars/GameViewController.swift b/GoldWars/GoldWars/GameViewController.swift new file mode 100644 index 0000000..880b8ba --- /dev/null +++ b/GoldWars/GoldWars/GameViewController.swift @@ -0,0 +1,60 @@ +// +// GameViewController.swift +// GoldWars +// +// Created by Aldin Duraki on 18.04.20. +// Copyright © 2020 SP2. All rights reserved. +// + +import UIKit +import SpriteKit +import GameplayKit + +class GameViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Load 'GameScene.sks' as a GKScene. This provides gameplay related content + // including entities and graphs. + if let scene = GKScene(fileNamed: "GameScene") { + + // Get the SKScene from the loaded GKScene + if let sceneNode = scene.rootNode as! GameScene? { + + // Copy gameplay related content over to the scene + sceneNode.entities = scene.entities + sceneNode.graphs = scene.graphs + + // Set the scale mode to scale to fit the window + sceneNode.scaleMode = .aspectFill + + // Present the scene + if let view = self.view as! SKView? { + view.presentScene(sceneNode) + + view.ignoresSiblingOrder = true + + view.showsFPS = true + view.showsNodeCount = true + } + } + } + } + + override var shouldAutorotate: Bool { + return true + } + + override var supportedInterfaceOrientations: UIInterfaceOrientationMask { + if UIDevice.current.userInterfaceIdiom == .phone { + return .allButUpsideDown + } else { + return .all + } + } + + override var prefersStatusBarHidden: Bool { + return true + } +} diff --git a/GoldWars/GoldWars/Info.plist b/GoldWars/GoldWars/Info.plist new file mode 100644 index 0000000..870f784 --- /dev/null +++ b/GoldWars/GoldWars/Info.plist @@ -0,0 +1,47 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UIStatusBarHidden + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/GoldWars/GoldWarsTests/GoldWarsTests.swift b/GoldWars/GoldWarsTests/GoldWarsTests.swift new file mode 100644 index 0000000..8f24b2e --- /dev/null +++ b/GoldWars/GoldWarsTests/GoldWarsTests.swift @@ -0,0 +1,34 @@ +// +// GoldWarsTests.swift +// GoldWarsTests +// +// Created by Aldin Duraki on 18.04.20. +// Copyright © 2020 SP2. All rights reserved. +// + +import XCTest +@testable import GoldWars + +class GoldWarsTests: XCTestCase { + + override func 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. + } + + 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. + } + } + +} diff --git a/GoldWars/GoldWarsTests/Info.plist b/GoldWars/GoldWarsTests/Info.plist new file mode 100644 index 0000000..64d65ca --- /dev/null +++ b/GoldWars/GoldWarsTests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/GoldWars/GoldWarsUITests/GoldWarsUITests.swift b/GoldWars/GoldWarsUITests/GoldWarsUITests.swift new file mode 100644 index 0000000..f296a38 --- /dev/null +++ b/GoldWars/GoldWarsUITests/GoldWarsUITests.swift @@ -0,0 +1,43 @@ +// +// GoldWarsUITests.swift +// GoldWarsUITests +// +// Created by Aldin Duraki on 18.04.20. +// Copyright © 2020 SP2. All rights reserved. +// + +import XCTest + +class GoldWarsUITests: XCTestCase { + + override func setUp() { + // 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 tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() { + // 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() { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, *) { + // This measures how long it takes to launch your application. + measure(metrics: [XCTOSSignpostMetric.applicationLaunch]) { + XCUIApplication().launch() + } + } + } +} diff --git a/GoldWars/GoldWarsUITests/Info.plist b/GoldWars/GoldWarsUITests/Info.plist new file mode 100644 index 0000000..64d65ca --- /dev/null +++ b/GoldWars/GoldWarsUITests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + +