diff --git a/.swiftlint.yml b/.swiftlint.yml index 70973f53..58d4367c 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -23,9 +23,13 @@ force_cast: warning # implicitly. Give warning only for force casting force_try: severity: warning # explicitly. Give warning only for force try +function_body_length: +- 100 # warning +- 120 # error + type_body_length: - 300 # warning -- 400 # error +- 500 # error # or they can set both explicitly file_length: diff --git a/Podfile b/Podfile index 5723711d..e305bcd4 100644 --- a/Podfile +++ b/Podfile @@ -1,34 +1,41 @@ # Uncomment the next line to define a global platform for your project -# platform :ios, '9.0' +platform :ios, '11.0' + target 'Uplift' do # Comment the next line if you're not using Swift and don't want to use dynamic frameworks use_frameworks! pod 'AlamofireImage' - pod 'Apollo', :git => 'https://github.com/apollographql/apollo-ios.git', :commit => 'b28c3dc' + pod 'Apollo'#, :git => 'https://github.com/apollographql/apollo-ios.git', :commit => 'b28c3dc' pod 'AppDevAnnouncements', :git => 'https://github.com/cuappdev/appdev-announcements.git' pod 'AppDevHistogram', :git => 'https://github.com/cuappdev/appdev-histogram.git' pod 'Bartinter' - pod 'Crashlytics' - pod 'FLEX', '~> 2.0', :configurations => ['Debug'] - pod 'Fabric' + pod 'Crashlytics' # TODO: - remove + pod 'Fabric' # TODO: - remove pod 'Firebase/Analytics' pod 'GoogleSignIn' - pod 'Kingfisher', '~> 4.0' - pod 'Presentation', :git=> 'https://github.com/cuappdev/Presentation.git', :commit => 'd4aa2d3ad5901f6ebce0727af592824982f88d13' + pod 'Kingfisher' + pod 'Presentation', :git=> 'https://github.com/cuappdev/Presentation.git', :commit => 'b53eb453d2e1520e724cfac5e3e444e730ffe985' pod 'SideMenu', '~> 6.0' pod 'SkeletonView' pod 'SnapKit' pod 'SwiftLint' - #pod 'FadingEdgesCollectionView', :git=> 'https://github.com/cuappdev/FadingEdgesCollectionView' +# target 'Uplift Tests' do +# inherit! :complete +# end end + + + post_install do |installer| installer.pods_project.targets.each do |target| - if ['Alamofire', 'Bartinter', 'SnapKit'].include?(target.name) - target.build_configurations.each do |config| - config.build_settings['SWIFT_VERSION'] = '4.2' - end + target.build_configurations.each do |config| + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11' + xcconfig_path = config.base_configuration_reference.real_path + xcconfig = File.read(xcconfig_path) + xcconfig_mod = xcconfig.gsub(/DT_TOOLCHAIN_DIR/, "TOOLCHAIN_DIR") + File.open(xcconfig_path, "w") { |file| file << xcconfig_mod } end end -end +end \ No newline at end of file diff --git a/Podfile.lock b/Podfile.lock index 1ef0001f..cb1c3501 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,123 +1,131 @@ PODS: - - Alamofire (5.1.0) - - AlamofireImage (4.1.0): - - Alamofire (~> 5.1) - - Apollo (0.9.5): - - Apollo/Core (= 0.9.5) - - Apollo/Core (0.9.5) - - AppAuth (1.3.0): - - AppAuth/Core (= 1.3.0) - - AppAuth/ExternalUserAgent (= 1.3.0) - - AppAuth/Core (1.3.0) - - AppAuth/ExternalUserAgent (1.3.0) + - Alamofire (5.8.0) + - AlamofireImage (4.3.0): + - Alamofire (~> 5.8) + - Apollo (0.39.0): + - Apollo/Core (= 0.39.0) + - Apollo/Core (0.39.0) + - AppAuth (1.6.2): + - AppAuth/Core (= 1.6.2) + - AppAuth/ExternalUserAgent (= 1.6.2) + - AppAuth/Core (1.6.2) + - AppAuth/ExternalUserAgent (1.6.2): + - AppAuth/Core - AppDevAnnouncements (0.0.1) - - AppDevHistogram (1.0.0): - - SnapKit (~> 4.2.0) + - AppDevHistogram (1.0.1): + - SnapKit - Bartinter (0.0.5) - Crashlytics (3.14.0): - Fabric (~> 1.10.2) - Fabric (1.10.2) - - Firebase/Analytics (6.23.0): + - Firebase/Analytics (10.15.0): - Firebase/Core - - Firebase/Core (6.23.0): + - Firebase/Core (10.15.0): - Firebase/CoreOnly - - FirebaseAnalytics (= 6.4.2) - - Firebase/CoreOnly (6.23.0): - - FirebaseCore (= 6.6.7) - - FirebaseAnalytics (6.4.2): - - FirebaseCore (~> 6.6) - - FirebaseInstallations (~> 1.2) - - GoogleAppMeasurement (= 6.4.2) - - GoogleUtilities/AppDelegateSwizzler (~> 6.0) - - GoogleUtilities/MethodSwizzler (~> 6.0) - - GoogleUtilities/Network (~> 6.0) - - "GoogleUtilities/NSData+zlib (~> 6.0)" - - nanopb (= 0.3.9011) - - FirebaseCore (6.6.7): - - FirebaseCoreDiagnostics (~> 1.2) - - FirebaseCoreDiagnosticsInterop (~> 1.2) - - GoogleUtilities/Environment (~> 6.5) - - GoogleUtilities/Logger (~> 6.5) - - FirebaseCoreDiagnostics (1.2.4): - - FirebaseCoreDiagnosticsInterop (~> 1.2) - - GoogleDataTransportCCTSupport (~> 3.0) - - GoogleUtilities/Environment (~> 6.5) - - GoogleUtilities/Logger (~> 6.5) - - nanopb (~> 0.3.901) - - FirebaseCoreDiagnosticsInterop (1.2.0) - - FirebaseInstallations (1.2.0): - - FirebaseCore (~> 6.6) - - GoogleUtilities/Environment (~> 6.6) - - GoogleUtilities/UserDefaults (~> 6.6) - - PromisesObjC (~> 1.2) - - FLEX (2.4.0) - - GoogleAppMeasurement (6.4.2): - - GoogleUtilities/AppDelegateSwizzler (~> 6.0) - - GoogleUtilities/MethodSwizzler (~> 6.0) - - GoogleUtilities/Network (~> 6.0) - - "GoogleUtilities/NSData+zlib (~> 6.0)" - - nanopb (= 0.3.9011) - - GoogleDataTransport (6.0.0) - - GoogleDataTransportCCTSupport (3.0.0): - - GoogleDataTransport (~> 6.0) - - nanopb (~> 0.3.901) - - GoogleSignIn (5.0.2): - - AppAuth (~> 1.2) - - GTMAppAuth (~> 1.0) - - GTMSessionFetcher/Core (~> 1.1) - - GoogleUtilities/AppDelegateSwizzler (6.6.0): + - FirebaseAnalytics (~> 10.15.0) + - Firebase/CoreOnly (10.15.0): + - FirebaseCore (= 10.15.0) + - FirebaseAnalytics (10.15.0): + - FirebaseAnalytics/AdIdSupport (= 10.15.0) + - FirebaseCore (~> 10.0) + - FirebaseInstallations (~> 10.0) + - GoogleUtilities/AppDelegateSwizzler (~> 7.11) + - GoogleUtilities/MethodSwizzler (~> 7.11) + - GoogleUtilities/Network (~> 7.11) + - "GoogleUtilities/NSData+zlib (~> 7.11)" + - nanopb (< 2.30910.0, >= 2.30908.0) + - FirebaseAnalytics/AdIdSupport (10.15.0): + - FirebaseCore (~> 10.0) + - FirebaseInstallations (~> 10.0) + - GoogleAppMeasurement (= 10.15.0) + - GoogleUtilities/AppDelegateSwizzler (~> 7.11) + - GoogleUtilities/MethodSwizzler (~> 7.11) + - GoogleUtilities/Network (~> 7.11) + - "GoogleUtilities/NSData+zlib (~> 7.11)" + - nanopb (< 2.30910.0, >= 2.30908.0) + - FirebaseCore (10.15.0): + - FirebaseCoreInternal (~> 10.0) + - GoogleUtilities/Environment (~> 7.8) + - GoogleUtilities/Logger (~> 7.8) + - FirebaseCoreInternal (10.15.0): + - "GoogleUtilities/NSData+zlib (~> 7.8)" + - FirebaseInstallations (10.15.0): + - FirebaseCore (~> 10.0) + - GoogleUtilities/Environment (~> 7.8) + - GoogleUtilities/UserDefaults (~> 7.8) + - PromisesObjC (~> 2.1) + - GoogleAppMeasurement (10.15.0): + - GoogleAppMeasurement/AdIdSupport (= 10.15.0) + - GoogleUtilities/AppDelegateSwizzler (~> 7.11) + - GoogleUtilities/MethodSwizzler (~> 7.11) + - GoogleUtilities/Network (~> 7.11) + - "GoogleUtilities/NSData+zlib (~> 7.11)" + - nanopb (< 2.30910.0, >= 2.30908.0) + - GoogleAppMeasurement/AdIdSupport (10.15.0): + - GoogleAppMeasurement/WithoutAdIdSupport (= 10.15.0) + - GoogleUtilities/AppDelegateSwizzler (~> 7.11) + - GoogleUtilities/MethodSwizzler (~> 7.11) + - GoogleUtilities/Network (~> 7.11) + - "GoogleUtilities/NSData+zlib (~> 7.11)" + - nanopb (< 2.30910.0, >= 2.30908.0) + - GoogleAppMeasurement/WithoutAdIdSupport (10.15.0): + - GoogleUtilities/AppDelegateSwizzler (~> 7.11) + - GoogleUtilities/MethodSwizzler (~> 7.11) + - GoogleUtilities/Network (~> 7.11) + - "GoogleUtilities/NSData+zlib (~> 7.11)" + - nanopb (< 2.30910.0, >= 2.30908.0) + - GoogleSignIn (7.0.0): + - AppAuth (~> 1.5) + - GTMAppAuth (< 3.0, >= 1.3) + - GTMSessionFetcher/Core (< 4.0, >= 1.1) + - GoogleUtilities/AppDelegateSwizzler (7.11.5): - GoogleUtilities/Environment - GoogleUtilities/Logger - GoogleUtilities/Network - - GoogleUtilities/Environment (6.6.0): - - PromisesObjC (~> 1.2) - - GoogleUtilities/Logger (6.6.0): + - GoogleUtilities/Environment (7.11.5): + - PromisesObjC (< 3.0, >= 1.2) + - GoogleUtilities/Logger (7.11.5): - GoogleUtilities/Environment - - GoogleUtilities/MethodSwizzler (6.6.0): + - GoogleUtilities/MethodSwizzler (7.11.5): - GoogleUtilities/Logger - - GoogleUtilities/Network (6.6.0): + - GoogleUtilities/Network (7.11.5): - GoogleUtilities/Logger - "GoogleUtilities/NSData+zlib" - GoogleUtilities/Reachability - - "GoogleUtilities/NSData+zlib (6.6.0)" - - GoogleUtilities/Reachability (6.6.0): + - "GoogleUtilities/NSData+zlib (7.11.5)" + - GoogleUtilities/Reachability (7.11.5): - GoogleUtilities/Logger - - GoogleUtilities/UserDefaults (6.6.0): + - GoogleUtilities/UserDefaults (7.11.5): - GoogleUtilities/Logger - - GTMAppAuth (1.0.0): - - AppAuth/Core (~> 1.0) - - GTMSessionFetcher (~> 1.1) - - GTMSessionFetcher (1.3.1): - - GTMSessionFetcher/Full (= 1.3.1) - - GTMSessionFetcher/Core (1.3.1) - - GTMSessionFetcher/Full (1.3.1): - - GTMSessionFetcher/Core (= 1.3.1) - - Kingfisher (4.10.1) - - nanopb (0.3.9011): - - nanopb/decode (= 0.3.9011) - - nanopb/encode (= 0.3.9011) - - nanopb/decode (0.3.9011) - - nanopb/encode (0.3.9011) - - Presentation (4.2.3) - - PromisesObjC (1.2.8) - - SideMenu (6.4.8) - - SkeletonView (1.8.7) - - SnapKit (4.2.0) - - SwiftLint (0.39.2) + - GTMAppAuth (2.0.0): + - AppAuth/Core (~> 1.6) + - GTMSessionFetcher/Core (< 4.0, >= 1.5) + - GTMSessionFetcher/Core (3.1.1) + - Kingfisher (6.3.1) + - nanopb (2.30909.0): + - nanopb/decode (= 2.30909.0) + - nanopb/encode (= 2.30909.0) + - nanopb/decode (2.30909.0) + - nanopb/encode (2.30909.0) + - Presentation (4.2.4) + - PromisesObjC (2.3.1) + - SideMenu (6.5.0) + - SkeletonView (1.30.4) + - SnapKit (5.6.0) + - SwiftLint (0.52.4) DEPENDENCIES: - AlamofireImage - - Apollo (from `https://github.com/apollographql/apollo-ios.git`, commit `b28c3dc`) + - Apollo - AppDevAnnouncements (from `https://github.com/cuappdev/appdev-announcements.git`) - AppDevHistogram (from `https://github.com/cuappdev/appdev-histogram.git`) - Bartinter - Crashlytics - Fabric - Firebase/Analytics - - FLEX (~> 2.0) - GoogleSignIn - - Kingfisher (~> 4.0) - - Presentation (from `https://github.com/cuappdev/Presentation.git`, commit `d4aa2d3ad5901f6ebce0727af592824982f88d13`) + - Kingfisher + - Presentation (from `https://github.com/cuappdev/Presentation.git`, commit `b53eb453d2e1520e724cfac5e3e444e730ffe985`) - SideMenu (~> 6.0) - SkeletonView - SnapKit @@ -127,6 +135,7 @@ SPEC REPOS: trunk: - Alamofire - AlamofireImage + - Apollo - AppAuth - Bartinter - Crashlytics @@ -134,13 +143,9 @@ SPEC REPOS: - Firebase - FirebaseAnalytics - FirebaseCore - - FirebaseCoreDiagnostics - - FirebaseCoreDiagnosticsInterop + - FirebaseCoreInternal - FirebaseInstallations - - FLEX - GoogleAppMeasurement - - GoogleDataTransport - - GoogleDataTransportCCTSupport - GoogleSignIn - GoogleUtilities - GTMAppAuth @@ -154,64 +159,54 @@ SPEC REPOS: - SwiftLint EXTERNAL SOURCES: - Apollo: - :commit: b28c3dc - :git: https://github.com/apollographql/apollo-ios.git AppDevAnnouncements: :git: https://github.com/cuappdev/appdev-announcements.git AppDevHistogram: :git: https://github.com/cuappdev/appdev-histogram.git Presentation: - :commit: d4aa2d3ad5901f6ebce0727af592824982f88d13 + :commit: b53eb453d2e1520e724cfac5e3e444e730ffe985 :git: https://github.com/cuappdev/Presentation.git CHECKOUT OPTIONS: - Apollo: - :commit: b28c3dc - :git: https://github.com/apollographql/apollo-ios.git AppDevAnnouncements: - :commit: 4cfbcd46af092037ac6632fe5616a13e5f280615 + :commit: ae01d4b73c8a5edc6c6c03b9c5670d016a5a63ef :git: https://github.com/cuappdev/appdev-announcements.git AppDevHistogram: - :commit: 8caf40987e10ccd055ded919809173d697c7f6ad + :commit: a0964fbf3c796ad9f2606643cf05ec092f27df7d :git: https://github.com/cuappdev/appdev-histogram.git Presentation: - :commit: d4aa2d3ad5901f6ebce0727af592824982f88d13 + :commit: b53eb453d2e1520e724cfac5e3e444e730ffe985 :git: https://github.com/cuappdev/Presentation.git SPEC CHECKSUMS: - Alamofire: 9d5c5f602928e512395b30950c5984eca840093c - AlamofireImage: c4a2ba349885fb3064feb74d2e547bd42ce9be10 - Apollo: 09002d68c46e4098766fe376151d9ff8bd6aad36 - AppAuth: 73574f3013a1e65b9601a3ddc8b3158cce68c09d + Alamofire: 0e92e751b3e9e66d7982db43919d01f313b8eb91 + AlamofireImage: 843953fa97bee5f561cf05d83abd759e590b068d + Apollo: f6c6410ebee82dd5846be87b81cedc8bc7754a82 + AppAuth: 3bb1d1cd9340bd09f5ed189fb00b1cc28e1e8570 AppDevAnnouncements: e17a7f441fb0664583bb08e21dc709214d15b70f - AppDevHistogram: 63293981a9c7a1144f17a0098725267abc415541 + AppDevHistogram: e76c70f3bb75868a1fffed909133f54fa1611ffc Bartinter: 3c1fc3bcb631b066fdd78f7e01f1635fbafffdea Crashlytics: 9220f5bc89e7a618df411b4f639389dbfb0e03d2 Fabric: ea977e3cd9c20425516d3dafd3bf8c941c51223f - Firebase: 585ae467b3edda6a5444e788fda6888f024d8d6f - FirebaseAnalytics: 558f7a03d19de451093032c806f39d5f9dff096e - FirebaseCore: a2788a0d5f6c1dff17b8f79b4a73654a8d4bfdbd - FirebaseCoreDiagnostics: b59c024493a409f8aecba02c99928d0d8431d159 - FirebaseCoreDiagnosticsInterop: 296e2c5f5314500a850ad0b83e9e7c10b011a850 - FirebaseInstallations: 2119fb3e46b0a88bfdbf12562f855ee3252462fa - FLEX: bd1a39e55b56bb413b6f1b34b3c10a0dc44ef079 - GoogleAppMeasurement: 2253e99c1f22638cf234c059144660c338ad76c3 - GoogleDataTransport: 061fe7d9b476710e3cd8ea51e8e07d8b67c2b420 - GoogleDataTransportCCTSupport: 0f39025e8cf51f168711bd3fb773938d7e62ddb5 - GoogleSignIn: 7137d297ddc022a7e0aa4619c86d72c909fa7213 - GoogleUtilities: 39530bc0ad980530298e9c4af8549e991fd033b1 - GTMAppAuth: 4deac854479704f348309e7b66189e604cf5e01e - GTMSessionFetcher: cea130bbfe5a7edc8d06d3f0d17288c32ffe9925 - Kingfisher: c148cd7b47ebde9989f6bc7c27dcaa79d81279a0 - nanopb: 18003b5e52dab79db540fe93fe9579f399bd1ccd - Presentation: 3c02ab6268b15e44b6146c511686eb9c3f81b7d0 - PromisesObjC: c119f3cd559f50b7ae681fa59dc1acd19173b7e6 - SideMenu: 4a891be552d30bb6fa87ad404d62e485f8450c34 - SkeletonView: ba5370f41280b2f0a76918bb143c1294232bb4f4 - SnapKit: fe8a619752f3f27075cc9a90244d75c6c3f27e2a - SwiftLint: 22ccbbe3b8008684be5955693bab135e0ed6a447 + Firebase: 66043bd4579e5b73811f96829c694c7af8d67435 + FirebaseAnalytics: 47cef43728f81a839cf1306576bdd77ffa2eac7e + FirebaseCore: 2cec518b43635f96afe7ac3a9c513e47558abd2e + FirebaseCoreInternal: 2f4bee5ed00301b5e56da0849268797a2dd31fb4 + FirebaseInstallations: cae95cab0f965ce05b805189de1d4c70b11c76fb + GoogleAppMeasurement: 722db6550d1e6d552b08398b69a975ac61039338 + GoogleSignIn: b232380cf495a429b8095d3178a8d5855b42e842 + GoogleUtilities: 13e2c67ede716b8741c7989e26893d151b2b2084 + GTMAppAuth: 99fb010047ba3973b7026e45393f51f27ab965ae + GTMSessionFetcher: e8647203b65cee28c5f73d0f473d096653945e72 + Kingfisher: 016c8b653a35add51dd34a3aba36b580041acc74 + nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431 + Presentation: c66e877bb3e8a6437ca9c19ab018cfa4b04a98ee + PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4 + SideMenu: f583187d21c5b1dd04c72002be544b555a2627a2 + SkeletonView: 5a050f6411e697abd4cda0a8d767013399dccd69 + SnapKit: e01d52ebb8ddbc333eefe2132acf85c8227d9c25 + SwiftLint: 1cc5cd61ba9bacb2194e340aeb47a2a37fda00b3 -PODFILE CHECKSUM: ae0d6880f6be4b3d5daa37feb88551fed39759d0 +PODFILE CHECKSUM: a48882babe3b6cede705469b8a2425e262eb6479 -COCOAPODS: 1.11.3 +COCOAPODS: 1.12.1 diff --git a/Uplift Tests/AddHockTest.swift b/Uplift Tests/AddHockTest.swift new file mode 100644 index 00000000..bee516b1 --- /dev/null +++ b/Uplift Tests/AddHockTest.swift @@ -0,0 +1,18 @@ +// +// AddHockTest.swift +// Uplift +// +// Created by alden lamp on 9/24/23. +// Copyright © 2023 Cornell AppDev. All rights reserved. +// + +import Foundation + + +class AdHockTest { + + static func testDate() { + + } + +} diff --git a/Uplift Tests/UpliftTests.swift b/Uplift Tests/UpliftTests.swift new file mode 100644 index 00000000..5122ce7b --- /dev/null +++ b/Uplift Tests/UpliftTests.swift @@ -0,0 +1,35 @@ +// +// Uplift_Tests.swift +// Uplift Tests +// +// Created by alden lamp on 9/20/23. +// Copyright © 2023 Cornell AppDev. All rights reserved. +// + +import XCTest +//@testable import Uplift + +final class UpliftTests: XCTestCase { + +// override func setUpWithError() throws { +//// try super.setUpWithError() +// print("asdfasdf") +// // Put setup code here. This method is called before the invocation of each test method in the class. +// } +// +// override func tearDownWithError() throws { +// try super.tearDownWithError() +// print("asdfasdasdff") +// // Put teardown code here. This method is called after the invocation of each test method in the class. +// } + + func testExample() throws { + XCTAssert(false) + // 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. + } + +} diff --git a/Uplift.xcodeproj/project.pbxproj b/Uplift.xcodeproj/project.pbxproj index 452963c5..217130f3 100644 --- a/Uplift.xcodeproj/project.pbxproj +++ b/Uplift.xcodeproj/project.pbxproj @@ -31,14 +31,13 @@ 03C8013824106893009845E7 /* CalendarGenerator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03C8013724106893009845E7 /* CalendarGenerator.swift */; }; 0C97AC292276840F0086D699 /* FacilityHoursCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C97AC282276840F0086D699 /* FacilityHoursCell.swift */; }; 0C97AC2B2276841B0086D699 /* FacilityHoursHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C97AC2A2276841B0086D699 /* FacilityHoursHeaderView.swift */; }; + 146059CE2ACE182500EDDF62 /* CircularProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 146059CD2ACE182500EDDF62 /* CircularProgressView.swift */; }; 1C1D283B2166E215003FE839 /* Keys.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C1D283A2166E215003FE839 /* Keys.swift */; }; - 1C46740D215FEB1D000AEDF0 /* gymClassInstanceQueries.graphql in Resources */ = {isa = PBXBuildFile; fileRef = 1C46740C215FEB1D000AEDF0 /* gymClassInstanceQueries.graphql */; }; - 1C46740F21617680000AEDF0 /* intructorQueries.graphql in Resources */ = {isa = PBXBuildFile; fileRef = 1C46740E21617680000AEDF0 /* intructorQueries.graphql */; }; 1C7847C4216E77E30066E0DA /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1C7847C3216E77E30066E0DA /* Assets.xcassets */; }; 1CCCEB97215058C5001B3551 /* .swiftlint.yml in Resources */ = {isa = PBXBuildFile; fileRef = 1CCCEB96215058C5001B3551 /* .swiftlint.yml */; }; - 2D50591B2986D8A400F3616C /* API.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D50591A2986D8A400F3616C /* API.swift */; }; - 2D50591D2986D8A800F3616C /* Keys.plist in Resources */ = {isa = PBXBuildFile; fileRef = 2D50591C2986D8A800F3616C /* Keys.plist */; }; - 2D50591F2986D8AD00F3616C /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 2D50591E2986D8AD00F3616C /* GoogleService-Info.plist */; }; + 2D9B3BEE29E3520400E7D93A /* ActivitiesListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D9B3BED29E3520400E7D93A /* ActivitiesListCell.swift */; }; + 2D9B3BF029E352A000E7D93A /* Activity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D9B3BEF29E352A000E7D93A /* Activity.swift */; }; + 2D9B3BF229E3569600E7D93A /* ActivityListItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D9B3BF129E3569600E7D93A /* ActivityListItemCell.swift */; }; 2DA9E6A929CB644A00EFED2B /* GymCellFooter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DA9E6A829CB644A00EFED2B /* GymCellFooter.swift */; }; 4F187272235FD59900A85283 /* GymDetailTimeInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F187271235FD59900A85283 /* GymDetailTimeInfoView.swift */; }; 4F187274235FD63A00A85283 /* AdditionalInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F187273235FD63A00A85283 /* AdditionalInfoView.swift */; }; @@ -85,7 +84,6 @@ 8D5EA47B208ED6E700E98E6C /* Lato-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 8D5EA47A208ED6E700E98E6C /* Lato-Bold.ttf */; }; 8D611B7021895BEB00F7AB47 /* NoResultsEmptyStateView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D611B6F21895BEB00F7AB47 /* NoResultsEmptyStateView.swift */; }; 8D61D8832162F15900969DF4 /* Montserrat-SemiBold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 8D61D8822162F15900969DF4 /* Montserrat-SemiBold.ttf */; }; - 8D6B2A19215B23DC00807544 /* gymQueries.graphql in Resources */ = {isa = PBXBuildFile; fileRef = 8D6B2A18215B23DC00807544 /* gymQueries.graphql */; }; 8D95F44E208718410095B8AB /* GymHoursCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D95F44D208718410095B8AB /* GymHoursCell.swift */; }; 8D95F450208719030095B8AB /* GymHoursHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D95F44F208719030095B8AB /* GymHoursHeaderView.swift */; }; 8DB8D7692236BD7000809D4B /* HabitTrackingController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DB8D7682236BD7000809D4B /* HabitTrackingController.swift */; }; @@ -98,6 +96,19 @@ 8DD7C7732083E09A004EB196 /* OldDropdownHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DD7C7722083E09A004EB196 /* OldDropdownHeaderView.swift */; }; 8DD7C7752083E0FB004EB196 /* DropdownViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DD7C7742083E0FB004EB196 /* DropdownViewCell.swift */; }; 8DD7C77720844175004EB196 /* DropdownFooterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DD7C77620844175004EB196 /* DropdownFooterView.swift */; }; + BF52784B2A9B3BCB0072FDDE /* Keys.plist in Resources */ = {isa = PBXBuildFile; fileRef = BF52784A2A9B3BCB0072FDDE /* Keys.plist */; }; + BF52784D2A9B3BE80072FDDE /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = BF52784C2A9B3BE80072FDDE /* GoogleService-Info.plist */; }; + BF52784F2A9B3DB20072FDDE /* gymQueries.graphql in Resources */ = {isa = PBXBuildFile; fileRef = BF52784E2A9B3DB10072FDDE /* gymQueries.graphql */; }; + BF61D7A22AC0AF7800A2174B /* AddHockTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF61D7A12AC0AF7800A2174B /* AddHockTest.swift */; }; + BF9DA0F92AA3EE360069291D /* FitnessCenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9DA0F82AA3EE360069291D /* FitnessCenter.swift */; }; + BF9DA0FB2AA3F0140069291D /* FitnessCenterManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9DA0FA2AA3F0140069291D /* FitnessCenterManager.swift */; }; + BF9DA0FD2AA4017E0069291D /* QLGym.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9DA0FC2AA4017E0069291D /* QLGym.swift */; }; + BF9DA0FF2AA402030069291D /* QLFacility.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9DA0FE2AA402030069291D /* QLFacility.swift */; }; + BF9DA1012AA402790069291D /* QLOpenHours.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9DA1002AA402790069291D /* QLOpenHours.swift */; }; + BFA1BC1D2ABBA7AD0064932D /* UpliftTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFA1BC1C2ABBA7AD0064932D /* UpliftTests.swift */; }; + BFBEE1282AB95CC0003F264E /* OpenHours.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFBEE1272AB95CC0003F264E /* OpenHours.swift */; }; + BFCA93D82AA657B70005D191 /* QLCapacity.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFCA93D72AA657B70005D191 /* QLCapacity.swift */; }; + BFCA93DA2AA66B6B0005D191 /* API.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFCA93D92AA66B6B0005D191 /* API.swift */; }; C218F937233DBE080018838A /* GymDetail.swift in Sources */ = {isa = PBXBuildFile; fileRef = C218F936233DBE080018838A /* GymDetail.swift */; }; C21BE14B229212AA00B5D219 /* ClassListHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C21BE14A229212AA00B5D219 /* ClassListHeaderView.swift */; }; C21BE14D2292374400B5D219 /* HomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C21BE14C2292374400B5D219 /* HomeViewController.swift */; }; @@ -144,8 +155,6 @@ C7EBD5AB2062E66800D76A8B /* ClassListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7EBD5AA2062E66800D76A8B /* ClassListCell.swift */; }; C7EBD5B02062F14D00D76A8B /* Montserrat-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = C7EBD5AF2062F14D00D76A8B /* Montserrat-Regular.ttf */; }; C7EBD5B32062FDEB00D76A8B /* SearchBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7EBD5B22062FDEB00D76A8B /* SearchBar.swift */; }; - D91565C92165686400BCA466 /* tagQueries.graphql in Resources */ = {isa = PBXBuildFile; fileRef = D91565C82165686400BCA466 /* tagQueries.graphql */; }; - D94BD3082159DA9200C9214E /* classQueries.graphql in Resources */ = {isa = PBXBuildFile; fileRef = D94BD3072159DA9200C9214E /* classQueries.graphql */; }; D95810A8216E95BB00D4436C /* TapticEngine.swift in Sources */ = {isa = PBXBuildFile; fileRef = D95810A7216E95BB00D4436C /* TapticEngine.swift */; }; D95810AA216E95D900D4436C /* RangeSeekSlider.swift in Sources */ = {isa = PBXBuildFile; fileRef = D95810A9216E95D900D4436C /* RangeSeekSlider.swift */; }; D95810AC216E960700D4436C /* RangeSeekSliderDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D95810AB216E960700D4436C /* RangeSeekSliderDelegate.swift */; }; @@ -185,6 +194,16 @@ E6F36010238127D900CB7FB3 /* DropdownView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6F3600E238127D900CB7FB3 /* DropdownView.swift */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + BFA1BC1E2ABBA7AD0064932D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = C7DFABC3204206E000545B0B /* Project object */; + proxyType = 1; + remoteGlobalIDString = C7DFABCA204206E000545B0B; + remoteInfo = Uplift; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXFileReference section */ 03228DD523FDEB4600BBCF9F /* PickupGameCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PickupGameCell.swift; sourceTree = ""; }; 032324B42442503A0041ED72 /* SportsFilterViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SportsFilterViewController.swift; sourceTree = ""; }; @@ -211,16 +230,16 @@ 047ECBBE65B2C216C70CB963 /* Pods-Uplift.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Uplift.release.xcconfig"; path = "Target Support Files/Pods-Uplift/Pods-Uplift.release.xcconfig"; sourceTree = ""; }; 0C97AC282276840F0086D699 /* FacilityHoursCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FacilityHoursCell.swift; sourceTree = ""; }; 0C97AC2A2276841B0086D699 /* FacilityHoursHeaderView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FacilityHoursHeaderView.swift; sourceTree = ""; }; + 146059CD2ACE182500EDDF62 /* CircularProgressView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircularProgressView.swift; sourceTree = ""; }; 1C1D283A2166E215003FE839 /* Keys.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Keys.swift; sourceTree = ""; }; - 1C46740C215FEB1D000AEDF0 /* gymClassInstanceQueries.graphql */ = {isa = PBXFileReference; lastKnownFileType = text; path = gymClassInstanceQueries.graphql; sourceTree = ""; }; - 1C46740E21617680000AEDF0 /* intructorQueries.graphql */ = {isa = PBXFileReference; lastKnownFileType = text; path = intructorQueries.graphql; sourceTree = ""; }; 1C7847C3216E77E30066E0DA /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 1CCCEB96215058C5001B3551 /* .swiftlint.yml */ = {isa = PBXFileReference; lastKnownFileType = text; path = .swiftlint.yml; sourceTree = ""; }; - 2D50591A2986D8A400F3616C /* API.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = API.swift; sourceTree = ""; }; - 2D50591C2986D8A800F3616C /* Keys.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Keys.plist; sourceTree = ""; }; - 2D50591E2986D8AD00F3616C /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; + 2D9B3BED29E3520400E7D93A /* ActivitiesListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActivitiesListCell.swift; sourceTree = ""; }; + 2D9B3BEF29E352A000E7D93A /* Activity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Activity.swift; sourceTree = ""; }; + 2D9B3BF129E3569600E7D93A /* ActivityListItemCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActivityListItemCell.swift; sourceTree = ""; }; 2DA9E6A829CB644A00EFED2B /* GymCellFooter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GymCellFooter.swift; sourceTree = ""; }; 3A2D17ACE2F199BC7DB24332 /* Pods-Uplift.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Uplift.debug.xcconfig"; path = "Target Support Files/Pods-Uplift/Pods-Uplift.debug.xcconfig"; sourceTree = ""; }; + 44AD59D87BA6993A7337E3B0 /* Pods-Uplift Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Uplift Tests.debug.xcconfig"; path = "Target Support Files/Pods-Uplift Tests/Pods-Uplift Tests.debug.xcconfig"; sourceTree = ""; }; 4F187271235FD59900A85283 /* GymDetailTimeInfoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GymDetailTimeInfoView.swift; sourceTree = ""; }; 4F187273235FD63A00A85283 /* AdditionalInfoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalInfoView.swift; sourceTree = ""; }; 4F18C34723610A0B00BFB603 /* FacilitiesHoursCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FacilitiesHoursCell.swift; sourceTree = ""; }; @@ -269,7 +288,6 @@ 8D5EA47A208ED6E700E98E6C /* Lato-Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Lato-Bold.ttf"; sourceTree = ""; }; 8D611B6F21895BEB00F7AB47 /* NoResultsEmptyStateView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoResultsEmptyStateView.swift; sourceTree = ""; }; 8D61D8822162F15900969DF4 /* Montserrat-SemiBold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Montserrat-SemiBold.ttf"; sourceTree = ""; }; - 8D6B2A18215B23DC00807544 /* gymQueries.graphql */ = {isa = PBXFileReference; lastKnownFileType = text; path = gymQueries.graphql; sourceTree = ""; }; 8D95F44D208718410095B8AB /* GymHoursCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GymHoursCell.swift; sourceTree = ""; }; 8D95F44F208719030095B8AB /* GymHoursHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GymHoursHeaderView.swift; sourceTree = ""; }; 8DB8D7682236BD7000809D4B /* HabitTrackingController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HabitTrackingController.swift; sourceTree = ""; }; @@ -282,6 +300,21 @@ 8DD7C7722083E09A004EB196 /* OldDropdownHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OldDropdownHeaderView.swift; sourceTree = ""; }; 8DD7C7742083E0FB004EB196 /* DropdownViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DropdownViewCell.swift; sourceTree = ""; }; 8DD7C77620844175004EB196 /* DropdownFooterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DropdownFooterView.swift; sourceTree = ""; }; + 9767DD303DDD6CA26F709130 /* Pods-Uplift Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Uplift Tests.release.xcconfig"; path = "Target Support Files/Pods-Uplift Tests/Pods-Uplift Tests.release.xcconfig"; sourceTree = ""; }; + BF52784A2A9B3BCB0072FDDE /* Keys.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Keys.plist; sourceTree = ""; }; + BF52784C2A9B3BE80072FDDE /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; + BF52784E2A9B3DB10072FDDE /* gymQueries.graphql */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = gymQueries.graphql; sourceTree = ""; }; + BF61D7A12AC0AF7800A2174B /* AddHockTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddHockTest.swift; sourceTree = ""; }; + BF9DA0F82AA3EE360069291D /* FitnessCenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FitnessCenter.swift; sourceTree = ""; }; + BF9DA0FA2AA3F0140069291D /* FitnessCenterManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = FitnessCenterManager.swift; path = Uplift/Models/FitnessCenterManager.swift; sourceTree = SOURCE_ROOT; }; + BF9DA0FC2AA4017E0069291D /* QLGym.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QLGym.swift; sourceTree = ""; }; + BF9DA0FE2AA402030069291D /* QLFacility.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QLFacility.swift; sourceTree = ""; }; + BF9DA1002AA402790069291D /* QLOpenHours.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QLOpenHours.swift; sourceTree = ""; }; + BFA1BC1A2ABBA7AD0064932D /* Uplift Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Uplift Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + BFA1BC1C2ABBA7AD0064932D /* UpliftTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UpliftTests.swift; sourceTree = ""; }; + BFBEE1272AB95CC0003F264E /* OpenHours.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenHours.swift; sourceTree = ""; }; + BFCA93D72AA657B70005D191 /* QLCapacity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QLCapacity.swift; sourceTree = ""; }; + BFCA93D92AA66B6B0005D191 /* API.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = API.swift; sourceTree = ""; }; C218F936233DBE080018838A /* GymDetail.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GymDetail.swift; sourceTree = ""; }; C21BE14A229212AA00B5D219 /* ClassListHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassListHeaderView.swift; sourceTree = ""; }; C21BE14C2292374400B5D219 /* HomeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeViewController.swift; sourceTree = ""; }; @@ -329,8 +362,6 @@ C7EBD5AA2062E66800D76A8B /* ClassListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassListCell.swift; sourceTree = ""; }; C7EBD5AF2062F14D00D76A8B /* Montserrat-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Montserrat-Regular.ttf"; sourceTree = ""; }; C7EBD5B22062FDEB00D76A8B /* SearchBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchBar.swift; sourceTree = ""; }; - D91565C82165686400BCA466 /* tagQueries.graphql */ = {isa = PBXFileReference; lastKnownFileType = text; path = tagQueries.graphql; sourceTree = ""; }; - D94BD3072159DA9200C9214E /* classQueries.graphql */ = {isa = PBXFileReference; lastKnownFileType = text; path = classQueries.graphql; sourceTree = ""; }; D95810A7216E95BB00D4436C /* TapticEngine.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TapticEngine.swift; sourceTree = ""; }; D95810A9216E95D900D4436C /* RangeSeekSlider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RangeSeekSlider.swift; sourceTree = ""; }; D95810AB216E960700D4436C /* RangeSeekSliderDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RangeSeekSliderDelegate.swift; sourceTree = ""; }; @@ -370,6 +401,13 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + BFA1BC172ABBA7AD0064932D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; C7DFABC8204206E000545B0B /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -413,17 +451,12 @@ children = ( 3A2D17ACE2F199BC7DB24332 /* Pods-Uplift.debug.xcconfig */, 047ECBBE65B2C216C70CB963 /* Pods-Uplift.release.xcconfig */, + 44AD59D87BA6993A7337E3B0 /* Pods-Uplift Tests.debug.xcconfig */, + 9767DD303DDD6CA26F709130 /* Pods-Uplift Tests.release.xcconfig */, ); path = Pods; sourceTree = ""; }; - 2D19CCD2299D9B2C00EE0D16 /* Deprecated */ = { - isa = PBXGroup; - children = ( - ); - path = Deprecated; - sourceTree = ""; - }; 4F27F6D5236F24C800C255D7 /* Recovered References */ = { isa = PBXGroup; children = ( @@ -511,6 +544,15 @@ path = Footers; sourceTree = ""; }; + BFA1BC1B2ABBA7AD0064932D /* Uplift Tests */ = { + isa = PBXGroup; + children = ( + BFA1BC1C2ABBA7AD0064932D /* UpliftTests.swift */, + BF61D7A12AC0AF7800A2174B /* AddHockTest.swift */, + ); + path = "Uplift Tests"; + sourceTree = ""; + }; C21BE14922920EB200B5D219 /* ClassList */ = { isa = PBXGroup; children = ( @@ -532,6 +574,8 @@ C288019F22933B3000EC48B7 /* TodaysClassesListCell.swift */, C28801A122933BBC00EC48B7 /* TodaysClassListItemCell.swift */, 7E1D0A5523986A8500D5987F /* TodaysClassesEmptyCell.swift */, + 2D9B3BED29E3520400E7D93A /* ActivitiesListCell.swift */, + 2D9B3BF129E3569600E7D93A /* ActivityListItemCell.swift */, ); path = Home; sourceTree = ""; @@ -561,6 +605,7 @@ isa = PBXGroup; children = ( C76F715C208FD77300FDC958 /* NetworkManager.swift */, + BF9DA0FA2AA3F0140069291D /* FitnessCenterManager.swift */, ); path = Networking; sourceTree = ""; @@ -568,10 +613,17 @@ C736372D2082F1F2004751F5 /* Models */ = { isa = PBXGroup; children = ( + BF9DA0FC2AA4017E0069291D /* QLGym.swift */, + BF9DA0FE2AA402030069291D /* QLFacility.swift */, + BF9DA1002AA402790069291D /* QLOpenHours.swift */, + BFCA93D72AA657B70005D191 /* QLCapacity.swift */, + BF9DA0F82AA3EE360069291D /* FitnessCenter.swift */, + BFBEE1272AB95CC0003F264E /* OpenHours.swift */, E69CE6BA23F4B41000CA83BF /* Comment.swift */, C25CC31723981D6600221DC8 /* Facility.swift */, C25CC31923981F0A00221DC8 /* FacilityDropdown.swift */, C73637272082F170004751F5 /* Gym.swift */, + 2D9B3BEF29E352A000E7D93A /* Activity.swift */, C73637292082F193004751F5 /* GymClass.swift */, C7434C10208D27C1006F3249 /* GymClassDescription.swift */, C7434C0E208D23E0006F3249 /* GymClassInstance.swift */, @@ -607,6 +659,7 @@ 1CCCEB96215058C5001B3551 /* .swiftlint.yml */, C7DFABCD204206E000545B0B /* Uplift */, 630ADD112051BECC00B8E255 /* Fonts */, + BFA1BC1B2ABBA7AD0064932D /* Uplift Tests */, C7DFABCC204206E000545B0B /* Products */, 4F27F6D5236F24C800C255D7 /* Recovered References */, 2239099827BA43E4F9300502 /* Pods */, @@ -618,6 +671,7 @@ isa = PBXGroup; children = ( C7DFABCB204206E000545B0B /* Uplift.app */, + BFA1BC1A2ABBA7AD0064932D /* Uplift Tests.xctest */, ); name = Products; sourceTree = ""; @@ -625,11 +679,10 @@ C7DFABCD204206E000545B0B /* Uplift */ = { isa = PBXGroup; children = ( - 2D50591E2986D8AD00F3616C /* GoogleService-Info.plist */, - 2D50591A2986D8A400F3616C /* API.swift */, + BF52784C2A9B3BE80072FDDE /* GoogleService-Info.plist */, + BFCA93D92AA66B6B0005D191 /* API.swift */, C7DFABCE204206E000545B0B /* AppDelegate.swift */, 1C7847C3216E77E30066E0DA /* Assets.xcassets */, - 2D19CCD2299D9B2C00EE0D16 /* Deprecated */, C7DFABE22042081000545B0B /* Controllers */, C75EC94E2059AC75007BC98A /* Extensions */, D94BD3062159DA7D00C9214E /* graphql */, @@ -737,6 +790,7 @@ E62565BC24078CAE00EF2D0D /* LoadingCollectionHeaderView.swift */, 8DD7C7722083E09A004EB196 /* OldDropdownHeaderView.swift */, E689381E240F69D00022B524 /* SportsFeedHeaderView.swift */, + 146059CD2ACE182500EDDF62 /* CircularProgressView.swift */, ); path = Headers; sourceTree = ""; @@ -753,11 +807,7 @@ D94BD3062159DA7D00C9214E /* graphql */ = { isa = PBXGroup; children = ( - 1C46740C215FEB1D000AEDF0 /* gymClassInstanceQueries.graphql */, - D94BD3072159DA9200C9214E /* classQueries.graphql */, - 8D6B2A18215B23DC00807544 /* gymQueries.graphql */, - D91565C82165686400BCA466 /* tagQueries.graphql */, - 1C46740E21617680000AEDF0 /* intructorQueries.graphql */, + BF52784E2A9B3DB10072FDDE /* gymQueries.graphql */, ); path = graphql; sourceTree = ""; @@ -787,7 +837,7 @@ E60DE89E232DA6D20022BC72 /* Secrets */ = { isa = PBXGroup; children = ( - 2D50591C2986D8A800F3616C /* Keys.plist */, + BF52784A2A9B3BCB0072FDDE /* Keys.plist */, ); path = Secrets; sourceTree = ""; @@ -835,6 +885,24 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ + BFA1BC192ABBA7AD0064932D /* Uplift Tests */ = { + isa = PBXNativeTarget; + buildConfigurationList = BFA1BC222ABBA7AD0064932D /* Build configuration list for PBXNativeTarget "Uplift Tests" */; + buildPhases = ( + BFA1BC162ABBA7AD0064932D /* Sources */, + BFA1BC172ABBA7AD0064932D /* Frameworks */, + BFA1BC182ABBA7AD0064932D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + BFA1BC1F2ABBA7AD0064932D /* PBXTargetDependency */, + ); + name = "Uplift Tests"; + productName = "Uplift Tests"; + productReference = BFA1BC1A2ABBA7AD0064932D /* Uplift Tests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; C7DFABCA204206E000545B0B /* Uplift */ = { isa = PBXNativeTarget; buildConfigurationList = C7DFABDD204206E000545B0B /* Build configuration list for PBXNativeTarget "Uplift" */; @@ -847,7 +915,6 @@ 1CEB3B0B21503E5100BB5B61 /* Run SwiftLint */, 8D29EFD320431FCA005B1CC8 /* Run Fabric build */, AAFB7FBA28844D1D0277D787 /* [CP] Embed Pods Frameworks */, - 49915958B9DD93E2E137339F /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -864,10 +931,15 @@ C7DFABC3204206E000545B0B /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 0920; + LastSwiftUpdateCheck = 1500; LastUpgradeCheck = 0940; ORGANIZATIONNAME = "Cornell AppDev"; TargetAttributes = { + BFA1BC192ABBA7AD0064932D = { + CreatedOnToolsVersion = 15.0; + ProvisioningStyle = Automatic; + TestTargetID = C7DFABCA204206E000545B0B; + }; C7DFABCA204206E000545B0B = { CreatedOnToolsVersion = 9.2; LastSwiftMigration = 1000; @@ -889,39 +961,43 @@ projectRoot = ""; targets = ( C7DFABCA204206E000545B0B /* Uplift */, + BFA1BC192ABBA7AD0064932D /* Uplift Tests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + BFA1BC182ABBA7AD0064932D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; C7DFABC9204206E000545B0B /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 1C46740F21617680000AEDF0 /* intructorQueries.graphql in Resources */, + BF52784B2A9B3BCB0072FDDE /* Keys.plist in Resources */, + BF52784D2A9B3BE80072FDDE /* GoogleService-Info.plist in Resources */, E6028E252450E19000DAF837 /* SF-Pro-Display-Bold.otf in Resources */, - D94BD3082159DA9200C9214E /* classQueries.graphql in Resources */, - D91565C92165686400BCA466 /* tagQueries.graphql in Resources */, 8D26DB0B2072C31500144BFC /* Lato-Black.ttf in Resources */, E638F20624468BCC006AE55B /* BebasNeue-Thin.ttf in Resources */, 8D5EA47B208ED6E700E98E6C /* Lato-Bold.ttf in Resources */, C7EBD5B02062F14D00D76A8B /* Montserrat-Regular.ttf in Resources */, E638F20224468BCC006AE55B /* BebasNeue-Light.ttf in Resources */, E6028E232450E19000DAF837 /* BebasNeue-Regular.ttf in Resources */, - 8D6B2A19215B23DC00807544 /* gymQueries.graphql in Resources */, C76A70B2205ED2E100E60CC8 /* Montserrat-Light.ttf in Resources */, - 2D50591F2986D8AD00F3616C /* GoogleService-Info.plist in Resources */, C76A70B4205ED2E900E60CC8 /* Montserrat-Medium.ttf in Resources */, C7DFABD9204206E000545B0B /* LaunchScreen.storyboard in Resources */, E638F20424468BCC006AE55B /* BebasNeue-Bold.ttf in Resources */, E638F20524468BCC006AE55B /* BebasNeue-Book.ttf in Resources */, 8D61D8832162F15900969DF4 /* Montserrat-SemiBold.ttf in Resources */, - 1C46740D215FEB1D000AEDF0 /* gymClassInstanceQueries.graphql in Resources */, 8D26DB0E2072C55D00144BFC /* Montserrat-Bold.otf in Resources */, 1C7847C4216E77E30066E0DA /* Assets.xcassets in Resources */, E6028E242450E19000DAF837 /* SF-Pro-Display-Light.otf in Resources */, + BF52784F2A9B3DB20072FDDE /* gymQueries.graphql in Resources */, 1CCCEB97215058C5001B3551 /* .swiftlint.yml in Resources */, - 2D50591D2986D8A800F3616C /* Keys.plist in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -940,7 +1016,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "APOLLO_FRAMEWORK_PATH=\"$(eval find $FRAMEWORK_SEARCH_PATHS -name \"Apollo.framework\" -maxdepth 1)\"\n\nif [ -z \"$APOLLO_FRAMEWORK_PATH\" ]; then\necho \"error: Couldn't find Apollo.framework in FRAMEWORK_SEARCH_PATHS; make sure to add the framework to your project.\"\nexit 1\nfi\n\necho \"${SRCROOT}/${TARGET_NAME}\"\ncd \"${SRCROOT}/${TARGET_NAME}\"\n$APOLLO_FRAMEWORK_PATH/check-and-run-apollo-cli.sh codegen:generate --queries=\"$(find . -name '*.graphql')\" --schema=../schema.json API.swift\n"; + shellScript = "# Don't run this during index builds\nif [ $ACTION = \"indexbuild\" ]; then exit 0; fi\n\nSCRIPT_PATH=\"${PODS_ROOT}/Apollo/scripts\"\ncd \"${SRCROOT}/${TARGET_NAME}\"\n\"${SCRIPT_PATH}\"/run-bundled-codegen.sh codegen:generate --target=swift --includes=./**/*.graphql --localSchemaFile=\"../schema.graphql\" API.swift\n"; }; 1CEB3B0B21503E5100BB5B61 /* Run SwiftLint */ = { isa = PBXShellScriptBuildPhase; @@ -954,25 +1030,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "if which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; - }; - 49915958B9DD93E2E137339F /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Uplift/Pods-Uplift-resources.sh", - "${PODS_ROOT}/GoogleSignIn/Resources/GoogleSignIn.bundle", - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleSignIn.bundle", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Uplift/Pods-Uplift-resources.sh\"\n"; - showEnvVarsInLog = 0; + shellScript = "if which swiftlint >/dev/null; then\n #swiftlint\n echo \"Skipping swiftlint\"\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; }; 8D29EFD320431FCA005B1CC8 /* Run Fabric build */ = { isa = PBXShellScriptBuildPhase; @@ -1001,9 +1059,12 @@ "${BUILT_PRODUCTS_DIR}/AppAuth/AppAuth.framework", "${BUILT_PRODUCTS_DIR}/AppDevAnnouncements/AppDevAnnouncements.framework", "${BUILT_PRODUCTS_DIR}/Bartinter/Bartinter.framework", - "${BUILT_PRODUCTS_DIR}/FLEX/FLEX.framework", + "${BUILT_PRODUCTS_DIR}/FirebaseCore/FirebaseCore.framework", + "${BUILT_PRODUCTS_DIR}/FirebaseCoreInternal/FirebaseCoreInternal.framework", + "${BUILT_PRODUCTS_DIR}/FirebaseInstallations/FirebaseInstallations.framework", "${BUILT_PRODUCTS_DIR}/GTMAppAuth/GTMAppAuth.framework", "${BUILT_PRODUCTS_DIR}/GTMSessionFetcher/GTMSessionFetcher.framework", + "${BUILT_PRODUCTS_DIR}/GoogleSignIn/GoogleSignIn.framework", "${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework", "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", "${BUILT_PRODUCTS_DIR}/Presentation/Presentation.framework", @@ -1021,9 +1082,12 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AppAuth.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AppDevAnnouncements.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Bartinter.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FLEX.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCore.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCoreInternal.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseInstallations.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GTMAppAuth.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GTMSessionFetcher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleSignIn.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleUtilities.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Presentation.framework", @@ -1063,6 +1127,14 @@ /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + BFA1BC162ABBA7AD0064932D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + BFA1BC1D2ABBA7AD0064932D /* UpliftTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; C7DFABC7204206E000545B0B /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -1083,10 +1155,14 @@ 8D03EE05206C473200EF83C7 /* HomeScreenHeaderView.swift in Sources */, 8DC6F7A8218381980048C305 /* HomeSectionHeaderView.swift in Sources */, C71E8A012091651100542FA3 /* GymFilterCell.swift in Sources */, + BF9DA0F92AA3EE360069291D /* FitnessCenter.swift in Sources */, E651A47123F4BF0500C0A477 /* LoadingCollectionViewCell.swift in Sources */, E6F3600F238127D900CB7FB3 /* DropdownHeaderView.swift in Sources */, 7EE03A922321B61D00BD74C0 /* GymDetailFacilitiesCell.swift in Sources */, C26236FE2290D916007C415D /* ClassDetailFunctionCell.swift in Sources */, + BF9DA0FF2AA402030069291D /* QLFacility.swift in Sources */, + BF61D7A22AC0AF7800A2174B /* AddHockTest.swift in Sources */, + BFCA93D82AA657B70005D191 /* QLCapacity.swift in Sources */, 8D5D586C226FE52500A996D7 /* CheckInListItemCell.swift in Sources */, 4F27F6DD236FA9A500C255D7 /* CourtCollectionViewCell.swift in Sources */, C21BE14D2292374400B5D219 /* HomeViewController.swift in Sources */, @@ -1102,6 +1178,8 @@ 8DBB784F2139849B002BE0E0 /* Constants.swift in Sources */, C289B16E228A9A4700934A2A /* HabitTrackingController+Extensions.swift in Sources */, 032324B7244250800041ED72 /* SportsDropdown.swift in Sources */, + 2D9B3BF229E3569600E7D93A /* ActivityListItemCell.swift in Sources */, + BF9DA0FB2AA3F0140069291D /* FitnessCenterManager.swift in Sources */, 8DD7C77720844175004EB196 /* DropdownFooterView.swift in Sources */, 4F1A5A7A238D8511005987E4 /* OnboardingAnimations.swift in Sources */, 03B9203C247B3B71000E0F17 /* SportsFormBubbleTableViewCell.swift in Sources */, @@ -1110,7 +1188,6 @@ 03B92034247B1881000E0F17 /* SportsFormTimeCollectionViewCell.swift in Sources */, C28801A42293494C00EC48B7 /* HomeViewController+Extensions.swift in Sources */, C7DFABCF204206E000545B0B /* AppDelegate.swift in Sources */, - 2D50591B2986D8A400F3616C /* API.swift in Sources */, 0376A96B2455142900B44B22 /* SportsDetailCommentCollectionViewCell.swift in Sources */, 8DD7C7752083E0FB004EB196 /* DropdownViewCell.swift in Sources */, 4FC5646E23A06A3300B4D484 /* OnboardingEmptyStateView.swift in Sources */, @@ -1140,11 +1217,14 @@ 4F4CA4142383A3190002FD5F /* OnboardingView.swift in Sources */, E69A8578248B3E6100490EC3 /* OnboardingLetterViewController.swift in Sources */, 03228DD623FDEB4600BBCF9F /* PickupGameCell.swift in Sources */, + 2D9B3BF029E352A000E7D93A /* Activity.swift in Sources */, 0C97AC2B2276841B0086D699 /* FacilityHoursHeaderView.swift in Sources */, 4F285B6B238F03D300B7B14D /* FavoriteGymsController.swift in Sources */, C21BE15822926F8700B5D219 /* GymsListCell.swift in Sources */, 4F47C7E423A1E62200D5F93F /* OnboardingLoadingViewController.swift in Sources */, + BFBEE1282AB95CC0003F264E /* OpenHours.swift in Sources */, D95810A8216E95BB00D4436C /* TapticEngine.swift in Sources */, + BF9DA0FD2AA4017E0069291D /* QLGym.swift in Sources */, C7434C11208D27C1006F3249 /* GymClassDescription.swift in Sources */, 8DB8D76B2236E8CD00809D4B /* HabitTrackerOnboardingCell.swift in Sources */, 03B92032247B1872000E0F17 /* SportsFormNameCollectionViewCell.swift in Sources */, @@ -1153,7 +1233,9 @@ E607CE29238FC026002DC297 /* EquipmentListCell.swift in Sources */, 0376A967244BD84000B44B22 /* SportsDetailDiscussionCollectionViewCell.swift in Sources */, C21BE1522292421200B5D219 /* ListCollectionViewCell.swift in Sources */, + 2D9B3BEE29E3520400E7D93A /* ActivitiesListCell.swift in Sources */, E6709F252407B08E00ABC1FF /* LoadingHeaderView.swift in Sources */, + BFCA93DA2AA66B6B0005D191 /* API.swift in Sources */, C218F937233DBE080018838A /* GymDetail.swift in Sources */, C7ABE48F2069BF1A0042CFA7 /* CalendarCell.swift in Sources */, 7E9D6DF322961E000054F710 /* GymDetailPopularTimesCell.swift in Sources */, @@ -1171,6 +1253,7 @@ 7E9D6DEF22961B860054F710 /* GymDetailViewController.swift in Sources */, 7E80876F229B70CA007D9EDD /* GymDetailViewController+Extensions.swift in Sources */, C7EBD5B32062FDEB00D76A8B /* SearchBar.swift in Sources */, + 146059CE2ACE182500EDDF62 /* CircularProgressView.swift in Sources */, 8D24AF962140B23F002D850C /* String+Shared.swift in Sources */, 8DB8D7692236BD7000809D4B /* HabitTrackingController.swift in Sources */, E69CE6BB23F4B41000CA83BF /* Comment.swift in Sources */, @@ -1195,6 +1278,7 @@ C21BE1502292409D00B5D219 /* CheckInsListCell.swift in Sources */, E6DD25DC2447ABBB0023D259 /* ProfileViewController.swift in Sources */, 4F27F6D7236F25C000C255D7 /* MiscellaneousInfoCell.swift in Sources */, + BF9DA1012AA402790069291D /* QLOpenHours.swift in Sources */, C26236FC2290D6BF007C415D /* ClassDetailTimeCell.swift in Sources */, 0C97AC292276840F0086D699 /* FacilityHoursCell.swift in Sources */, 03C8013824106893009845E7 /* CalendarGenerator.swift in Sources */, @@ -1223,6 +1307,14 @@ }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + BFA1BC1F2ABBA7AD0064932D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = C7DFABCA204206E000545B0B /* Uplift */; + targetProxy = BFA1BC1E2ABBA7AD0064932D /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin PBXVariantGroup section */ C7DFABD7204206E000545B0B /* LaunchScreen.storyboard */ = { isa = PBXVariantGroup; @@ -1235,6 +1327,120 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ + BFA1BC202ABBA7AD0064932D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = MY4X4HTK85; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GENERATE_INFOPLIST_FILE = YES; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "\"${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/AlamofireImage/AlamofireImage.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/Apollo/Apollo.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/AppAuth/AppAuth.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/AppDevAnnouncements/AppDevAnnouncements.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/AppDevHistogram/AppDevHistogram.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/Bartinter/Bartinter.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCore/FirebaseCore.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCoreInternal/FirebaseCoreInternal.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseInstallations/FirebaseInstallations.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/GTMAppAuth/GTMAppAuth.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/GTMSessionFetcher/GTMSessionFetcher.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/GoogleSignIn/GoogleSignIn.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/GoogleUtilities/GoogleUtilities.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher/Kingfisher.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/Presentation/Presentation.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/PromisesObjC/FBLPromises.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/SideMenu/SideMenu.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/SkeletonView/SkeletonView.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/nanopb/nanopb.framework/Headers\"", + "\"${PODS_ROOT}/Headers/Public\"", + "\"${PODS_ROOT}/Headers/Public/Firebase\"", + "$(inherited)", + "${PODS_ROOT}/Firebase/CoreOnly/Sources", + "$(SRCROOT)/Pods", + ); + IPHONEOS_DEPLOYMENT_TARGET = 17.0; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MARKETING_VERSION = 1.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = "com.AldenLamp.Uplift-Tests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Uplift.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Uplift"; + }; + name = Debug; + }; + BFA1BC212ABBA7AD0064932D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = MY4X4HTK85; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GENERATE_INFOPLIST_FILE = YES; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "\"${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/AlamofireImage/AlamofireImage.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/Apollo/Apollo.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/AppAuth/AppAuth.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/AppDevAnnouncements/AppDevAnnouncements.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/AppDevHistogram/AppDevHistogram.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/Bartinter/Bartinter.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCore/FirebaseCore.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCoreInternal/FirebaseCoreInternal.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseInstallations/FirebaseInstallations.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/GTMAppAuth/GTMAppAuth.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/GTMSessionFetcher/GTMSessionFetcher.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/GoogleSignIn/GoogleSignIn.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/GoogleUtilities/GoogleUtilities.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher/Kingfisher.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/Presentation/Presentation.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/PromisesObjC/FBLPromises.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/SideMenu/SideMenu.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/SkeletonView/SkeletonView.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/nanopb/nanopb.framework/Headers\"", + "\"${PODS_ROOT}/Headers/Public\"", + "\"${PODS_ROOT}/Headers/Public/Firebase\"", + "$(inherited)", + "${PODS_ROOT}/Firebase/CoreOnly/Sources", + "$(SRCROOT)/Pods", + ); + IPHONEOS_DEPLOYMENT_TARGET = 17.0; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MARKETING_VERSION = 1.0; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = "com.AldenLamp.Uplift-Tests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Uplift.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Uplift"; + }; + name = Release; + }; C7DFABDB204206E000545B0B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -1286,7 +1492,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.2; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -1340,7 +1546,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.2; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; @@ -1359,13 +1565,17 @@ DEVELOPMENT_TEAM = ZGMCXU7X3U; ENABLE_BITCODE = NO; INFOPLIST_FILE = Uplift/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 2.1; + MARKETING_VERSION = 2.4; OTHER_SWIFT_FLAGS = "$(inherited) -DDEBUG"; PRODUCT_BUNDLE_IDENTIFIER = com.cornellappdev.uplift.ios; PRODUCT_NAME = Uplift; PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_VERSION = 4.2; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 1; }; name = Debug; @@ -1381,13 +1591,17 @@ DEVELOPMENT_TEAM = ZGMCXU7X3U; ENABLE_BITCODE = NO; INFOPLIST_FILE = Uplift/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 2.1; + MARKETING_VERSION = 2.4; PRODUCT_BUNDLE_IDENTIFIER = com.cornellappdev.uplift.ios; PRODUCT_MODULE_NAME = Uplift; PRODUCT_NAME = Uplift; PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_VERSION = 4.2; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 1; }; name = Release; @@ -1395,6 +1609,15 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + BFA1BC222ABBA7AD0064932D /* Build configuration list for PBXNativeTarget "Uplift Tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + BFA1BC202ABBA7AD0064932D /* Debug */, + BFA1BC212ABBA7AD0064932D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; C7DFABC6204206E000545B0B /* Build configuration list for PBXProject "Uplift" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/Uplift.xcodeproj/xcshareddata/xcschemes/Fitness 2.xcscheme b/Uplift.xcodeproj/xcshareddata/xcschemes/Fitness 2.xcscheme index 5ae6c813..64f49317 100644 --- a/Uplift.xcodeproj/xcshareddata/xcschemes/Fitness 2.xcscheme +++ b/Uplift.xcodeproj/xcshareddata/xcschemes/Fitness 2.xcscheme @@ -27,8 +27,6 @@ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES"> - - - - + + + + + + - - + + + + + + + + - - - - - - - - + + + + diff --git a/Uplift/AppDelegate.swift b/Uplift/AppDelegate.swift index 6be432c4..87e225a8 100644 --- a/Uplift/AppDelegate.swift +++ b/Uplift/AppDelegate.swift @@ -25,13 +25,18 @@ class AppDelegate: UIResponder, UIApplicationDelegate { window?.makeKeyAndVisible() - let defaults = UserDefaults.standard - if defaults.bool(forKey: Identifiers.hasSeenOnboarding) { - let vc = HomeViewController() - window?.rootViewController = UINavigationController(rootViewController: vc) - } else { - displayOnboardingViewController() - } + FitnessCenterManager.shared.fetch() + + AdHockTest.testDate() + + +// let defaults = UserDefaults.standard +// if defaults.bool(forKey: Identifiers.hasSeenOnboarding) { + let vc = HomeViewController() + window?.rootViewController = UINavigationController(rootViewController: vc) +// } else { +// displayOnboardingViewController() +// } AnnouncementNetworking.setupConfig( scheme: Keys.announcementsScheme.value, @@ -51,18 +56,18 @@ class AppDelegate: UIResponder, UIApplicationDelegate { } func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool { - return GIDSignIn.sharedInstance().handle(url as URL?) + return GIDSignIn.sharedInstance.handle(url) } // MARK: - Onboarding - private func displayOnboardingViewController() { - NetworkManager.shared.getOnboardingInfo { gyms, classes in - self.window?.rootViewController = gyms.count < 4 || classes.count < 4 - ? OnboardingViewController() - : OnboardingViewController(gymNames: gyms, classes: classes) - } +// private func displayOnboardingViewController() { +// NetworkManager.shared.getOnboardingInfo { gyms, cl10sses in +// self.window?.rootViewController = gyms.count < 4 || classes.count < 4 +// ? OnboardingViewController() +// : OnboardingViewController(gymNames: gyms, classes: classes) +// } // No Internet/Networking Failed/Networking in progress - self.window?.rootViewController = OnboardingLoadingViewController() - } +// self.window?.rootViewController = OnboardingLoadingViewController() +// } } diff --git a/Uplift/Assets.xcassets/Contents.json b/Uplift/Assets.xcassets/Contents.json index da4a164c..73c00596 100644 --- a/Uplift/Assets.xcassets/Contents.json +++ b/Uplift/Assets.xcassets/Contents.json @@ -1,6 +1,6 @@ { "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } -} \ No newline at end of file +} diff --git a/Uplift/Assets.xcassets/basketball1.imageset/Contents.json b/Uplift/Assets.xcassets/basketball1.imageset/Contents.json new file mode 100644 index 00000000..74968164 --- /dev/null +++ b/Uplift/Assets.xcassets/basketball1.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "basketball.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Uplift/Assets.xcassets/basketball1.imageset/basketball.png b/Uplift/Assets.xcassets/basketball1.imageset/basketball.png new file mode 100644 index 00000000..b1de9f96 Binary files /dev/null and b/Uplift/Assets.xcassets/basketball1.imageset/basketball.png differ diff --git a/Uplift/Assets.xcassets/bowling1.imageset/Contents.json b/Uplift/Assets.xcassets/bowling1.imageset/Contents.json new file mode 100644 index 00000000..c7f49635 --- /dev/null +++ b/Uplift/Assets.xcassets/bowling1.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "bowling.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Uplift/Assets.xcassets/bowling1.imageset/bowling.png b/Uplift/Assets.xcassets/bowling1.imageset/bowling.png new file mode 100644 index 00000000..91799390 Binary files /dev/null and b/Uplift/Assets.xcassets/bowling1.imageset/bowling.png differ diff --git a/Uplift/Assets.xcassets/dropdown.imageset/Contents.json b/Uplift/Assets.xcassets/dropdown.imageset/Contents.json new file mode 100644 index 00000000..16b63a0d --- /dev/null +++ b/Uplift/Assets.xcassets/dropdown.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "dropdown.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Uplift/Assets.xcassets/dropdown.imageset/dropdown.png b/Uplift/Assets.xcassets/dropdown.imageset/dropdown.png new file mode 100644 index 00000000..7749ad92 Binary files /dev/null and b/Uplift/Assets.xcassets/dropdown.imageset/dropdown.png differ diff --git a/Uplift/Assets.xcassets/lifting.imageset/Contents.json b/Uplift/Assets.xcassets/lifting.imageset/Contents.json new file mode 100644 index 00000000..52af3a0b --- /dev/null +++ b/Uplift/Assets.xcassets/lifting.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "weightlifting.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Uplift/Assets.xcassets/lifting.imageset/weightlifting.png b/Uplift/Assets.xcassets/lifting.imageset/weightlifting.png new file mode 100644 index 00000000..a1de6f2a Binary files /dev/null and b/Uplift/Assets.xcassets/lifting.imageset/weightlifting.png differ diff --git a/Uplift/Assets.xcassets/swimming.imageset/Contents.json b/Uplift/Assets.xcassets/swimming.imageset/Contents.json new file mode 100644 index 00000000..dda8a2ce --- /dev/null +++ b/Uplift/Assets.xcassets/swimming.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "swimming.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Uplift/Assets.xcassets/swimming.imageset/swimming.png b/Uplift/Assets.xcassets/swimming.imageset/swimming.png new file mode 100644 index 00000000..43ee0606 Binary files /dev/null and b/Uplift/Assets.xcassets/swimming.imageset/swimming.png differ diff --git a/Uplift/Controllers/ClassDetailViewController+Extensions.swift b/Uplift/Controllers/ClassDetailViewController+Extensions.swift index 7b356df4..42288bb7 100644 --- a/Uplift/Controllers/ClassDetailViewController+Extensions.swift +++ b/Uplift/Controllers/ClassDetailViewController+Extensions.swift @@ -24,10 +24,10 @@ extension ClassDetailViewController: ClassDetailHeaderViewDelegate { } func classDetailHeaderViewLocationSelected() { - NetworkManager.shared.getGym(id: gymClassInstance.gymId) { gym in - let gymDetailViewController = GymDetailViewController(gym: gym) - self.navigationController?.pushViewController(gymDetailViewController, animated: true) - } +// NetworkManager.shared.getGym(id: gymClassInstance.gymId) { gym in +// let gymDetailViewController = GymDetailViewController(gym: gym) +// self.navigationController?.pushViewController(gymDetailViewController, animated: true) +// } } func classDetailHeaderViewInstructorSelected() { diff --git a/Uplift/Controllers/ClassDetailViewController.swift b/Uplift/Controllers/ClassDetailViewController.swift index a6ea7881..58a7795d 100644 --- a/Uplift/Controllers/ClassDetailViewController.swift +++ b/Uplift/Controllers/ClassDetailViewController.swift @@ -85,13 +85,13 @@ class ClassDetailViewController: UIViewController { let favorites = UserDefaults.standard.stringArray(forKey: Identifiers.favoriteClasses) ?? [] isFavorite = favorites.contains(gymClassInstance.classDetailId) - NetworkManager.shared.getGymClassInstancesByClass(gymClassDetailIds: [gymClassInstance.classDetailId]) { gymClasses in - let items = self.sections[0].items - self.sections[0].items[items.count - 1] = .nextSessions(gymClasses) - DispatchQueue.main.async { - self.collectionView.reloadData() - } - } +// NetworkManager.shared.getGymClassInstancesByClass(gymClassDetailIds: [gymClassInstance.classDetailId]) { gymClasses in +// let items = self.sections[0].items +// self.sections[0].items[items.count - 1] = .nextSessions(gymClasses) +// DispatchQueue.main.async { +// self.collectionView.reloadData() +// } +// } setupConstraints() } @@ -131,7 +131,7 @@ class ClassDetailViewController: UIViewController { let activityVC = UIActivityViewController(activityItems: [shareText], applicationActivities: nil) - activityVC.excludedActivityTypes = [.print, .assignToContact, .openInIBooks, .addToReadingList, .markupAsPDF, .airDrop] + activityVC.excludedActivityTypes = [.print, .assignToContact, .openInIBooks, .addToReadingList, .airDrop] activityVC.popoverPresentationController?.sourceView = view self.navigationController?.present(activityVC, animated: true, completion: nil) diff --git a/Uplift/Controllers/ClassListViewController.swift b/Uplift/Controllers/ClassListViewController.swift index 8fdadd1b..967d1cc7 100644 --- a/Uplift/Controllers/ClassListViewController.swift +++ b/Uplift/Controllers/ClassListViewController.swift @@ -131,14 +131,14 @@ class ClassListViewController: UIViewController { dateFormatter.dateFormat = "yyyy-MM-dd" numPendingNetworkRequests += 1 - NetworkManager.shared.getGymClassesForDate(date: dateFormatter.string(from: date), completion: { [weak self] classes in - guard let strongSelf = self else { return } - - strongSelf.classList[index] = classes.sorted(by: { $0.startTime < $1.startTime }) - strongSelf.updateClassCollectionViewWithFilters() - - strongSelf.decrementNumPendingNetworkRequests() - }) +// NetworkManager.shared.getGymClassesForDate(date: dateFormatter.string(from: date), completion: { [weak self] classes in +// guard let strongSelf = self else { return } +// +// strongSelf.classList[index] = classes.sorted(by: { $0.startTime < $1.startTime }) +// strongSelf.updateClassCollectionViewWithFilters() +// +// strongSelf.decrementNumPendingNetworkRequests() +// }) return } diff --git a/Uplift/Controllers/FavoriteGymsController.swift b/Uplift/Controllers/FavoriteGymsController.swift index 1a209fac..f533d9be 100644 --- a/Uplift/Controllers/FavoriteGymsController.swift +++ b/Uplift/Controllers/FavoriteGymsController.swift @@ -49,12 +49,12 @@ class FavoriteGymsController: UIViewController { // Set up screen sizes for scaling currentScreenSize = computeScreenDimensions() - NetworkManager.shared.getGymNames(completion: { gyms in - DispatchQueue.main.async { - self.gymNames = gyms.map({ $0.name }).sorted() - self.gymsTableView.reloadData() - } - }) +// NetworkManager.shared.getGymNames(completion: { gyms in +// DispatchQueue.main.async { +// self.gymNames = gyms.map({ $0.name }).sorted() +// self.gymsTableView.reloadData() +// } +// }) let edgeSwipe = UIScreenEdgePanGestureRecognizer(target: self, action: #selector(goBackAView)) edgeSwipe.edges = .left diff --git a/Uplift/Controllers/FavoritesViewController.swift b/Uplift/Controllers/FavoritesViewController.swift index c1c1f1de..8e1102ce 100644 --- a/Uplift/Controllers/FavoritesViewController.swift +++ b/Uplift/Controllers/FavoritesViewController.swift @@ -88,9 +88,9 @@ class FavoritesViewController: UIViewController { favoritesNames = UserDefaults.standard.stringArray(forKey: Identifiers.favoriteClasses) ?? [] favorites = [] - NetworkManager.shared.getGymClassInstancesByClass(gymClassDetailIds: favoritesNames) { gymClasses in - self.favorites = gymClasses - } +// NetworkManager.shared.getGymClassInstancesByClass(gymClassDetailIds: favoritesNames) { gymClasses in +// self.favorites = gymClasses +// } } override func viewDidAppear(_ animated: Bool) { @@ -99,9 +99,9 @@ class FavoritesViewController: UIViewController { if newFavoritesNames != favoritesNames { favoritesNames = newFavoritesNames if !favoritesNames.isEmpty { - NetworkManager.shared.getGymClassInstancesByClass(gymClassDetailIds: favoritesNames) { gymClasses in - self.favorites = gymClasses - } +// NetworkManager.shared.getGymClassInstancesByClass(gymClassDetailIds: favoritesNames) { gymClasses in +// self.favorites = gymClasses +// } } else { favorites = [] } diff --git a/Uplift/Controllers/FilterViewController.swift b/Uplift/Controllers/FilterViewController.swift index b428eb43..46a2ca2b 100644 --- a/Uplift/Controllers/FilterViewController.swift +++ b/Uplift/Controllers/FilterViewController.swift @@ -160,6 +160,7 @@ class FilterViewController: UIViewController, RangeSeekSliderDelegate { classTypeDropdownData = DropdownData(completed: false, dropStatus: .closed, titles: []) + /* NetworkManager.shared.getClassNames { classNames in self.classTypeDropdownData.titles.append(contentsOf: classNames) self.classTypeDropdownData.titles.sort() @@ -168,6 +169,7 @@ class FilterViewController: UIViewController, RangeSeekSliderDelegate { self.classTypeDropdown.reloadData() self.setupConstraints() } + */ // INSTRUCTOR SECTION instructorDropdownHeader = DropdownHeaderView(title: ClientStrings.Filter.selectInstructorSection) @@ -196,7 +198,7 @@ class FilterViewController: UIViewController, RangeSeekSliderDelegate { contentView.addSubview(instructorDivider) instructorDropdownData = DropdownData(completed: false, dropStatus: .closed, titles: []) - +/* NetworkManager.shared.getInstructors { instructors in self.instructorDropdownData.titles.append(contentsOf: instructors) self.instructorDropdownData.titles.sort() @@ -205,7 +207,7 @@ class FilterViewController: UIViewController, RangeSeekSliderDelegate { self.instructorDropdown.reloadData() self.setupConstraints() } - +*/ setupConstraints() setupDropdownHeaderViews() } @@ -286,10 +288,10 @@ class FilterViewController: UIViewController, RangeSeekSliderDelegate { gyms = [] - NetworkManager.shared.getGymNames(completion: { (gyms) in - self.gyms = gyms - self.gymCollectionView.reloadData() - }) +// NetworkManager.shared.getGymNames(completion: { (gyms) in +// self.gyms = gyms +// self.gymCollectionView.reloadData() +// }) } // MARK: - CONSTRAINTS diff --git a/Uplift/Controllers/GymDetailViewController.swift b/Uplift/Controllers/GymDetailViewController.swift index e91484ca..de894517 100644 --- a/Uplift/Controllers/GymDetailViewController.swift +++ b/Uplift/Controllers/GymDetailViewController.swift @@ -76,7 +76,7 @@ class GymDetailViewController: UIViewController { view.addGestureRecognizer(edgeSwipe) setupViews() - +/* NetworkManager.shared.getClassInstancesByGym(gymId: gymDetail.gym.id, date: Date.getNowString()) { gymClasses in self.todaysClasses = gymClasses let items = self.section.items @@ -86,7 +86,7 @@ class GymDetailViewController: UIViewController { self.collectionView.reloadItems(at: [IndexPath(row: items.count - 1, section: 0)]) } } - +*/ setupConstraints() } diff --git a/Uplift/Controllers/HomeViewController+Extensions.swift b/Uplift/Controllers/HomeViewController+Extensions.swift index 20ccd9a3..292ee019 100644 --- a/Uplift/Controllers/HomeViewController+Extensions.swift +++ b/Uplift/Controllers/HomeViewController+Extensions.swift @@ -21,42 +21,30 @@ extension HomeViewController: UICollectionViewDataSource { func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let sectionType = sections[indexPath.section] switch sectionType { - case .checkIns: - // swiftlint:disable:next force_cast - let cell = collectionView.dequeueReusableCell(withReuseIdentifier: Constants.checkInsListCellIdentifier, for: indexPath) as! CheckInsListCell - cell.configure(for: habits) - return cell - case .myGyms: +// case .todaysClasses: +// if gymClassInstances.isEmpty { +// // swiftlint:disable:next force_cast +// let cell = collectionView.dequeueReusableCell(withReuseIdentifier: Constants.todaysClassesEmptyCellIdentifier, for: indexPath) as! TodaysClassesEmptyCell +// return cell +// } +// // swiftlint:disable:next force_cast +// let cell = collectionView.dequeueReusableCell(withReuseIdentifier: Constants.todaysClassesListCellIdentifier, for: indexPath) as! TodaysClassesListCell +// cell.delegate = self +// cell.configure(for: gymClassInstances) +// return cell + + case .fitnessCenters: // swiftlint:disable:next force_cast let cell = collectionView.dequeueReusableCell(withReuseIdentifier: Constants.gymsListCellIdentifier, for: indexPath) as! GymsListCell cell.delegate = self //MARK: changed self.MyGyms to self.gyms - cell.configure(for: self.gyms) - return cell - case .todaysClasses: - if gymClassInstances.isEmpty { - // swiftlint:disable:next force_cast - let cell = collectionView.dequeueReusableCell(withReuseIdentifier: Constants.todaysClassesEmptyCellIdentifier, for: indexPath) as! TodaysClassesEmptyCell - return cell - } - // swiftlint:disable:next force_cast - let cell = collectionView.dequeueReusableCell(withReuseIdentifier: Constants.todaysClassesListCellIdentifier, for: indexPath) as! TodaysClassesListCell - cell.delegate = self - cell.configure(for: gymClassInstances) - return cell - case .lookingFor: - // swiftlint:disable:next force_cast - let cell = collectionView.dequeueReusableCell(withReuseIdentifier: Constants.lookingForListCellIdentifier, for: indexPath) as! LookingForListCell - cell.delegate = self - cell.configure(for: lookingForCategories, width: collectionView.bounds.width) - return cell - default: - // swiftlint:disable:next force_cast - let cell = collectionView.dequeueReusableCell(withReuseIdentifier: Constants.todaysClassesListCellIdentifier, for: indexPath) as! TodaysClassesListCell - cell.delegate = self - cell.configure(for: gymClassInstances) + cell.configure(for: FitnessCenterManager.shared.getFitnessCenter()) return cell +// case .yourActivities: +// let cell = collectionView.dequeueReusableCell(withReuseIdentifier: Constants.activitiesListCellIdentifier, for: indexPath) as! ActivitiesListCell +// cell.configure(for: activities) +// return cell } } @@ -70,16 +58,12 @@ extension HomeViewController: UICollectionViewDataSource { let editButtonTitle = ClientStrings.Home.editButton switch sections[indexPath.section] { - case .checkIns: - headerView.configure(title: sections[indexPath.section].rawValue, buttonTitle: editButtonTitle, completion: pushHabitOnboarding) - case .myGyms: + case .fitnessCenters: headerView.configure(title: sections[indexPath.section].rawValue, buttonTitle: nil, completion: pushGymOnboarding) - case .todaysClasses: - headerView.configure(title: sections[indexPath.section].rawValue, buttonTitle: nil, completion: viewTodaysClasses) - case .lookingFor: - headerView.configure(title: sections[indexPath.section].rawValue, buttonTitle: nil, completion: viewTodaysClasses) - default: - headerView.configure(title: sections[indexPath.section].rawValue, buttonTitle: editButtonTitle, completion: pushHabitOnboarding) +// case .yourActivities: +// headerView.configure(title: sections[indexPath.section].rawValue, buttonTitle: nil, completion: pushHabitOnboarding) +// case .todaysClasses: +// headerView.configure(title: sections[indexPath.section].rawValue, buttonTitle: nil, completion: viewTodaysClasses) } return headerView } @@ -97,28 +81,24 @@ extension HomeViewController: UICollectionViewDelegate, UICollectionViewDelegate let width = collectionView.frame.width switch sections[indexPath.section] { - case .checkIns: - let checkInListItemCellHeight = 53 - let checkInListHeight = checkInListItemCellHeight * habits.count - let bottomSectionInset = 32 - return CGSize(width: width, height: CGFloat(checkInListHeight + bottomSectionInset)) - case .myGyms: +// case .todaysClasses: +// let padding: CGFloat = 20.0 +// let cellWidth = gymClassInstances.isEmpty ? width - 2.0 * padding : width +// return CGSize(width: cellWidth, height: TodaysClassesListCell.totalHeight) +// case .yourActivities: +// let height = ActivitiesListCell.itemHeight +// return CGSize(width: width, height: height) + case .fitnessCenters: //Height is calculated as item height of every row of 2 cells + minimum line spacing between them + bottom section inset value //Height of all cells (in rows of 2), plus line spacings after each of them //MARK: myGyms gyms.count and removed / 2 - var height: CGFloat = (GymsListCell.itemHeight + GymsListCell.minimumLineSpacing) * ceil(CGFloat(integerLiteral: gyms.count)) +// var height: CGFloat = (GymsListCell.itemHeight + GymsListCell.minimumItemSpacing) * ceil(CGFloat(integerLiteral: gyms.count)) + var height: CGFloat = (GymsListCell.itemHeight + GymsListCell.minimumItemSpacing) * ceil(CGFloat(integerLiteral: FitnessCenterManager.shared.getFitnessCenter().count)) //Subtract extra minimum line spacing below the last row of cells, and add the section inset - height += GymsListCell.sectionInsetBottom - GymsListCell.minimumLineSpacing - return CGSize(width: width, height: height) - case .todaysClasses: - let padding: CGFloat = 16.0 - let cellWidth = gymClassInstances.isEmpty ? width - 2.0 * padding : width - return CGSize(width: cellWidth, height: 227) - case .lookingFor: - let height = LookingForListCell.getHeight(collectionViewWidth: collectionView.bounds.width, numTags: lookingForCategories.count) - return CGSize(width: width, height: height) + height += GymsListCell.sectionInsetBottom - GymsListCell.minimumItemSpacing + return CGSize(width: width, height: max(height, 0)) } } @@ -157,30 +137,12 @@ extension HomeViewController: TodaysClassesListCellDelegate { } -extension HomeViewController: LookingForListCellDelegate { - - func lookingForCellShouldTagSearch(at tag: Tag, indexPath: IndexPath) { - let cal = Calendar.current - let currDate = Date() - guard let startDate = cal.date(bySettingHour: 0, minute: 0, second: 0, of: currDate), let classNavigationController = tabBarController?.viewControllers?[1] as? UINavigationController, let classListViewController = classNavigationController.viewControllers[0] as? ClassListViewController else { return } - let endDate = cal.date(bySettingHour: 23, minute: 59, second: 0, of: currDate) ?? Date() - - let filterParameters = FilterParameters(endTime: endDate, startTime: startDate, tags: [lookingForCategories[indexPath.row].name]) - - classListViewController.updateFilter(filterParameters) - classNavigationController.setViewControllers([classListViewController], animated: false) - - tabBarController?.selectedIndex = 1 - } - -} - extension HomeViewController: ChooseGymsDelegate { func updateFavorites(favorites: [String]) { - myGyms = favorites.compactMap { favorite in - self.gyms.first { $0.name == favorite } - } +// myGyms = favorites.compactMap { favorite in +// self.gyms.first { $0.name == favorite } +// } } func pushHabitOnboarding() { diff --git a/Uplift/Controllers/HomeViewController.swift b/Uplift/Controllers/HomeViewController.swift index 45af5158..f19e8567 100644 --- a/Uplift/Controllers/HomeViewController.swift +++ b/Uplift/Controllers/HomeViewController.swift @@ -8,7 +8,6 @@ import Alamofire import AppDevAnnouncements -import Crashlytics import SkeletonView import SnapKit import UIKit @@ -22,63 +21,75 @@ class HomeViewController: UIViewController { private var loadingScrollView: LoadingScrollView! // MARK: - Public data vars - var myGyms: [Gym] = [] - var gymClassInstances: [GymClassInstance] = [] - var gyms: [Gym] = [] - var habits: [Habit] = [] - var lookingForCategories: [Tag] = [] +// var myGyms: [Gym] = [] +// var gymClassInstances: [GymClassInstance] = [] + var gyms: [Gym] = [noyes, teagle, helen] +// var habits: [Habit] = [] +// var lookingForCategories: [Tag] = [] var sections: [SectionType] = [] +// var activities: [Activity] = [] // MARK: - Private data vars private var gymLocations: [Int: String] = [:] private var numPendingNetworkRequests = 0 enum Constants { - static let checkInsListCellIdentifier = "checkInsListCellIdentifier" - static let gymEquipmentListCellIdentifier = "gymEquipmentListCellIdentifier" static let gymsListCellIdentifier = "gymsListCellIdentifier" - static let lookingForListCellIdentifier = "lookingForListCellIdentifier" static let todaysClassesListCellIdentifier = "todaysClassesListCellIdentifier" static let todaysClassesEmptyCellIdentifier = "todaysClassesEmptyCellIdentifier" + static let activitiesListCellIdentifier = "activitiesListCellIdentifier" } // MARK: - Enums enum SectionType: String { - case checkIns = "DAILY CHECK-INS" - case myGyms = "MY GYMS" - case todaysClasses = "TODAY'S CLASSES" - case lookingFor = "I'M LOOKING FOR..." +// case todaysClasses = "Today's classes" +// case yourActivities = "Your Activities" + case fitnessCenters = "Gyms" } override func viewDidLoad() { super.viewDidLoad() - //MARK: removed .lookingFor - sections = [.myGyms, .todaysClasses] + // MARK: removed .lookingFor + sections = [.fitnessCenters] + +// activities = [Activity(name: "Lifting", image: ActivitiesImages.lifting), +// Activity(name: "Basketball", image: ActivitiesImages.basketball), +// Activity(name: "Bowling", image: ActivitiesImages.bowling), +// Activity(name: "Swimming", image: ActivitiesImages.swimming), +// Activity(name: "Lifting", image: ActivitiesImages.lifting), +// Activity(name: "Basketball", image: ActivitiesImages.basketball)] view.backgroundColor = UIColor.primaryWhite + NotificationCenter.default.addObserver(self, selector: #selector(reloadUpliftData), name: Notification.Name.upliftFitnessCentersLoadedNotification, object: nil) + setupViews() setupConstraints() - // Get Habits - habits = Habit.getActiveHabits() - // Reload Daily Check Ins section - collectionView.reloadSections(IndexSet(integer: 0)) - // Get Gyms + numPendingNetworkRequests += 1 - NetworkManager.shared.getGyms { gyms in - self.gyms = gyms.sorted { $0.isOpen && !$1.isOpen } - let gymNames = UserDefaults.standard.stringArray(forKey: Identifiers.favoriteGyms) ?? [] - self.updateFavorites(favorites: gymNames) - // Reload All Gyms section - self.collectionView.reloadSections(IndexSet(integer: 0)) - self.decrementNumPendingNetworkRequests() - } + gyms = gyms.sorted { $0.isOpen && !$1.isOpen } + let gymNames = UserDefaults.standard.stringArray(forKey: Identifiers.favoriteGyms) ?? [] + // Reload All Gyms section +// collectionView.reloadSections(IndexSet(integer: 2)) + + collectionView.reloadData() +// self.decrementNumPendingNetworkRequests() + +// NetworkManager.shared.getGyms { gyms in +// self.gyms = gyms.sorted { $0.isOpen && !$1.isOpen } +// let gymNames = UserDefaults.standard.stringArray(forKey: Identifiers.favoriteGyms) ?? [] +// self.updateFavorites(favorites: gymNames) +//// Reload All Gyms section +// self.collectionView.reloadSections(IndexSet(integer: 2)) +// self.decrementNumPendingNetworkRequests() +// } // Get Today's Classes - let stringDate = Date.getNowString() +// let stringDate = Date.getNowString() + /* numPendingNetworkRequests += 1 NetworkManager.shared.getGymClassesForDate(date: stringDate, completion: { (gymClassInstances) in self.gymClassInstances = gymClassInstances.sorted { (first, second) in @@ -86,20 +97,21 @@ class HomeViewController: UIViewController { } // Reload Today's Classes section - self.collectionView.reloadSections(IndexSet(integer: 1)) - self.decrementNumPendingNetworkRequests() - }) - -//MARK: Networking for .LookingForCategories -/* - numPendingNetworkRequests += 1 - NetworkManager.shared.getTags(completion: { tags in - self.lookingForCategories = tags - self.collectionView.reloadSections(IndexSet(integer: 2)) + self.collectionView.reloadSections(IndexSet(integer: 0)) self.decrementNumPendingNetworkRequests() }) -*/ - + */ + + + // These are dummy test data for dev and to test cancelled classes + +// var testGym1 = GymClassInstance(classDescription: "Testinggg", classDetailId: "ASDF", className: "asdfasdf", duration: 60, endTime: Date(timeIntervalSinceNow: TimeInterval(integerLiteral: 60)), gymId: "ud", imageURL: URL(string: "asdf")!, instructor: "Instructio", isCancelled: true, location: "Noyes", startTime: Date(timeIntervalSinceNow: TimeInterval(integerLiteral: 0)), tags: []) +// +// var testGym2 = GymClassInstance(classDescription: "Testinggg", classDetailId: "ASDF", className: "asdfasdf", duration: 60, endTime: Date(timeIntervalSinceNow: TimeInterval(integerLiteral: 60)), gymId: "ud", imageURL: URL(string: "asdf")!, instructor: "Instructio", isCancelled: false, location: "Noyes", startTime: Date(timeIntervalSinceNow: TimeInterval(integerLiteral: 0)), tags: []) +// +// var testGym3 = GymClassInstance(classDescription: "Testinggg", classDetailId: "ASDF", className: "asdfasdf", duration: 60, endTime: Date(timeIntervalSinceNow: TimeInterval(integerLiteral: 60)), gymId: "ud", imageURL: URL(string: "asdf")!, instructor: "Instructio", isCancelled: false, location: "Noyes", startTime: Date(timeIntervalSinceNow: TimeInterval(integerLiteral: 0)), tags: []) +// self.gymClassInstances = [testGym1, testGym2, testGym3] + reloadUpliftData() presentAnnouncement(completion: nil) } @@ -107,19 +119,18 @@ class HomeViewController: UIViewController { super.viewWillAppear(animated) navigationController?.tabBarController?.tabBar.isHidden = false - let newHabits = Habit.getActiveHabits() - if habits != newHabits { - habits = newHabits - collectionView.reloadSections(IndexSet(integer: 0)) - } +// let newHabits = Habit.getActiveHabits() +// if habits != newHabits { +// habits = newHabits +// collectionView.reloadSections(IndexSet(integer: 0)) +// } } - - func decrementNumPendingNetworkRequests() { - self.numPendingNetworkRequests -= 1 - if self.numPendingNetworkRequests == 0 { - self.loadingHeader.isHidden = true - self.loadingScrollView.isHidden = true - } + + @objc func reloadUpliftData() { + self.loadingHeader.isHidden = true + guard FitnessCenterManager.shared.numFitnessCenters > 0 else { return } + collectionView.reloadData() + self.loadingScrollView.isHidden = true } } @@ -147,12 +158,13 @@ extension HomeViewController { collectionView.delaysContentTouches = false collectionView.showsVerticalScrollIndicator = false collectionView.layer.zPosition = -1 + collectionView.register(HomeSectionHeaderView.self, forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: HomeSectionHeaderView.identifier) - collectionView.register(CheckInsListCell.self, forCellWithReuseIdentifier: Constants.checkInsListCellIdentifier) - collectionView.register(GymsListCell.self, forCellWithReuseIdentifier: Constants.gymsListCellIdentifier) collectionView.register(TodaysClassesListCell.self, forCellWithReuseIdentifier: Constants.todaysClassesListCellIdentifier) collectionView.register(TodaysClassesEmptyCell.self, forCellWithReuseIdentifier: Constants.todaysClassesEmptyCellIdentifier) - collectionView.register(LookingForListCell.self, forCellWithReuseIdentifier: Constants.lookingForListCellIdentifier) + collectionView.register(ActivitiesListCell.self, forCellWithReuseIdentifier: Constants.activitiesListCellIdentifier) + collectionView.register(GymsListCell.self, forCellWithReuseIdentifier: Constants.gymsListCellIdentifier) + view.addSubview(collectionView) view.addSubview(loadingHeader) diff --git a/Uplift/Controllers/OnboardingViewController.swift b/Uplift/Controllers/OnboardingViewController.swift index b242552f..89e67567 100644 --- a/Uplift/Controllers/OnboardingViewController.swift +++ b/Uplift/Controllers/OnboardingViewController.swift @@ -94,6 +94,7 @@ class OnboardingViewController: PresentationController { // Set Reconnect Action if couldn't fetch gyms/classes let retryNetworkRequest: (() -> Void) = { + /* NetworkManager.shared.getOnboardingInfo { [weak self] gyms, classInstances in if let `self` = self { self.viewSlides[1].updateTableView(with: gyms) @@ -102,6 +103,7 @@ class OnboardingViewController: PresentationController { self.classInstances = classInstances } } + */ } viewSlides[1...2].forEach { onboardingView in onboardingView.setEmptyStateReconnectAction(completion: retryNetworkRequest) diff --git a/Uplift/Controllers/SportsDetailViewController.swift b/Uplift/Controllers/SportsDetailViewController.swift index 460f6631..736ea2e9 100644 --- a/Uplift/Controllers/SportsDetailViewController.swift +++ b/Uplift/Controllers/SportsDetailViewController.swift @@ -72,7 +72,7 @@ class SportsDetailViewController: UIViewController { func setupViews() { collectionView.backgroundColor = .white collectionView.showsVerticalScrollIndicator = false - collectionView.register(SportsDetailHeaderView.self, forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: Identifiers.sportsDetailHeaderView) + collectionView.register(SportsDetailHeaderView.self, forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: Identifiers.activitiesDetailHeaderView) collectionView.register(SportsDetailInfoCollectionViewCell.self, forCellWithReuseIdentifier: Identifiers.sportsDetailInfoCell) collectionView.register(SportsDetailPlayersCollectionViewCell.self, forCellWithReuseIdentifier: Identifiers.sportsDetailPlayersCell) collectionView.register(SportsDetailDiscussionCollectionViewCell.self, forCellWithReuseIdentifier: Identifiers.sportsDetailDiscussionCell) @@ -111,7 +111,7 @@ extension SportsDetailViewController: UICollectionViewDataSource, UICollectionVi func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView { let headerView = collectionView.dequeueReusableSupplementaryView( ofKind: UICollectionView.elementKindSectionHeader, - withReuseIdentifier: Identifiers.sportsDetailHeaderView, + withReuseIdentifier: Identifiers.activitiesDetailHeaderView, for: indexPath) as! SportsDetailHeaderView headerView.configure(delegate: self, post: post) return headerView diff --git a/Uplift/Extensions/Date+Shared.swift b/Uplift/Extensions/Date+Shared.swift index 21657a0f..2221c852 100644 --- a/Uplift/Extensions/Date+Shared.swift +++ b/Uplift/Extensions/Date+Shared.swift @@ -11,6 +11,10 @@ import Foundation extension Date { static let secondsPerDay = 86400.0 + static var tomorrow: Date { + return Calendar.current.date(byAdding: .day, value: 1, to: Date())! + } + /// Format: "Today, April 10th 2020" static public func getLongDateStringFromDate(date: Date) -> String { let weekdayFormatter = DateFormatter() @@ -214,6 +218,18 @@ extension Date { dateFormatter.timeZone = TimeZone.current return dateFormatter.date(from: date) ?? Date() } + + static public func getDateFromHours(day: Int, hours: Double) -> Date { + let todayDayNumber = (Date().getIntegerDayOfWeekToday() + 6) % 7 + let dateFromDay = Calendar.current.date(byAdding: .day, + value: ((day + 7) - todayDayNumber) % 7, + to: Date()) ?? Date() + + return Calendar.current.date(bySettingHour: Int(hours), + minute: Int((hours.truncatingRemainder(dividingBy: 1)) * 60), + second: 0, + of: dateFromDay) ?? Date() + } // MARK: - DATE static func getStringDate(date: Date) -> String? { diff --git a/Uplift/Models/Activity.swift b/Uplift/Models/Activity.swift new file mode 100644 index 00000000..20b3888a --- /dev/null +++ b/Uplift/Models/Activity.swift @@ -0,0 +1,22 @@ +// +// Sport.swift +// Uplift +// +// Created by Elvis Marcelo on 4/9/23. +// Copyright © 2023 Cornell AppDev. All rights reserved. +// + +import Foundation +import UIKit + +struct Activity { + + let name: String + var image: UIImage + + init(name: String, image: UIImage) { + self.name = name + self.image = image + } + +} diff --git a/Uplift/Models/Facility.swift b/Uplift/Models/Facility.swift index c46bf5c6..cb331db0 100644 --- a/Uplift/Models/Facility.swift +++ b/Uplift/Models/Facility.swift @@ -21,6 +21,7 @@ struct Facility { var details: [FacilityDetail] var facilityType: FacilityType + /* init(facilityData: AllGymsQuery.Data.Gym.Facility, facilityType: FacilityType) { self.facilityType = facilityType details = facilityData.details.compactMap({ detailData -> FacilityDetail? in @@ -38,6 +39,7 @@ struct Facility { return FacilityDetail(detailData: detailData, detailType: detailType) }) } + */ } // MARK: - Facility Detail @@ -67,6 +69,7 @@ struct FacilityDetail { // Subfacilities var subfacilities: [String] = [] + /* init(detailData: AllGymsQuery.Data.Gym.Facility.Detail, detailType: DetailType) { self.detailType = detailType @@ -120,7 +123,7 @@ struct FacilityDetail { subfacilities = detailData.subFacilityNames.compactMap({ $0 }) } } - +*/ func getEquipmentCategories() -> [EquipmentCategory] { var equipmentDict = [String: [Equipment]]() equipment.forEach { equipmentItem in @@ -139,11 +142,13 @@ struct FacilityDetail { // MARK: - Hours -class DailyFacilityHoursRanges { +struct DailyFacilityHoursRanges { var dayOfWeek: Int var timeRanges: [FacilityHoursRange] var isSelected: Bool + + /* init(facilityHoursData: AllGymsQuery.Data.Gym.Facility.Detail.Time) { dayOfWeek = facilityHoursData.day @@ -172,6 +177,7 @@ class DailyFacilityHoursRanges { let dayIndexOfToday = Date().getIntegerDayOfWeekToday() isSelected = dayOfWeek == dayIndexOfToday } + */ } @@ -181,7 +187,7 @@ struct FacilityHoursRange { var closeTime: Date var specialHours: Bool var restrictions: String - +/* init(facilityHoursRangeData: AllGymsQuery.Data.Gym.Facility.Detail.Time.TimeRange) { openTime = Date.getTimeFromString(datetime: facilityHoursRangeData.startTime) closeTime = Date.getTimeFromString(datetime: facilityHoursRangeData.endTime, isCloseTime: true) @@ -195,7 +201,7 @@ struct FacilityHoursRange { specialHours = facilityHoursRangeData.specialHours restrictions = facilityHoursRangeData.restrictions } - +*/ } // MARK: - Equipment @@ -212,6 +218,7 @@ struct Equipment { var quantity: String var workoutType: String + /* init(equipmentData: AllGymsQuery.Data.Gym.Facility.Detail.Equipment) { equipmentType = equipmentData.equipmentType name = equipmentData.name @@ -225,5 +232,5 @@ struct Equipment { quantity = equipmentData.quantity workoutType = equipmentData.workoutType } - +*/ } diff --git a/Uplift/Models/FitnessCenter.swift b/Uplift/Models/FitnessCenter.swift new file mode 100644 index 00000000..22465c45 --- /dev/null +++ b/Uplift/Models/FitnessCenter.swift @@ -0,0 +1,70 @@ +// +// FitnessCenter.swift +// Uplift +// +// Created by alden lamp on 9/2/23. +// Copyright © 2023 Cornell AppDev. All rights reserved. +// + +import Foundation + +struct FitnessCenter { + var id: Int + var gymId: Int + var name: String + var imageUrl: URL? + + var capacityCount: Int? + var capacityPercent: Double? + + var hours: OpenHours + + func isOpen() -> Bool { + return hours.isOpen() + } + + func isStatusChangingSoon() -> Bool { + return hours.isStatusChangingSoon() + } + + + init (gymID: Int, imgUrl: URL?, fitnessCenter: QLFacility) { + gymId = gymID + imageUrl = imgUrl + id = fitnessCenter.id + name = fitnessCenter.name + capacityCount = fitnessCenter.capacity?.count + capacityPercent = fitnessCenter.capacity?.percent + hours = OpenHours(openHours: fitnessCenter.hours) + } + + func getHoursString() -> String { + return hours.getHoursString() + } + +} + + +// +//struct OpenHours { +// var day: Int +// var openTime: Double +// var closeTime: Double +//} +// + +//var dayOfWeek: Int = 0 +//var openTime: Date = Date() +//var closeTime: Date + +/* + init(gymHoursData: AllGymsQuery.Data.Gym.Time?) { + if let gymHoursData = gymHoursData { + dayOfWeek = gymHoursData.day + openTime = Date.getTimeFromString(datetime: gymHoursData.startTime) + closeTime = Date.getTimeFromString(datetime: gymHoursData.endTime) + } else { + closeTime = openTime + } + } + */ diff --git a/Uplift/Models/FitnessCenterManager.swift b/Uplift/Models/FitnessCenterManager.swift new file mode 100644 index 00000000..3efee6a3 --- /dev/null +++ b/Uplift/Models/FitnessCenterManager.swift @@ -0,0 +1,42 @@ +// +// DataManager.swift +// Uplift +// +// Created by alden lamp on 9/2/23. +// Copyright © 2023 Cornell AppDev. All rights reserved. +// + +import Foundation + +class FitnessCenterManager { + static var shared = FitnessCenterManager() +// private let constFitnessCenters = [ +// FitnessCenter(id: "0", gymId: "0", name: "Test1", imageUrl: URL(string: "https://raw.githubusercontent.com/cuappdev/assets/master/uplift/gyms/helen-newman.jpg")), +// FitnessCenter(id: "0", gymId: "0", name: "Test2", imageUrl: URL(string: "https://raw.githubusercontent.com/cuappdev/assets/master/uplift/gyms/helen-newman.jpg")), +// FitnessCenter(id: "0", gymId: "0", name: "Test3") +// ] + + private var fitnessCenters: [FitnessCenter] = [] + + var numFitnessCenters: Int { + return fitnessCenters.count + } + + func getFitnessCenter () -> [FitnessCenter] { + return fitnessCenters + } + + func fetch () { + NetworkManager.shared.getFitnessCenters { success in + if let gyms = success { + var fitnessCenters: [FitnessCenter] = [] + for gym in gyms { + fitnessCenters.append(contentsOf: gym.getFitnessCenters()) + } + self.fitnessCenters = fitnessCenters + NotificationCenter.default.post(name: Notification.Name.upliftFitnessCentersLoadedNotification, object: nil) + } + // TODO: - Handle failed networking call + } + } +} diff --git a/Uplift/Models/Gym.swift b/Uplift/Models/Gym.swift index 3c09a8c3..ac47f01e 100644 --- a/Uplift/Models/Gym.swift +++ b/Uplift/Models/Gym.swift @@ -31,7 +31,18 @@ struct Gym { var gymHoursToday: DailyGymHours { return gymHours[Date().getIntegerDayOfWeekToday()] } - + + init(facilities: [Facility], gymHours: [DailyGymHours], id: String, name: String, popularTimesList: [[Int]], imageURL: URL?) { + self.facilities = facilities + self.gymHours = gymHours + self.id = id + self.name = name + self.popularTimesList = popularTimesList + self.imageURL = imageURL + } + + +/* init(gymData: AllGymsQuery.Data.Gym) { id = gymData.id name = gymData.name @@ -87,7 +98,7 @@ struct Gym { return Facility(facilityData: facility, facilityType: facilityType) } } - +*/ func isStatusChangingSoon() -> Bool { let changingSoonThreshold = 3600.0 let now = Date() @@ -106,7 +117,14 @@ struct DailyGymHours { var dayOfWeek: Int = 0 var openTime: Date = Date() var closeTime: Date + + init(dayOfWeek: Int, openTime: Date, closeTime: Date) { + self.dayOfWeek = dayOfWeek + self.openTime = openTime + self.closeTime = closeTime + } + /* init(gymHoursData: AllGymsQuery.Data.Gym.Time?) { if let gymHoursData = gymHoursData { dayOfWeek = gymHoursData.day @@ -126,5 +144,23 @@ struct DailyGymHours { closeTime = openTime } } - +*/ } + +let weekHours = [ + DailyGymHours(dayOfWeek: 0, openTime: Date(), closeTime: Date()), + DailyGymHours(dayOfWeek: 1, openTime: Date(), closeTime: Date()), + DailyGymHours(dayOfWeek: 2, openTime: Date(), closeTime: Date()), + DailyGymHours(dayOfWeek: 3, openTime: Date(), closeTime: Date()), + DailyGymHours(dayOfWeek: 4, openTime: Date(), closeTime: Date()), + DailyGymHours(dayOfWeek: 5, openTime: Date(), closeTime: Date()), + DailyGymHours(dayOfWeek: 6, openTime: Date(), closeTime: Date()) +] + +let teagle = Gym(facilities: [], gymHours: weekHours, id: "1", name: "teagle", popularTimesList: [[]], imageURL: URL(string: "https://scl.cornell.edu/recreation/recreation/recreation/recreation/recreation/recreation/recreation/recreation/recreation/recreation/sites/scl.cornell.edu.recreation/files/2023-05/teagle.jpg")) + +let noyes = Gym(facilities: [], gymHours: weekHours, id: "2", name: "noyes", popularTimesList: [[]], imageURL: URL(string: "https://scl.cornell.edu/recreation/sites/scl.cornell.edu.recreation/files/2023-05/Noyes%20Exterior.jpg")) + +let helen = Gym(facilities: [], gymHours: weekHours, id: "3", name: "helen", popularTimesList: [[]], imageURL: URL(string: "https://scl.cornell.edu/recreation/sites/scl.cornell.edu.recreation/files/2023-05/out%20parking%20lot%20HNH%203.2_0.jpg")) + + diff --git a/Uplift/Models/OpenHours.swift b/Uplift/Models/OpenHours.swift new file mode 100644 index 00000000..e9554bf1 --- /dev/null +++ b/Uplift/Models/OpenHours.swift @@ -0,0 +1,74 @@ +// +// OpenHours.swift +// Uplift +// +// Created by alden lamp on 9/19/23. +// Copyright © 2023 Cornell AppDev. All rights reserved. +// + +import Foundation + +struct OpenHours { + + var rawHours: [Int: [QLOpenHours]] + + var todaysHours: [QLOpenHours]? { + rawHours[Date().getIntegerDayOfWeekToday()] + } + + var tomorrowsHours: [QLOpenHours]? { + rawHours[Date().getIntegerDayOfWeekTomorrow()] + } + + init(openHours: [QLOpenHours]) { + rawHours = [:] + for openHour in openHours { + if rawHours.keys.contains(openHour.day) { + rawHours[openHour.day]?.append(openHour) + } else { + rawHours[openHour.day] = [openHour] + } + } + } + + + func isStatusChangingSoon() -> Bool { + return todaysHours?.first{ $0.willChangeSoon() } != nil + } + + func isOpen() -> Bool { + guard todaysHours != nil else {return false} + return todaysHours?.filter{ $0.isDateInRange() }.count != 0 + } + + func getHoursString() -> String { + let strFormat: String + let now = Date() + + // Gym is open + if isOpen(), let nowHourRange = todaysHours?.filter({ $0.isDateInRange() }).first { + strFormat = nowHourRange.endTime.getHourFormat() + let closeTime = nowHourRange.endTime.getStringOfDatetime(format: strFormat) + return ClientStrings.Home.gymDetailCellClosesAt + closeTime + + // Gym will open today + } else { + if let nextOpenToday = todaysHours?.filter({ $0.startTime < now }).sorted(by: { $0.startTime < $1.startTime }).first { + + strFormat = nextOpenToday.startTime.getHourFormat() + return ClientStrings.Home.gymDetailCellOpensAt + (nextOpenToday.startTime.getStringOfDatetime(format: strFormat)) + + } else if let nextOpenTomorrow = tomorrowsHours?.sorted(by: { $0.startTime < $1.startTime }).first { + + strFormat = nextOpenTomorrow.startTime.getHourFormat() + return ClientStrings.Home.gymDetailCellOpensAt + nextOpenTomorrow.startTime.getStringOfDatetime(format: strFormat) + } else { + return ClientStrings.CommonStrings.closed + } + + } + + return "" + } + +} diff --git a/Uplift/Models/QLCapacity.swift b/Uplift/Models/QLCapacity.swift new file mode 100644 index 00000000..3f054a98 --- /dev/null +++ b/Uplift/Models/QLCapacity.swift @@ -0,0 +1,25 @@ +// +// QLCapacity.swift +// Uplift +// +// Created by alden lamp on 9/4/23. +// Copyright © 2023 Cornell AppDev. All rights reserved. +// + +import Foundation + +struct QLCapacity { + var id: Int + var facilityId: Int + var count: Int + var percent: Double + var updated: Date + + init (capacityData: AllGymsQuery.Data.Gym.Facility.Capacity) { + id = Int(capacityData.id) ?? -1 + facilityId = capacityData.facilityId + count = capacityData.count + percent = capacityData.percent + updated = Date.getDatetimeFromString(datetime: capacityData.updated) + } +} diff --git a/Uplift/Models/QLFacility.swift b/Uplift/Models/QLFacility.swift new file mode 100644 index 00000000..304bded6 --- /dev/null +++ b/Uplift/Models/QLFacility.swift @@ -0,0 +1,41 @@ +// +// QLFacility.swift +// Uplift +// +// Created by alden lamp on 9/2/23. +// Copyright © 2023 Cornell AppDev. All rights reserved. +// + +import Foundation + +enum QLFacilityType: String { + case undefined + case fitnessCenter = "FITNESS" +} + +struct QLFacility { + var id: Int + var gymId: Int + var name: String + var type: QLFacilityType + var hours: [QLOpenHours] + var capacity: QLCapacity? + + init (facilityData: AllGymsQuery.Data.Gym.Facility) { + id = Int(facilityData.id) ?? -1 + gymId = facilityData.gymId + name = facilityData.name + type = QLFacilityType(rawValue: facilityData.facilityType) ?? .undefined + + let openHoursData = facilityData.openHours ?? [] + hours = openHoursData.compactMap({ + guard let hoursData = $0 else { return nil } + return QLOpenHours(openHoursData: hoursData) + }) + + if let capacityData = facilityData.capacity { + capacity = QLCapacity(capacityData: capacityData) + } + } + +} diff --git a/Uplift/Models/QLGym.swift b/Uplift/Models/QLGym.swift new file mode 100644 index 00000000..64d81824 --- /dev/null +++ b/Uplift/Models/QLGym.swift @@ -0,0 +1,76 @@ +// +// QLGym.swift +// Uplift +// +// Created by alden lamp on 9/2/23. +// Copyright © 2023 Cornell AppDev. All rights reserved. +// + +import Foundation +import CoreLocation + +struct QLGym { + + var id: Int + var name: String + var description: String + var location: String + var coordinates: CLLocationCoordinate2D + var facilities: [QLFacility] + var imageURL: URL? + + init(gymData: AllGymsQuery.Data.Gym) { + id = Int(gymData.id) ?? -1 + name = gymData.name + description = gymData.description + location = gymData.location + coordinates = CLLocationCoordinate2D(latitude: gymData.latitude, longitude: gymData.longitude) + + let facilitiesData = gymData.facilities ?? [] + facilities = facilitiesData.compactMap({ + guard let facilityData = $0 else { return nil } + return QLFacility(facilityData: facilityData) + }) + + if let imgStr = gymData.imageUrl { + imageURL = URL(string: imgStr) + } + } + + func getFitnessCenters() -> [FitnessCenter] { + return facilities.compactMap { + guard $0.type == .fitnessCenter else { return nil } + return FitnessCenter(gymID: id, imgUrl: imageURL, fitnessCenter: $0) + } + } +} + /* + + init(gymData: AllGymsQuery.Data.Gym) { + id = gymData.id + name = gymData.name + imageURL = URL(string: gymData.imageUrl ?? "") + + var popularTimes = Array.init(repeating: Array.init(repeating: 0, count: 24), count: 7) + + if let popular = gymData.popular { + popular.enumerated().forEach { (i, dailyPopular) in + dailyPopular?.enumerated().forEach({ (j, dailyPopularItem) in + popularTimes[i][j] = dailyPopularItem ?? 0 + }) + } + } + popularTimesList = popularTimes + + let allGymHours = gymData.times + let gymHoursList = allGymHours.map({ DailyGymHours(gymHoursData: $0) }) + gymHours = gymHoursList + + facilities = gymData.facilities.compactMap { + guard let facility = $0, + let facilityType = FacilityType(rawValue: facility.name) else { return nil } + return Facility(facilityData: facility, facilityType: facilityType) + } + } +} +*/ diff --git a/Uplift/Models/QLOpenHours.swift b/Uplift/Models/QLOpenHours.swift new file mode 100644 index 00000000..cc5b51e4 --- /dev/null +++ b/Uplift/Models/QLOpenHours.swift @@ -0,0 +1,46 @@ +// +// QLOpenHours.swift +// Uplift +// +// Created by alden lamp on 9/2/23. +// Copyright © 2023 Cornell AppDev. All rights reserved. +// + +import Foundation + + +struct QLOpenHours { + var id: Int + var facilityId: Int + var day: Int + var startTime: Date + var endTime: Date + + init (openHoursData: AllGymsQuery.Data.Gym.Facility.OpenHour) { + id = Int(openHoursData.id) ?? -1 + facilityId = openHoursData.facilityId + day = openHoursData.day + startTime = Date.getDateFromHours(day: day, hours: openHoursData.startTime) + endTime = Date.getDateFromHours(day: day, hours: openHoursData.endTime) + } + + func dayMatchesDate(_ date: Date = Date()) -> Bool { + self.day == date.getIntegerDayOfWeekToday() + } + + func isDateInRange(_ date: Date = Date()) -> Bool { + guard dayMatchesDate(date) else { return false } + return startTime < date && endTime > date + } + + func willChangeSoon() -> Bool { + let changingSoonThreshold = 3600.0 + let now = Date() + + if isDateInRange() { + return endTime - changingSoonThreshold < now + } else { + return startTime - changingSoonThreshold < now + } + } +} diff --git a/Uplift/Networking/NetworkManager.swift b/Uplift/Networking/NetworkManager.swift index 9eecb97f..90174d82 100644 --- a/Uplift/Networking/NetworkManager.swift +++ b/Uplift/Networking/NetworkManager.swift @@ -17,7 +17,8 @@ enum APIEnvironment { } struct NetworkManager { - private let apollo = ApolloClient(url: URL(string: Keys.apiURL.value)!) +// private let apollo = ApolloClient(url: URL(string: Keys.apiURL.value)!) + private let apollo = ApolloClient(url: URL(string: Keys.apiDevURL.value)!) static let environment: APIEnvironment = .development static let shared = NetworkManager() @@ -64,6 +65,8 @@ struct NetworkManager { } } + +/* // MARK: - Onboarding /// Retreives 4 Gym Names (combining both Teagles) and 4 Gym Classes from 4 different Tag categories /// to present during the Onboarding. @@ -144,7 +147,30 @@ struct NetworkManager { completion(gyms, classes) }) } + + */ + + func getFitnessCenters(completion: @escaping ([QLGym]?) -> Void) { + apollo.fetch(query: AllGymsQuery()) { result in + guard let gymsData = try? result.get().data?.gyms else { + completion(nil) + return + } + + let gyms = gymsData.compactMap({ (gymData) -> QLGym? in + guard let gymData = gymData else { return nil } + let gym = QLGym(gymData: gymData) + if let imageUrl = gym.imageURL { + self.cacheImage(imageUrl: imageUrl) + print("IMGURL: \t\(imageUrl)") + } + return gym + }) + completion(gyms) + } + } +/* // MARK: - GYMS func getGyms(completion: @escaping ([Gym]) -> Void) { apollo.fetch(query: AllGymsQuery()) { result, error in @@ -296,6 +322,7 @@ struct NetworkManager { } } + // MARK: - Private Helpers private func getGymClassInstance(from gymClassData: TodaysClassesQuery.Data.Class?) -> GymClassInstance? { guard let gymClassData = gymClassData, @@ -362,6 +389,8 @@ struct NetworkManager { return GymClassInstance(classDescription: classDescription, classDetailId: classDetailId, className: className, duration: end.timeIntervalSince(start), endTime: end, gymId: gymId, imageURL: imageUrl, instructor: instructor, isCancelled: isCancelled, location: location, startTime: start, tags: tags) } + + */ private func cacheImage(imageUrl: URL) { //Kingfisher will download the image and store it in the cache diff --git a/Uplift/Supporting/Constants.swift b/Uplift/Supporting/Constants.swift index 2d71091a..0624b717 100644 --- a/Uplift/Supporting/Constants.swift +++ b/Uplift/Supporting/Constants.swift @@ -15,6 +15,11 @@ struct Constraints { static let verticalPadding: CGFloat = 24 } +// MARK: - NOTIFICATION NAMES +public extension Notification.Name { + static let upliftFitnessCentersLoadedNotification = Notification.Name("fitnessCentersLoadedNotification") +} + // MARK: - DAY ABBREVIATIONS struct DayAbbreviations { static let sunday = "Su" @@ -37,7 +42,6 @@ struct GymIds { // MARK: - IDENTIFIERS struct Identifiers { - // HEADERS static let facilityHoursHeaderView = "facilityHoursHeaderView" static let favoritesHeaderView = "favoritesHeaderView" @@ -46,7 +50,7 @@ struct Identifiers { static let homeScreenHeaderView = "homeScreenHeaderView" static let homeSectionHeaderView = "homeSectionHeaderView" static let loadingHeaderView = "loadingHeaderView" - static let sportsDetailHeaderView = "sportsDetailHeaderView" + static let activitiesDetailHeaderView = "activitiesDetailHeaderView" static let todaysClassesHeaderView = "todaysClassesHeaderView" // CELLS @@ -73,6 +77,7 @@ struct Identifiers { static let loadingCollectionViewCell = "loadingCollectionViewCell" static let lookingForCell = "lookingForCell" static let noHabitsCell = "noHabitsCell" + static let activitiesCell = "activitiesCell" static let sportsFilterGymCell = "sportsFilterGymCell" static let sportsFilterStartTimeCell = "sportsFilterStartTimeCell" static let sportsFilterNumPlayersCell = "sportsFilterNumPlayersCell" @@ -211,3 +216,12 @@ struct ImageNames { static let sportsFeed = "sports-tab" static let sportsFeedSelected = "sports-tab-selected" } + +// MARK: - SPORTS IMAGES +struct ActivitiesImages { + // ACTIVITIES IMAGES + static let lifting = UIImage(named: "lifting")! + static let basketball = UIImage(named: "basketball1")! + static let bowling = UIImage(named: "bowling1")! + static let swimming = UIImage(named: "swimming")! +} diff --git a/Uplift/Views/Cells/FacilitiesDropdownCell.swift b/Uplift/Views/Cells/FacilitiesDropdownCell.swift index d52c3b7c..2a557d51 100644 --- a/Uplift/Views/Cells/FacilitiesDropdownCell.swift +++ b/Uplift/Views/Cells/FacilitiesDropdownCell.swift @@ -163,7 +163,7 @@ extension FacilitiesDropdownCell: UICollectionViewDataSource { // Update all facility details with the new selected day index self.facility.details.forEach { facilityDetail in facilityDetail.times.forEach { dailyHoursRanges in - dailyHoursRanges.isSelected = dailyHoursRanges.dayOfWeek == newDayIndex +// dailyHoursRanges.isSelected = dailyHoursRanges.dayOfWeek == newDayIndex } } self.headerViewTapped?(nil) diff --git a/Uplift/Views/Footers/GymCellFooter.swift b/Uplift/Views/Footers/GymCellFooter.swift index 65b4896d..5941a907 100644 --- a/Uplift/Views/Footers/GymCellFooter.swift +++ b/Uplift/Views/Footers/GymCellFooter.swift @@ -23,25 +23,39 @@ class GymCellFooter: UIView { setupConstraints() } - func configure(for gym: Gym) { - locationNameLabel.text = gym.name - - //set gym status - let changingSoon = gym.isStatusChangingSoon() - - if(gym.isOpen) { - statusLabel.textColor = changingSoon ? .accentOrange : .accentOpen + func configure(for fitnessCenter: FitnessCenter) { + + locationNameLabel.text = fitnessCenter.name + + + if fitnessCenter.isStatusChangingSoon() { + statusLabel.textColor = .accentOrange } else { - statusLabel.textColor = changingSoon ? .accentOrange : .accentClosed + statusLabel.textColor = fitnessCenter.isOpen() ? .accentOpen : .accentClosed } - - statusLabel.text = gym.isOpen ? ClientStrings.CommonStrings.open : ClientStrings.CommonStrings.closed - - // Set gym hours - hoursLabel.text = getHoursString(from: gym) - + statusLabel.text = fitnessCenter.isOpen() ? ClientStrings.CommonStrings.open : ClientStrings.CommonStrings.closed + + + hoursLabel.text = fitnessCenter.getHoursString() + + capacityStatusLabel.textColor = .accentOrange capacityStatusLabel.text = "Cramped" capacityCountLabel.text = "120/140" + +// locationNameLabel.text = fitnessCenter.name +// +// //set gym status +// let changingSoon = gym.isStatusChangingSoon() +// +// +// statusLabel.text = gym.isOpen ? ClientStrings.CommonStrings.open : ClientStrings.CommonStrings.closed +// +// // Set gym hours +// hoursLabel.text = getHoursString(from: gym) +// +// capacityStatusLabel.text = "Cramped" +// capacityStatusLabel.textColor = .accentOrange +// capacityCountLabel.text = "120/140" } private func getHoursString(from gym: Gym) -> String { @@ -101,8 +115,9 @@ class GymCellFooter: UIView { let leadingPadding = 16 let locationLabelHeight = 22 let topBottomLabelVerticalPadding = 8 + let statusLabelTopPadding = 4 let statusHoursLabelPadding = 4 - let statusLabelTopPadding = 1 + let capacityTopPadding = 2 let trailingPadding = 4 locationNameLabel.snp.updateConstraints { make in @@ -116,7 +131,7 @@ class GymCellFooter: UIView { make.leading.equalTo(locationNameLabel) make.trailing.lessThanOrEqualToSuperview().inset(trailingPadding) make.height.equalTo(descriptionLabelHeight) - make.bottom.equalToSuperview().offset(-topBottomLabelVerticalPadding) + make.top.equalTo(locationNameLabel.snp.bottom).offset(statusLabelTopPadding) } hoursLabel.snp.updateConstraints { make in @@ -126,23 +141,19 @@ class GymCellFooter: UIView { make.centerY.equalTo(statusLabel.snp.centerY) } -//MARK: To be implemented when backend get's their networking done - -/* capacityStatusLabel.snp.updateConstraints { make in make.leading.equalTo(locationNameLabel) make.trailing.lessThanOrEqualToSuperview().inset(trailingPadding) make.height.equalTo(statusLabel) - make.bottom.equalTo(capacityCountLabel.snp.bottom) + make.top.equalTo(statusLabel.snp.bottom).offset(capacityTopPadding) } capacityCountLabel.snp.updateConstraints { make in make.leading.equalTo(capacityStatusLabel.snp.trailing).offset(statusHoursLabelPadding) - make.height.equalTo(statusLabel) + make.height.equalTo(capacityStatusLabel) make.trailing.lessThanOrEqualToSuperview().inset(trailingPadding) - make.bottom.equalToSuperview().offset(-topBottomLabelVerticalPadding) + make.top.equalTo(capacityStatusLabel) } - */ } diff --git a/Uplift/Views/GymDetail/Facilities/EquipmentListCell.swift b/Uplift/Views/GymDetail/Facilities/EquipmentListCell.swift index ed6b8c02..3204c81f 100644 --- a/Uplift/Views/GymDetail/Facilities/EquipmentListCell.swift +++ b/Uplift/Views/GymDetail/Facilities/EquipmentListCell.swift @@ -30,8 +30,7 @@ class EquipmentListCell: ListCollectionViewCell String { let currDate = Date() @@ -44,7 +64,7 @@ class HomeScreenHeaderView: UIView { if hour < 17 { return ClientStrings.Home.greetingAfternoon} return ClientStrings.Home.greetingEvening } - + // MARK: - LAYOUT func setupLayout() { welcomeMessage.snp.makeConstraints { make in @@ -52,5 +72,52 @@ class HomeScreenHeaderView: UIView { make.leading.equalTo(24) make.trailing.lessThanOrEqualToSuperview().inset(24) } + + statusButton.snp.makeConstraints { make in + make.trailing.equalToSuperview().inset(24) + make.centerY.equalTo(welcomeMessage.snp.centerY) + make.width.equalTo(60) + make.height.equalTo(40) + } + } +} + +class StatusButton: UIButton { + + var circularView: UIView! + + var dropDownImageView = UIImageView() + + override init(frame: CGRect) { + super.init(frame: .zero) + + circularView = CircularProgressView(progressColor: .green, width: 24) + addSubview(circularView) + + dropDownImageView.image = UIImage(named: "dropdown") + addSubview(dropDownImageView) + + setupConstraints() + } + + func setupConstraints() { + circularView.snp.makeConstraints { make in + make.width.equalTo(24) + make.height.equalTo(24) + make.centerY.equalToSuperview() + make.leading.equalToSuperview().offset(10) + } + + dropDownImageView.snp.makeConstraints { make in + make.width.equalTo(8) + make.height.equalTo(8) + make.centerY.equalTo(circularView) + make.trailing.equalToSuperview().inset(10) + } + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") } + } diff --git a/Uplift/Views/Headers/HomeSectionHeaderView.swift b/Uplift/Views/Headers/HomeSectionHeaderView.swift index e014992e..0dcb0219 100644 --- a/Uplift/Views/Headers/HomeSectionHeaderView.swift +++ b/Uplift/Views/Headers/HomeSectionHeaderView.swift @@ -89,10 +89,10 @@ class HomeSectionHeaderView: UICollectionReusableView { @objc private func viewAll() { // MARK: - Fabric - Answers.logCustomEvent(withName: "Found Info on Homepage", customAttributes: [ - "Section": "\(HomeViewController.SectionType.todaysClasses.rawValue)/viewAll" - ]) - +// Answers.logCustomEvent(withName: "Found Info on Homepage", customAttributes: [ +// "Section": "\(HomeViewController.SectionType.todaysClasses.rawValue)/viewAll" +// ]) +// buttonCompletion?() } } diff --git a/Uplift/Views/Home/ActivitiesListCell.swift b/Uplift/Views/Home/ActivitiesListCell.swift new file mode 100644 index 00000000..3f76ba3a --- /dev/null +++ b/Uplift/Views/Home/ActivitiesListCell.swift @@ -0,0 +1,40 @@ +// +// ActivityListCell.swift +// Uplift +// +// Created by Elvis Marcelo on 4/9/23. +// Copyright © 2023 Cornell AppDev. All rights reserved. +// + +import Foundation +import UIKit + +class ActivitiesListCell: ListCollectionViewCell { + + // MARK: - Public data vars + static let itemHeight: CGFloat = 110.0 + static let minimumItemSpacing: CGFloat = 16.0 + static let sectionInsetBottom: CGFloat = 32.0 + static let sectionInsetLeft: CGFloat = 12.0 + static let sectionInsetRight: CGFloat = 12.0 + + // MARK: - Overrides + override var config: ListConfiguration { + return ListConfiguration( + itemSize: CGSize(width: 80, height: ActivitiesListCell.itemHeight), + minimumItemSpacing: ActivitiesListCell.minimumItemSpacing, + sectionInset: UIEdgeInsets(top: 0.0, left: 12.0, bottom: 32.0, right: 12.0) + ) + } + + override func didHighlightItemAt(_ collectionView: UICollectionView, indexPath: IndexPath) { + guard let cell = collectionView.cellForItem(at: indexPath) else { return } + cell.zoomIn() + } + + override func didUnhighlightItemAt(_ collectionView: UICollectionView, indexPath: IndexPath) { + guard let cell = collectionView.cellForItem(at: indexPath) else { return } + cell.zoomOut() + } + +} diff --git a/Uplift/Views/Home/ActivityListItemCell.swift b/Uplift/Views/Home/ActivityListItemCell.swift new file mode 100644 index 00000000..f332d277 --- /dev/null +++ b/Uplift/Views/Home/ActivityListItemCell.swift @@ -0,0 +1,77 @@ +// +// ActivityListItemCell.swift +// Uplift +// +// Created by Elvis Marcelo on 4/9/23. +// Copyright © 2023 Cornell AppDev. All rights reserved. +// + +import Foundation +import SnapKit +import UIKit + +class ActivityListItemCell: ListItemCollectionViewCell { + + // MARK: - Public static vars + static let identifier = Identifiers.activitiesCell + + // MARK: - Private view vars + private var activityImageView = UIImageView() + private let activityLabel = UILabel() + + override init(frame: CGRect) { + super.init(frame: frame) + + setupViews() + setupConstraints() + } + + // MARK: - Public configure + override func configure(for sport: Activity) { + super.configure(for: sport) + + activityLabel.text = sport.name + activityImageView.image = sport.image + } + + private func setupViews() { + let imageViewOpacity: Float = 0.15 + let imageViewshadowRadius: CGFloat = 4 + + activityImageView.layer.shadowColor = UIColor.black.cgColor + activityImageView.layer.shadowOpacity = imageViewOpacity + activityImageView.layer.shadowOffset = CGSize(width: 1, height: 2) + activityImageView.layer.shadowRadius = imageViewshadowRadius + activityImageView.contentMode = .scaleAspectFit + + contentView.addSubview(activityImageView) + + activityLabel.textAlignment = .center + activityLabel.font = ._12MontserratMedium + contentView.addSubview(activityLabel) + } + + private func setupConstraints() { + let labelPadding: CGFloat = 5 + let sportsImageViewPadding: CGFloat = 20 + let sportsImageViewWidthHeight: CGFloat = 70 + + activityImageView.snp.makeConstraints { make in + make.top.equalToSuperview().offset(sportsImageViewPadding) + make.centerX.equalToSuperview() + make.width.equalTo(sportsImageViewWidthHeight) + make.height.equalTo(sportsImageViewWidthHeight) + } + + activityLabel.snp.makeConstraints { make in + make.top.equalTo(activityImageView.snp.bottom).offset(labelPadding) + make.width.equalToSuperview() + } + } + + required init?(coder aDecoder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + +} + diff --git a/Uplift/Views/Home/GymListItemCell.swift b/Uplift/Views/Home/GymListItemCell.swift index a2ea19e2..954a27ad 100644 --- a/Uplift/Views/Home/GymListItemCell.swift +++ b/Uplift/Views/Home/GymListItemCell.swift @@ -9,16 +9,12 @@ import SnapKit import UIKit -class GymListItemCell: ListItemCollectionViewCell { +class GymListItemCell: ListItemCollectionViewCell { // MARK: - Public static vars static let identifier = Identifiers.gymsCell // MARK: - Private view vars - private let hoursLabel = UILabel() - private let locationNameLabel = UILabel() - private let shadowView = UIView() - private let statusLabel = UILabel() private let backgroundImage = UIImageView() private let gymCellFooter = GymCellFooter() @@ -44,11 +40,12 @@ class GymListItemCell: ListItemCollectionViewCell { } // MARK: - Public configure - override func configure(for gym: Gym) { - super.configure(for: gym) + override func configure(for fitnessCenter: FitnessCenter) { + super.configure(for: fitnessCenter) - gymCellFooter.configure(for: gym) - backgroundImage.kf.setImage(with: gym.imageURL) + gymCellFooter.configure(for: fitnessCenter) + backgroundImage.kf.setImage(with: fitnessCenter.imageUrl) + print("fitnessCenterImage: \(fitnessCenter.imageUrl)") } private func setupViews() { @@ -60,7 +57,7 @@ class GymListItemCell: ListItemCollectionViewCell { } private func setupConstraints() { - let footerHeight = 55 + let footerHeight = 75 backgroundImage.snp.makeConstraints { make in make.edges.equalToSuperview() diff --git a/Uplift/Views/Home/GymsListCell.swift b/Uplift/Views/Home/GymsListCell.swift index 0c17ad86..a01ddf43 100644 --- a/Uplift/Views/Home/GymsListCell.swift +++ b/Uplift/Views/Home/GymsListCell.swift @@ -12,25 +12,26 @@ protocol GymsListCellDelegate: class { func allGymsCellShouldOpenGym(_ gym: Gym) } -class GymsListCell: ListCollectionViewCell { +class GymsListCell: ListCollectionViewCell { // MARK: - Public data vars weak var delegate: GymsListCellDelegate? - static let itemHeight: CGFloat = 180.0 - static let minimumInterItemSpacing: CGFloat = 16.0 - static let minimumLineSpacing: CGFloat = 16.0 + + static let itemHeight: CGFloat = 190.0 + + static let minimumItemSpacing: CGFloat = 30.0 + static let sectionInsetBottom: CGFloat = 32.0 - static let sectionInsetLeft: CGFloat = 16.0 + static let sectionInsetLeft: CGFloat = 12.0 static let sectionInsetRight: CGFloat = 12.0 // MARK: - Overrides override var config: ListConfiguration { - let width: CGFloat = (self.bounds.width - GymsListCell.minimumInterItemSpacing - GymsListCell.sectionInsetLeft - GymsListCell.sectionInsetRight) + let width: CGFloat = (self.bounds.width - GymsListCell.sectionInsetLeft - GymsListCell.sectionInsetRight) return ListConfiguration( isScrollEnabled: true, itemSize: CGSize(width: width, height: GymsListCell.itemHeight), - minimumInteritemSpacing: GymsListCell.minimumInterItemSpacing, - minimumLineSpacing: GymsListCell.minimumLineSpacing, + minimumItemSpacing: GymsListCell.minimumItemSpacing, scrollDirection: .vertical, sectionInset: UIEdgeInsets(top: 0.0, left: GymsListCell.sectionInsetLeft, bottom: GymsListCell.sectionInsetBottom, right: GymsListCell.sectionInsetRight) ) @@ -38,7 +39,7 @@ class GymsListCell: ListCollectionViewCell { override func didSelectItemAt(_ collectionView: UICollectionView, indexPath: IndexPath) { let gym = models[indexPath.item] - delegate?.allGymsCellShouldOpenGym(gym) +// delegate?.allGymsCellShouldOpenGym(gym) // TODO: - Implement this } override func didHighlightItemAt(_ collectionView: UICollectionView, indexPath: IndexPath) { diff --git a/Uplift/Views/Home/LookingForListCell.swift b/Uplift/Views/Home/LookingForListCell.swift index 37206304..e8b564be 100644 --- a/Uplift/Views/Home/LookingForListCell.swift +++ b/Uplift/Views/Home/LookingForListCell.swift @@ -24,17 +24,16 @@ class LookingForListCell: ListCollectionViewCell { return (collectionViewWidth - 48) / 2 } - static let minimumInterItemSpacing: CGFloat = 16 - static let minimumLineSpacing: CGFloat = 16 static let sectionInset = UIEdgeInsets(top: 0.0, left: 16.0, bottom: 32.0, right: 16.0) + static let minimumItemSpace: CGFloat = 16 + // MARK: - Overrides override var config: ListConfiguration { return ListConfiguration( isScrollEnabled: false, itemSize: CGSize(width: self.width, height: self.height), - minimumInteritemSpacing: 16, - minimumLineSpacing: 16, + minimumItemSpacing: LookingForListCell.minimumItemSpace, scrollDirection: .vertical, sectionInset: UIEdgeInsets(top: 0.0, left: 16.0, bottom: 32.0, right: 16.0) ) @@ -63,6 +62,6 @@ class LookingForListCell: ListCollectionViewCell { } static func getHeight(collectionViewWidth: CGFloat, numTags: Int) -> CGFloat { - return CGFloat(numTags / 2) * (((collectionViewWidth-48)/2)*0.78 + minimumInterItemSpacing) + return CGFloat(numTags / 2) * (((collectionViewWidth-48)/2)*0.78 + minimumItemSpace) } } diff --git a/Uplift/Views/Home/TodaysClassListItemCell.swift b/Uplift/Views/Home/TodaysClassListItemCell.swift index bbd7b88b..ee72c1a9 100644 --- a/Uplift/Views/Home/TodaysClassListItemCell.swift +++ b/Uplift/Views/Home/TodaysClassListItemCell.swift @@ -20,9 +20,8 @@ class TodaysClassListItemCell: ListItemCollectionViewCell { private let cancelledView = UIView() private let classNameLabel = UILabel() private let hoursLabel = UILabel() - private let imageView = UIImageView() - private let locationNameLabel = UILabel() private let locationWidget = UIImageView() + private let locationNameLabel = UILabel() override init(frame: CGRect) { super.init(frame: frame) @@ -35,8 +34,8 @@ class TodaysClassListItemCell: ListItemCollectionViewCell { // SHADOWING contentView.layer.shadowColor = UIColor.gray01.cgColor - contentView.layer.shadowOffset = CGSize(width: 0.0, height: 11.0) - contentView.layer.shadowRadius = 7.0 + contentView.layer.shadowOffset = CGSize(width: 1.0, height: 2.0) + contentView.layer.shadowRadius = 5.0 contentView.layer.shadowOpacity = 1.0 contentView.layer.masksToBounds = false @@ -54,15 +53,13 @@ class TodaysClassListItemCell: ListItemCollectionViewCell { override func configure(for item: GymClassInstance) { classNameLabel.text = item.className locationNameLabel.text = item.location - imageView.kf.setImage(with: item.imageURL) + hoursLabel.text = getHoursString(from: item) // Check if class is cancelled or not if item.isCancelled { cancelledView.isHidden = false cancelledLabel.isHidden = false classNameLabel.textColor = .gray03 - } else { - hoursLabel.text = getHoursString(from: item) } } @@ -77,14 +74,9 @@ class TodaysClassListItemCell: ListItemCollectionViewCell { } private func setupViews() { - imageView.clipsToBounds = true - imageView.layer.cornerRadius = 5 - imageView.layer.maskedCorners = [.layerMinXMinYCorner, .layerMaxXMinYCorner] - imageView.contentMode = .scaleAspectFill - contentView.addSubview(imageView) - cancelledView.backgroundColor = .accentClosed cancelledView.isHidden = true + cancelledView.layer.cornerRadius = 5 contentView.addSubview(cancelledView) cancelledLabel.text = ClientStrings.Home.todaysClassCancelled @@ -112,25 +104,18 @@ class TodaysClassListItemCell: ListItemCollectionViewCell { } private func setupConstraints() { - let cancelledViewSize = CGSize(width: 100, height: 32) - let cancelledViewTopPadding = 17 + let cancelledViewSize = CGSize(width: 90, height: 27) let classNameLabelHorizontalPadding = 21 let classNameLabelTopPadding = 13 let hoursLabelRightPadding = 21 - let imageViewHeight = 100 let locationNameLabelLeftPadding = 5 let locationNameLabelRightPadding = 21 let locationWidgetBottomPadding = 14 let locationWidgetSize = CGSize(width: 9, height: 13) - imageView.snp.makeConstraints { make in - make.leading.trailing.top.equalToSuperview() - make.height.equalTo(imageViewHeight) - } - cancelledView.snp.makeConstraints { make in - make.top.equalToSuperview().offset(cancelledViewTopPadding) - make.leading.equalToSuperview() + make.top.equalToSuperview() + make.trailing.equalToSuperview() make.size.equalTo(cancelledViewSize) } @@ -141,7 +126,7 @@ class TodaysClassListItemCell: ListItemCollectionViewCell { classNameLabel.snp.makeConstraints { make in make.leading.equalToSuperview().offset(classNameLabelHorizontalPadding) - make.top.equalTo(imageView.snp.bottom).offset(classNameLabelTopPadding) + make.top.equalToSuperview().offset(classNameLabelTopPadding) make.trailing.lessThanOrEqualToSuperview().inset(classNameLabelHorizontalPadding) } diff --git a/Uplift/Views/Home/TodaysClassesListCell.swift b/Uplift/Views/Home/TodaysClassesListCell.swift index 835f9ec9..03df1091 100644 --- a/Uplift/Views/Home/TodaysClassesListCell.swift +++ b/Uplift/Views/Home/TodaysClassesListCell.swift @@ -18,12 +18,22 @@ class TodaysClassesListCell: ListCollectionViewCell>: UICollectionV super.init(frame: frame) layout.scrollDirection = config.scrollDirection - if config.scrollDirection == .vertical { - layout.minimumLineSpacing = config.minimumLineSpacing - } else { - layout.minimumInteritemSpacing = config.minimumInteritemSpacing - } + layout.minimumLineSpacing = config.minimumItemSpacing layout.itemSize = config.itemSize layout.sectionInset = config.sectionInset @@ -140,11 +134,8 @@ class ListCollectionViewCell>: UICollectionV func reloadConfig() { layout.scrollDirection = config.scrollDirection - if config.scrollDirection == .vertical { - layout.minimumLineSpacing = config.minimumLineSpacing - } else { - layout.minimumInteritemSpacing = config.minimumInteritemSpacing - } + layout.minimumLineSpacing = config.minimumItemSpacing + layout.itemSize = config.itemSize layout.sectionInset = config.sectionInset diff --git a/Uplift/Views/SportsFilter/SportsFilterGymCollectionViewCell.swift b/Uplift/Views/SportsFilter/SportsFilterGymCollectionViewCell.swift index 58aa70b2..f803a183 100644 --- a/Uplift/Views/SportsFilter/SportsFilterGymCollectionViewCell.swift +++ b/Uplift/Views/SportsFilter/SportsFilterGymCollectionViewCell.swift @@ -48,11 +48,12 @@ class SportsFilterGymCollectionViewCell: SportsFilterCollectionViewCell { make.bottom.equalToSuperview().offset(-10) make.leading.trailing.equalToSuperview() } - +/* NetworkManager.shared.getGymNames(completion: { gyms in self.gyms = gyms self.gymCollectionView.reloadData() }) + */ } required init?(coder: NSCoder) { diff --git a/Uplift/graphql/classQueries.graphql b/Uplift/graphql/classQueries.graphql deleted file mode 100644 index ae5fe7d5..00000000 --- a/Uplift/graphql/classQueries.graphql +++ /dev/null @@ -1,69 +0,0 @@ -query ClassesAtGym { - classes(gymId:"") { - gym { - name - id - } - details { - name - } - } -} - -query AllIntructors { - classes { - instructor - } -} - -query AllClassNames { - classes { - details { - name - } - } -} - -query ClassesByType($classNames: [String]) { - classes(detailIds: $classNames) { - id - gymId - details { - id - name - description - tags { - label - } - } - imageUrl - startTime - endTime - date - instructor - isCancelled - location - } -} - -query TodaysClassesAtGym($gymId: String, $date: Date) { - classes(gymId: $gymId, day: $date) { - id - gymId - details { - id - name - description - tags { - label - } - } - imageUrl - startTime - endTime - date - instructor - isCancelled - location - } -} diff --git a/Uplift/graphql/googleLoginQueries.graphql b/Uplift/graphql/googleLoginQueries.graphql deleted file mode 100644 index 0ed09c7b..00000000 --- a/Uplift/graphql/googleLoginQueries.graphql +++ /dev/null @@ -1,17 +0,0 @@ -# query GoogleInitSession($token: String) { -# sessionToken -# sessionExpiration -# updateToken -# } - -# input GoogleUpdateSession($token: String) { -# sessionToken -# sessionExpiration -# updateToken -# } - -input GoogleInitSession { - # sessionToken - # sessionExpiration - # updateToken -} \ No newline at end of file diff --git a/Uplift/graphql/gymClassInstanceQueries.graphql b/Uplift/graphql/gymClassInstanceQueries.graphql deleted file mode 100644 index eca5a5ff..00000000 --- a/Uplift/graphql/gymClassInstanceQueries.graphql +++ /dev/null @@ -1,47 +0,0 @@ -query AllClassesInstances { - classes { - id - gymId - gym { - name - } - details { - id - name - description - tags { - label - } - } - imageUrl - startTime - endTime - instructor - isCancelled - } -} - -query TodaysClasses($date: Date) { - classes(day: $date) { - id - gymId - gym { - name - } - details { - id - name - description - tags { - label - } - } - imageUrl - startTime - endTime - date - instructor - isCancelled - location - } -} diff --git a/Uplift/graphql/gymQueries.graphql b/Uplift/graphql/gymQueries.graphql index 94b03fa7..96bbc3ba 100644 --- a/Uplift/graphql/gymQueries.graphql +++ b/Uplift/graphql/gymQueries.graphql @@ -1,85 +1,31 @@ - query AllGyms { gyms { - name id - imageUrl - description - popular - times { - day - startTime - endTime - } - facilities { - name - details { - detailsType - equipment { - equipmentType - name - quantity - workoutType - } - items - prices - subFacilityNames - times { - day - timeRanges { - startTime - endTime - specialHours - restrictions - } - } - } - } - } -} - -query GymById($gymId: String) { - gyms(id: $gymId) { name - id - imageUrl description - popular - times { - day - startTime - endTime - } + location + latitude + longitude + imageUrl facilities { + id name - details { - detailsType - equipment { - equipmentType - name - quantity - workoutType - } - items - prices - subFacilityNames - times { - day - timeRanges { - startTime - endTime - specialHours - restrictions - } - } + gymId + facilityType + openHours { + id + facilityId + day + startTime + endTime + } + capacity { + id + facilityId + count + percent + updated } } } } - -query AllGymNames { - gyms { - name - id - } -} diff --git a/Uplift/graphql/intructorQueries.graphql b/Uplift/graphql/intructorQueries.graphql deleted file mode 100644 index 7c465030..00000000 --- a/Uplift/graphql/intructorQueries.graphql +++ /dev/null @@ -1,5 +0,0 @@ -query getInstructors { - classes { - instructor - } -} diff --git a/Uplift/graphql/tagQueries.graphql b/Uplift/graphql/tagQueries.graphql deleted file mode 100644 index 84903eaf..00000000 --- a/Uplift/graphql/tagQueries.graphql +++ /dev/null @@ -1,10 +0,0 @@ -query GetTags { - classes { - details { - tags { - label - imageUrl - } - } - } -} diff --git a/package.json b/package.json deleted file mode 100644 index de56e707..00000000 --- a/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "apollo": "1.9" - } -} diff --git a/schema.graphql b/schema.graphql new file mode 100644 index 00000000..9b4ce453 --- /dev/null +++ b/schema.graphql @@ -0,0 +1,45 @@ +schema { + query: Query +} + +type OpenHours { + id: ID! + facilityId: Int! + day: Int! + startTime: Float! + endTime: Float! +} + +scalar DateTime + +type Capacity { + id: ID! + facilityId: Int! + count: Int! + percent: Float! + updated: DateTime! +} + +type Facility { + id: ID! + gymId: Int! + name: String! + facilityType: String! + openHours: [OpenHours] + capacity: Capacity +} + +type Gym { + id: ID! + name: String! + description: String! + location: String! + latitude: Float! + longitude: Float! + imageUrl: String + facilities: [Facility] +} + +type Query { + gyms: [Gym] +} \ No newline at end of file diff --git a/schema.json b/schema.json deleted file mode 100644 index c2fe592f..00000000 --- a/schema.json +++ /dev/null @@ -1,1984 +0,0 @@ -{ - "__schema": { - "queryType": { - "name": "Query" - }, - "mutationType": null, - "subscriptionType": null, - "types": [ - { - "kind": "OBJECT", - "name": "Query", - "description": null, - "fields": [ - { - "name": "gyms", - "description": null, - "args": [ - { - "name": "day", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Date", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "id", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null - } - ], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "GymType", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "classes", - "description": null, - "args": [ - { - "name": "detailIds", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null - }, - { - "name": "day", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Date", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "name", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "tags", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null - }, - { - "name": "gymId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "instructor", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null - } - ], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ClassType", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "SCALAR", - "name": "Date", - "description": "The `Date` scalar type represents a Date\nvalue as specified by\n[iso8601](https://en.wikipedia.org/wiki/ISO_8601).", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "SCALAR", - "name": "String", - "description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "GymType", - "description": null, - "fields": [ - { - "name": "id", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "description", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "facilities", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "FacilityType", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "popular", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "times", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "DayTimeRangeType", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "imageUrl", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "FacilityType", - "description": null, - "fields": [ - { - "name": "details", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "FacilityDetailsType", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "FacilityDetailsType", - "description": null, - "fields": [ - { - "name": "detailsType", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "equipment", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "EquipmentType", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "imageUrls", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "items", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "prices", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "subFacilityNames", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "times", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "DayTimeRangesType", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "EquipmentType", - "description": null, - "fields": [ - { - "name": "equipmentType", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "quantity", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "workoutType", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "DayTimeRangesType", - "description": null, - "fields": [ - { - "name": "day", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "timeRanges", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "TimeRangeType", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "SCALAR", - "name": "Int", - "description": "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "TimeRangeType", - "description": null, - "fields": [ - { - "name": "endTime", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Time", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "restrictions", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "specialHours", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "startTime", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Time", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "SCALAR", - "name": "Time", - "description": "The `Time` scalar type represents a Time value as\nspecified by\n[iso8601](https://en.wikipedia.org/wiki/ISO_8601).", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "SCALAR", - "name": "Boolean", - "description": "The `Boolean` scalar type represents `true` or `false`.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "DayTimeRangeType", - "description": null, - "fields": [ - { - "name": "day", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "endTime", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Time", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "restrictions", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "specialHours", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "startTime", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Time", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "ClassType", - "description": null, - "fields": [ - { - "name": "id", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "gymId", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "gym", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "GymType", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "location", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "detailsId", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "details", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ClassDetailType", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "date", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Date", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "startTime", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "Time", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "endTime", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "Time", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "instructor", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "isCancelled", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "imageUrl", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "ClassDetailType", - "description": null, - "fields": [ - { - "name": "id", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "description", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "tags", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "TagType", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "categories", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "TagType", - "description": null, - "fields": [ - { - "name": "label", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "imageUrl", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__Schema", - "description": "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.", - "fields": [ - { - "name": "types", - "description": "A list of all types supported by this server.", - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "queryType", - "description": "The type that query operations will be rooted at.", - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "mutationType", - "description": "If this server supports mutation, the type that mutation operations will be rooted at.", - "args": [], - "type": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "subscriptionType", - "description": "If this server support subscription, the type that subscription operations will be rooted at.", - "args": [], - "type": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "directives", - "description": "A list of all directives supported by this server.", - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Directive", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__Type", - "description": "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.", - "fields": [ - { - "name": "kind", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "__TypeKind", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "description", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "fields", - "description": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false" - } - ], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Field", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "interfaces", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "possibleTypes", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "enumValues", - "description": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false" - } - ], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__EnumValue", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "inputFields", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__InputValue", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ofType", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "ENUM", - "name": "__TypeKind", - "description": "An enum describing what kind of type a given `__Type` is.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "SCALAR", - "description": "Indicates this type is a scalar.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "OBJECT", - "description": "Indicates this type is an object. `fields` and `interfaces` are valid fields.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INTERFACE", - "description": "Indicates this type is an interface. `fields` and `possibleTypes` are valid fields.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "UNION", - "description": "Indicates this type is a union. `possibleTypes` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ENUM", - "description": "Indicates this type is an enum. `enumValues` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INPUT_OBJECT", - "description": "Indicates this type is an input object. `inputFields` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "LIST", - "description": "Indicates this type is a list. `ofType` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "NON_NULL", - "description": "Indicates this type is a non-null. `ofType` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - } - ], - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__Field", - "description": "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.", - "fields": [ - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "description", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "args", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__InputValue", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "type", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "isDeprecated", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "deprecationReason", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__InputValue", - "description": "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.", - "fields": [ - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "description", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "type", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "defaultValue", - "description": "A GraphQL-formatted string representing the default value for this input value.", - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__EnumValue", - "description": "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.", - "fields": [ - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "description", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "isDeprecated", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "deprecationReason", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__Directive", - "description": "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.", - "fields": [ - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "description", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "locations", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "__DirectiveLocation", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "args", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__InputValue", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "ENUM", - "name": "__DirectiveLocation", - "description": "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "QUERY", - "description": "Location adjacent to a query operation.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "MUTATION", - "description": "Location adjacent to a mutation operation.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "SUBSCRIPTION", - "description": "Location adjacent to a subscription operation.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "FIELD", - "description": "Location adjacent to a field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "FRAGMENT_DEFINITION", - "description": "Location adjacent to a fragment definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "FRAGMENT_SPREAD", - "description": "Location adjacent to a fragment spread.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INLINE_FRAGMENT", - "description": "Location adjacent to an inline fragment.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "VARIABLE_DEFINITION", - "description": "Location adjacent to a variable definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "SCHEMA", - "description": "Location adjacent to a schema definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "SCALAR", - "description": "Location adjacent to a scalar definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "OBJECT", - "description": "Location adjacent to an object type definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "FIELD_DEFINITION", - "description": "Location adjacent to a field definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ARGUMENT_DEFINITION", - "description": "Location adjacent to an argument definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INTERFACE", - "description": "Location adjacent to an interface definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "UNION", - "description": "Location adjacent to a union definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ENUM", - "description": "Location adjacent to an enum definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ENUM_VALUE", - "description": "Location adjacent to an enum value definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INPUT_OBJECT", - "description": "Location adjacent to an input object type definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INPUT_FIELD_DEFINITION", - "description": "Location adjacent to an input object field definition.", - "isDeprecated": false, - "deprecationReason": null - } - ], - "possibleTypes": null - } - ], - "directives": [ - { - "name": "include", - "description": "Directs the executor to include this field or fragment only when the `if` argument is true.", - "locations": [ - "FIELD", - "FRAGMENT_SPREAD", - "INLINE_FRAGMENT" - ], - "args": [ - { - "name": "if", - "description": "Included when true.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "defaultValue": null - } - ] - }, - { - "name": "skip", - "description": "Directs the executor to skip this field or fragment when the `if` argument is true.", - "locations": [ - "FIELD", - "FRAGMENT_SPREAD", - "INLINE_FRAGMENT" - ], - "args": [ - { - "name": "if", - "description": "Skipped when true.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "defaultValue": null - } - ] - } - ] - } -} \ No newline at end of file