diff --git a/RankingView.swift b/RankingView.swift deleted file mode 100644 index e90cfc4..0000000 --- a/RankingView.swift +++ /dev/null @@ -1,28 +0,0 @@ -import SwiftUI - -struct RankingView { - let ranking : Ranking? - let player : Player? - var body : some View { - VStack(alignment: .leading, spacing: 20) - Color.purple - Text("RANKING") // TODO : penser à créer un style pour les textes - .font(.Title) - .foregroundColor(.white) - Text(ranking.getRank(of:player.id)) - .font(.LargeTitle) - .fontWeight(.bold) - .foregroundColor(.white) - Text("Singles") - .font(.Title2) - .foregroundColor(.white) - } -} - -// TODO verifier si c'est comme ça qu'on fait les previews (il me semble qu'il faut mettre un # preview plutôt que ça) - -struct RankingView_Previews: PreviewProvider { - static var previews: some View { - RankingView() - } -} \ No newline at end of file diff --git a/WtaTennis/WtaTennis.xcodeproj/project.pbxproj b/WtaTennis/WtaTennis.xcodeproj/project.pbxproj new file mode 100644 index 0000000..3f4988b --- /dev/null +++ b/WtaTennis/WtaTennis.xcodeproj/project.pbxproj @@ -0,0 +1,602 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + C205A2B72BF373360097BD93 /* WtaTennisApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = C205A2B62BF373360097BD93 /* WtaTennisApp.swift */; }; + C205A2B92BF373360097BD93 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C205A2B82BF373360097BD93 /* ContentView.swift */; }; + C205A2BB2BF373380097BD93 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C205A2BA2BF373380097BD93 /* Assets.xcassets */; }; + C205A2BE2BF373380097BD93 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C205A2BD2BF373380097BD93 /* Preview Assets.xcassets */; }; + C205A2C82BF373380097BD93 /* WtaTennisTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C205A2C72BF373380097BD93 /* WtaTennisTests.swift */; }; + C205A2D22BF373380097BD93 /* WtaTennisUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C205A2D12BF373380097BD93 /* WtaTennisUITests.swift */; }; + C205A2D42BF373380097BD93 /* WtaTennisUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C205A2D32BF373380097BD93 /* WtaTennisUITestsLaunchTests.swift */; }; + C205A2E12BF374120097BD93 /* RankingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C205A2E02BF374120097BD93 /* RankingView.swift */; }; + C205A2E32BF377030097BD93 /* InfoDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C205A2E22BF377030097BD93 /* InfoDetailView.swift */; }; + C205A2E52BF377540097BD93 /* InfoTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C205A2E42BF377540097BD93 /* InfoTextView.swift */; }; + C205A2E72BF3789B0097BD93 /* PlayerProfileView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C205A2E62BF3789B0097BD93 /* PlayerProfileView.swift */; }; + C205A2E92BF37BBE0097BD93 /* PlayerListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C205A2E82BF37BBE0097BD93 /* PlayerListView.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + C205A2C42BF373380097BD93 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = C205A2AB2BF373360097BD93 /* Project object */; + proxyType = 1; + remoteGlobalIDString = C205A2B22BF373360097BD93; + remoteInfo = WtaTennis; + }; + C205A2CE2BF373380097BD93 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = C205A2AB2BF373360097BD93 /* Project object */; + proxyType = 1; + remoteGlobalIDString = C205A2B22BF373360097BD93; + remoteInfo = WtaTennis; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + C205A2B32BF373360097BD93 /* WtaTennis.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WtaTennis.app; sourceTree = BUILT_PRODUCTS_DIR; }; + C205A2B62BF373360097BD93 /* WtaTennisApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WtaTennisApp.swift; sourceTree = ""; }; + C205A2B82BF373360097BD93 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + C205A2BA2BF373380097BD93 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + C205A2BD2BF373380097BD93 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + C205A2C32BF373380097BD93 /* WtaTennisTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WtaTennisTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + C205A2C72BF373380097BD93 /* WtaTennisTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WtaTennisTests.swift; sourceTree = ""; }; + C205A2CD2BF373380097BD93 /* WtaTennisUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WtaTennisUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + C205A2D12BF373380097BD93 /* WtaTennisUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WtaTennisUITests.swift; sourceTree = ""; }; + C205A2D32BF373380097BD93 /* WtaTennisUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WtaTennisUITestsLaunchTests.swift; sourceTree = ""; }; + C205A2E02BF374120097BD93 /* RankingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RankingView.swift; sourceTree = ""; }; + C205A2E22BF377030097BD93 /* InfoDetailView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InfoDetailView.swift; sourceTree = ""; }; + C205A2E42BF377540097BD93 /* InfoTextView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InfoTextView.swift; sourceTree = ""; }; + C205A2E62BF3789B0097BD93 /* PlayerProfileView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayerProfileView.swift; sourceTree = ""; }; + C205A2E82BF37BBE0097BD93 /* PlayerListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayerListView.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + C205A2B02BF373360097BD93 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + C205A2C02BF373380097BD93 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + C205A2CA2BF373380097BD93 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + C205A2AA2BF373360097BD93 = { + isa = PBXGroup; + children = ( + C205A2B52BF373360097BD93 /* WtaTennis */, + C205A2C62BF373380097BD93 /* WtaTennisTests */, + C205A2D02BF373380097BD93 /* WtaTennisUITests */, + C205A2B42BF373360097BD93 /* Products */, + ); + sourceTree = ""; + }; + C205A2B42BF373360097BD93 /* Products */ = { + isa = PBXGroup; + children = ( + C205A2B32BF373360097BD93 /* WtaTennis.app */, + C205A2C32BF373380097BD93 /* WtaTennisTests.xctest */, + C205A2CD2BF373380097BD93 /* WtaTennisUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + C205A2B52BF373360097BD93 /* WtaTennis */ = { + isa = PBXGroup; + children = ( + C205A2B62BF373360097BD93 /* WtaTennisApp.swift */, + C205A2B82BF373360097BD93 /* ContentView.swift */, + C205A2BA2BF373380097BD93 /* Assets.xcassets */, + C205A2BC2BF373380097BD93 /* Preview Content */, + C205A2E02BF374120097BD93 /* RankingView.swift */, + C205A2E22BF377030097BD93 /* InfoDetailView.swift */, + C205A2E42BF377540097BD93 /* InfoTextView.swift */, + C205A2E62BF3789B0097BD93 /* PlayerProfileView.swift */, + C205A2E82BF37BBE0097BD93 /* PlayerListView.swift */, + ); + path = WtaTennis; + sourceTree = ""; + }; + C205A2BC2BF373380097BD93 /* Preview Content */ = { + isa = PBXGroup; + children = ( + C205A2BD2BF373380097BD93 /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; + C205A2C62BF373380097BD93 /* WtaTennisTests */ = { + isa = PBXGroup; + children = ( + C205A2C72BF373380097BD93 /* WtaTennisTests.swift */, + ); + path = WtaTennisTests; + sourceTree = ""; + }; + C205A2D02BF373380097BD93 /* WtaTennisUITests */ = { + isa = PBXGroup; + children = ( + C205A2D12BF373380097BD93 /* WtaTennisUITests.swift */, + C205A2D32BF373380097BD93 /* WtaTennisUITestsLaunchTests.swift */, + ); + path = WtaTennisUITests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + C205A2B22BF373360097BD93 /* WtaTennis */ = { + isa = PBXNativeTarget; + buildConfigurationList = C205A2D72BF373380097BD93 /* Build configuration list for PBXNativeTarget "WtaTennis" */; + buildPhases = ( + C205A2AF2BF373360097BD93 /* Sources */, + C205A2B02BF373360097BD93 /* Frameworks */, + C205A2B12BF373360097BD93 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = WtaTennis; + productName = WtaTennis; + productReference = C205A2B32BF373360097BD93 /* WtaTennis.app */; + productType = "com.apple.product-type.application"; + }; + C205A2C22BF373380097BD93 /* WtaTennisTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = C205A2DA2BF373380097BD93 /* Build configuration list for PBXNativeTarget "WtaTennisTests" */; + buildPhases = ( + C205A2BF2BF373380097BD93 /* Sources */, + C205A2C02BF373380097BD93 /* Frameworks */, + C205A2C12BF373380097BD93 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + C205A2C52BF373380097BD93 /* PBXTargetDependency */, + ); + name = WtaTennisTests; + productName = WtaTennisTests; + productReference = C205A2C32BF373380097BD93 /* WtaTennisTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + C205A2CC2BF373380097BD93 /* WtaTennisUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = C205A2DD2BF373380097BD93 /* Build configuration list for PBXNativeTarget "WtaTennisUITests" */; + buildPhases = ( + C205A2C92BF373380097BD93 /* Sources */, + C205A2CA2BF373380097BD93 /* Frameworks */, + C205A2CB2BF373380097BD93 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + C205A2CF2BF373380097BD93 /* PBXTargetDependency */, + ); + name = WtaTennisUITests; + productName = WtaTennisUITests; + productReference = C205A2CD2BF373380097BD93 /* WtaTennisUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + C205A2AB2BF373360097BD93 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1420; + LastUpgradeCheck = 1420; + TargetAttributes = { + C205A2B22BF373360097BD93 = { + CreatedOnToolsVersion = 14.2; + }; + C205A2C22BF373380097BD93 = { + CreatedOnToolsVersion = 14.2; + TestTargetID = C205A2B22BF373360097BD93; + }; + C205A2CC2BF373380097BD93 = { + CreatedOnToolsVersion = 14.2; + TestTargetID = C205A2B22BF373360097BD93; + }; + }; + }; + buildConfigurationList = C205A2AE2BF373360097BD93 /* Build configuration list for PBXProject "WtaTennis" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = C205A2AA2BF373360097BD93; + productRefGroup = C205A2B42BF373360097BD93 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + C205A2B22BF373360097BD93 /* WtaTennis */, + C205A2C22BF373380097BD93 /* WtaTennisTests */, + C205A2CC2BF373380097BD93 /* WtaTennisUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + C205A2B12BF373360097BD93 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + C205A2BE2BF373380097BD93 /* Preview Assets.xcassets in Resources */, + C205A2BB2BF373380097BD93 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + C205A2C12BF373380097BD93 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + C205A2CB2BF373380097BD93 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + C205A2AF2BF373360097BD93 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + C205A2E52BF377540097BD93 /* InfoTextView.swift in Sources */, + C205A2B92BF373360097BD93 /* ContentView.swift in Sources */, + C205A2E32BF377030097BD93 /* InfoDetailView.swift in Sources */, + C205A2E92BF37BBE0097BD93 /* PlayerListView.swift in Sources */, + C205A2E72BF3789B0097BD93 /* PlayerProfileView.swift in Sources */, + C205A2E12BF374120097BD93 /* RankingView.swift in Sources */, + C205A2B72BF373360097BD93 /* WtaTennisApp.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + C205A2BF2BF373380097BD93 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + C205A2C82BF373380097BD93 /* WtaTennisTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + C205A2C92BF373380097BD93 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + C205A2D42BF373380097BD93 /* WtaTennisUITestsLaunchTests.swift in Sources */, + C205A2D22BF373380097BD93 /* WtaTennisUITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + C205A2C52BF373380097BD93 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = C205A2B22BF373360097BD93 /* WtaTennis */; + targetProxy = C205A2C42BF373380097BD93 /* PBXContainerItemProxy */; + }; + C205A2CF2BF373380097BD93 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = C205A2B22BF373360097BD93 /* WtaTennis */; + targetProxy = C205A2CE2BF373380097BD93 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + C205A2D52BF373380097BD93 /* 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++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; + 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 = 16.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; + }; + C205A2D62BF373380097BD93 /* 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++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; + 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 = 16.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; + }; + C205A2D82BF373380097BD93 /* 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 = "\"WtaTennis/Preview Content\""; + 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 = UCA.WtaTennis; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + C205A2D92BF373380097BD93 /* 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 = "\"WtaTennis/Preview Content\""; + 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 = UCA.WtaTennis; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + C205A2DB2BF373380097BD93 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.2; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = UCA.WtaTennisTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WtaTennis.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/WtaTennis"; + }; + name = Debug; + }; + C205A2DC2BF373380097BD93 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.2; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = UCA.WtaTennisTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WtaTennis.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/WtaTennis"; + }; + name = Release; + }; + C205A2DE2BF373380097BD93 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = UCA.WtaTennisUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = WtaTennis; + }; + name = Debug; + }; + C205A2DF2BF373380097BD93 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = UCA.WtaTennisUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = WtaTennis; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + C205A2AE2BF373360097BD93 /* Build configuration list for PBXProject "WtaTennis" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C205A2D52BF373380097BD93 /* Debug */, + C205A2D62BF373380097BD93 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C205A2D72BF373380097BD93 /* Build configuration list for PBXNativeTarget "WtaTennis" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C205A2D82BF373380097BD93 /* Debug */, + C205A2D92BF373380097BD93 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C205A2DA2BF373380097BD93 /* Build configuration list for PBXNativeTarget "WtaTennisTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C205A2DB2BF373380097BD93 /* Debug */, + C205A2DC2BF373380097BD93 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C205A2DD2BF373380097BD93 /* Build configuration list for PBXNativeTarget "WtaTennisUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C205A2DE2BF373380097BD93 /* Debug */, + C205A2DF2BF373380097BD93 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = C205A2AB2BF373360097BD93 /* Project object */; +} diff --git a/WtaTennis/WtaTennis.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/WtaTennis/WtaTennis.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/WtaTennis/WtaTennis.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/WtaTennis/WtaTennis.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/WtaTennis/WtaTennis.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/WtaTennis/WtaTennis.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/WtaTennis/WtaTennis/Assets.xcassets/AccentColor.colorset/Contents.json b/WtaTennis/WtaTennis/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/WtaTennis/WtaTennis/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/WtaTennis/WtaTennis/Assets.xcassets/AppIcon.appiconset/Contents.json b/WtaTennis/WtaTennis/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/WtaTennis/WtaTennis/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/WtaTennis/WtaTennis/Assets.xcassets/Contents.json b/WtaTennis/WtaTennis/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/WtaTennis/WtaTennis/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/WtaTennis/WtaTennis/Assets.xcassets/Image.imageset/Contents.json b/WtaTennis/WtaTennis/Assets.xcassets/Image.imageset/Contents.json new file mode 100644 index 0000000..6e18dfc --- /dev/null +++ b/WtaTennis/WtaTennis/Assets.xcassets/Image.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "de79f4d6-f19b-4d93-9356-d005fdb72f2a-91708.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/WtaTennis/WtaTennis/Assets.xcassets/Image.imageset/de79f4d6-f19b-4d93-9356-d005fdb72f2a-91708.png b/WtaTennis/WtaTennis/Assets.xcassets/Image.imageset/de79f4d6-f19b-4d93-9356-d005fdb72f2a-91708.png new file mode 100644 index 0000000..c0107f0 Binary files /dev/null and b/WtaTennis/WtaTennis/Assets.xcassets/Image.imageset/de79f4d6-f19b-4d93-9356-d005fdb72f2a-91708.png differ diff --git a/WtaTennis/WtaTennis/ContentView.swift b/WtaTennis/WtaTennis/ContentView.swift new file mode 100644 index 0000000..309e5b4 --- /dev/null +++ b/WtaTennis/WtaTennis/ContentView.swift @@ -0,0 +1,26 @@ +// +// ContentView.swift +// WtaTennis +// +// Created by Johan LACHENAL on 14/05/2024. +// + +import SwiftUI + +struct ContentView: View { + var body: some View { + VStack { + Image(systemName: "globe") + .imageScale(.large) + .foregroundColor(.accentColor) + Text("Hello, world!") + } + .padding() + } +} + +struct ContentView_Previews: PreviewProvider { + static var previews: some View { + ContentView() + } +} diff --git a/InfoDetailView.swift b/WtaTennis/WtaTennis/InfoDetailView.swift similarity index 54% rename from InfoDetailView.swift rename to WtaTennis/WtaTennis/InfoDetailView.swift index 342ac4b..899aa57 100644 --- a/InfoDetailView.swift +++ b/WtaTennis/WtaTennis/InfoDetailView.swift @@ -1,4 +1,13 @@ -struct IgaSwiatekView: View { +// +// InfoDetailView.swift +// WtaTennis +// +// Created by Johan LACHENAL on 14/05/2024. +// + +import SwiftUI + +struct InfoDetailView: View { var body: some View { ZStack { Color.purple.edgesIgnoringSafeArea(.all) @@ -15,12 +24,19 @@ struct IgaSwiatekView: View { .foregroundColor(.white) } - InfoRow(title: "Height", value: "5' 9\"") - InfoRow(title: "Age", value: "22") - InfoRow(title: "Plays", value: "Right-Handed") - InfoRow(title: "Birthplace", value: "Warsaw, Poland") + InfoTextView(title: "Height", value: "5' 9\"") + InfoTextView(title: "Age", value: "22") + InfoTextView(title: "Plays", value: "Right-Handed") + InfoTextView(title: "Birthplace", value: "Warsaw, Poland") } .padding() } } } + +struct InfoDetailView_Previews: PreviewProvider { + static var previews: some View { + InfoDetailView() + } +} + diff --git a/InfoTextView.swift b/WtaTennis/WtaTennis/InfoTextView.swift similarity index 52% rename from InfoTextView.swift rename to WtaTennis/WtaTennis/InfoTextView.swift index 05946a6..413076d 100644 --- a/InfoTextView.swift +++ b/WtaTennis/WtaTennis/InfoTextView.swift @@ -1,4 +1,13 @@ -struct InfoRow: View { +// +// RankingView.swift +// WtaTennis +// +// Created by Johan LACHENAL on 14/05/2024. +// + +import SwiftUI + +struct InfoTextView: View { var title: String var value: String @@ -13,4 +22,11 @@ struct InfoRow: View { Spacer() } } -} \ No newline at end of file +} + +struct InfoTextView_Previews: PreviewProvider { + static var previews: some View { + InfoTextView(title: "je suis un titre", value: "je suis un contenu") + } +} + diff --git a/CollectionPlayer.swift b/WtaTennis/WtaTennis/PlayerListView.swift similarity index 82% rename from CollectionPlayer.swift rename to WtaTennis/WtaTennis/PlayerListView.swift index fbfa193..ef31643 100644 --- a/CollectionPlayer.swift +++ b/WtaTennis/WtaTennis/PlayerListView.swift @@ -1,3 +1,12 @@ +// +// PlayerListView.swift +// WtaTennis +// +// Created by Johan LACHENAL on 14/05/2024. +// + +import SwiftUI + struct PlayerListView: View { @ObservedObject var viewModel: PlayerViewModel diff --git a/ItemCollectionPlayer.swift b/WtaTennis/WtaTennis/PlayerProfileView.swift similarity index 61% rename from ItemCollectionPlayer.swift rename to WtaTennis/WtaTennis/PlayerProfileView.swift index ccd9018..98cd410 100644 --- a/ItemCollectionPlayer.swift +++ b/WtaTennis/WtaTennis/PlayerProfileView.swift @@ -1,29 +1,43 @@ +// +// ItemCollectionPlayer.swift +// WtaTennis +// +// Created by Johan LACHENAL on 14/05/2024. +// + +import SwiftUI + struct PlayerProfileView: View { - var player: Player var body: some View { HStack(spacing: 15) { - Text("\(player.rank)") + Text("1") // \(player.rank) .font(.largeTitle) .fontWeight(.bold) .foregroundColor(.purple) - Image(player.image) + Image("Image") .resizable() .aspectRatio(contentMode: .fill) .frame(width: 50, height: 50) .clipShape(Circle()) - Text(player.name.uppercased()) + Text("Iga Swiatek") .font(.title2) .fontWeight(.semibold) Spacer() - Label(player.country, systemImage: "flag.fill") + Label(" France ", systemImage: "flag.fill") .labelStyle(.titleAndIcon) .foregroundColor(.red) } .padding(.horizontal) } } + +struct PlayerProfileView_Previews: PreviewProvider { + static var previews: some View { + PlayerProfileView() + } +} diff --git a/WtaTennis/WtaTennis/Preview Content/Preview Assets.xcassets/Contents.json b/WtaTennis/WtaTennis/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/WtaTennis/WtaTennis/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/WtaTennis/WtaTennis/RankingView.swift b/WtaTennis/WtaTennis/RankingView.swift new file mode 100644 index 0000000..40cd95a --- /dev/null +++ b/WtaTennis/WtaTennis/RankingView.swift @@ -0,0 +1,40 @@ +// +// RankingView.swift +// WtaTennis +// +// Created by Johan LACHENAL on 14/05/2024. +// + +import SwiftUI + +struct RankingView: View { + + var body : some View { + ZStack() + { + Rectangle() + .fill(Color.purple) // Rectangle violet + .frame(height: 200) // Ajustez la hauteur du rectangle comme nécessaire + + VStack(alignment: .leading, spacing: 20) { + Text("RANKING") // TODO : penser à créer un style pour les textes + .font(.title) + .foregroundColor(.white) + Text("1") + .font(.largeTitle) + .fontWeight(.bold) + .foregroundColor(.white) + Text("Singles") + .font(.title2) + .foregroundColor(.white) + } + .padding() // Ajoutez un padding pour éloigner le texte des bords du rectangle + } + } +} + +struct RankingView_Previews: PreviewProvider { + static var previews: some View { + RankingView() + } +} diff --git a/WtaTennis/WtaTennis/WtaTennisApp.swift b/WtaTennis/WtaTennis/WtaTennisApp.swift new file mode 100644 index 0000000..7407b71 --- /dev/null +++ b/WtaTennis/WtaTennis/WtaTennisApp.swift @@ -0,0 +1,17 @@ +// +// WtaTennisApp.swift +// WtaTennis +// +// Created by Johan LACHENAL on 14/05/2024. +// + +import SwiftUI + +@main +struct WtaTennisApp: App { + var body: some Scene { + WindowGroup { + ContentView() + } + } +} diff --git a/WtaTennis/WtaTennisTests/WtaTennisTests.swift b/WtaTennis/WtaTennisTests/WtaTennisTests.swift new file mode 100644 index 0000000..fb24c8f --- /dev/null +++ b/WtaTennis/WtaTennisTests/WtaTennisTests.swift @@ -0,0 +1,36 @@ +// +// WtaTennisTests.swift +// WtaTennisTests +// +// Created by Johan LACHENAL on 14/05/2024. +// + +import XCTest +@testable import WtaTennis + +final class WtaTennisTests: 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. + // Any test you write for XCTest can be annotated as throws and async. + // Mark your test throws to produce an unexpected failure when your test encounters an uncaught error. + // Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards. + } + + 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/WtaTennis/WtaTennisUITests/WtaTennisUITests.swift b/WtaTennis/WtaTennisUITests/WtaTennisUITests.swift new file mode 100644 index 0000000..3952e9c --- /dev/null +++ b/WtaTennis/WtaTennisUITests/WtaTennisUITests.swift @@ -0,0 +1,41 @@ +// +// WtaTennisUITests.swift +// WtaTennisUITests +// +// Created by Johan LACHENAL on 14/05/2024. +// + +import XCTest + +final class WtaTennisUITests: 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 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/WtaTennis/WtaTennisUITests/WtaTennisUITestsLaunchTests.swift b/WtaTennis/WtaTennisUITests/WtaTennisUITestsLaunchTests.swift new file mode 100644 index 0000000..9c68f37 --- /dev/null +++ b/WtaTennis/WtaTennisUITests/WtaTennisUITestsLaunchTests.swift @@ -0,0 +1,32 @@ +// +// WtaTennisUITestsLaunchTests.swift +// WtaTennisUITests +// +// Created by Johan LACHENAL on 14/05/2024. +// + +import XCTest + +final class WtaTennisUITestsLaunchTests: 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) + } +}