diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 29d574e2..9c799b52 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,16 +11,16 @@ on: jobs: unit_tests: name: Unit Tests - runs-on: macOS-11 + runs-on: macos-13 steps: - name: Set Xcode Version - uses: maxim-lobanov/setup-xcode@v1.4.1 + uses: maxim-lobanov/setup-xcode@v1.6.0 with: - xcode-version: '13.2.1' + xcode-version: '15.2' - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4.0.0 - name: Install Gem Dependencies run: bundle install @@ -30,30 +30,19 @@ jobs: snapshot_tests: name: Snapshot Tests - runs-on: macOS-11 + runs-on: macos-13 steps: - name: Set Xcode Version - uses: maxim-lobanov/setup-xcode@v1.4.1 + uses: maxim-lobanov/setup-xcode@v1.6.0 with: - xcode-version: '13.2.1' + xcode-version: '15.2' - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4.0.0 - name: Install Gem Dependencies run: bundle install - name: Run SnapshotTests run: bundle exec fastlane snapshot_test - - lint: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Run SwiftLint Checks - uses: norio-nomura/action-swiftlint@3.2.1 - with: - args: --strict diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7549e276..333f430e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v4.0.0 - name: Get the Version id: get_version diff --git a/.swiftlint.yml b/.swiftlint.yml index b872493c..793b5703 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -21,7 +21,6 @@ opt_in_rules: - number_separator - nimble_operator - implicitly_unwrapped_optional - - attributes - first_where - multiline_parameters - multiline_arguments @@ -35,19 +34,17 @@ opt_in_rules: - convenience_type - redundant_set_access_control - multiline_function_chains - - anyobject_protocol - toggle_bool - identical_operands - collection_alignment - static_operator - legacy_random - closure_body_length - - inert_defer - last_where - multiline_literal_brackets - multiline_parameters_brackets - multiline_arguments_brackets - - unused_import + - weak_delegate disabled_rules: - implicit_getter diff --git a/Cineaste.xcodeproj/project.pbxproj b/Cineaste.xcodeproj/project.pbxproj index 38063f49..4c5b84bb 100644 --- a/Cineaste.xcodeproj/project.pbxproj +++ b/Cineaste.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 52; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -72,7 +72,7 @@ 3F492E7124F250C900016B2A /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3F492E7024F250C900016B2A /* SwiftUI.framework */; }; 3F492E7424F250C900016B2A /* CountdownWidget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F492E7324F250C900016B2A /* CountdownWidget.swift */; }; 3F492E7624F250C900016B2A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3F492E7524F250C900016B2A /* Assets.xcassets */; }; - 3F492E7A24F250C900016B2A /* MovieReleaseWidgetExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 3F492E6C24F250C900016B2A /* MovieReleaseWidgetExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 3F492E7A24F250C900016B2A /* MovieReleaseWidgetExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 3F492E6C24F250C900016B2A /* MovieReleaseWidgetExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 3F492E8424F256CF00016B2A /* Movie+Testing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F492E8224F256CF00016B2A /* Movie+Testing.swift */; }; 3F492E8824F25C8500016B2A /* AppGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F492E8724F25C8500016B2A /* AppGroup.swift */; }; 3F492E8A24F25E9C00016B2A /* Movie.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95DC320C1F97E5150014E3EA /* Movie.swift */; }; @@ -82,7 +82,7 @@ 3F4C9660232E1FB8002692D0 /* Colors.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3F4C965F232E1FB8002692D0 /* Colors.xcassets */; }; 3F4F4D552233D3C40093CDEF /* SwipeAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F4F4D542233D3C40093CDEF /* SwipeAction.swift */; }; 3F508CE024FD6E2A008A7DCB /* IntentHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F508CDF24FD6E2A008A7DCB /* IntentHandler.swift */; }; - 3F508CF524FD6E2A008A7DCB /* SelectMovieIntentExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 3F508CDD24FD6E2A008A7DCB /* SelectMovieIntentExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 3F508CF524FD6E2A008A7DCB /* SelectMovieIntentExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 3F508CDD24FD6E2A008A7DCB /* SelectMovieIntentExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 3F544E392381E2B300B26071 /* MoviesViewControllerSnapshotTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F544E382381E2B300B26071 /* MoviesViewControllerSnapshotTests.swift */; }; 3F544E3B2381EC1D00B26071 /* MoviesTabBarControllerSnapshotTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F544E3A2381EC1D00B26071 /* MoviesTabBarControllerSnapshotTests.swift */; }; 3F544E3D2381EDC700B26071 /* SearchMoviesViewControllerSnapshotTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F544E3C2381EDC700B26071 /* SearchMoviesViewControllerSnapshotTests.swift */; }; @@ -275,16 +275,16 @@ /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ - 3F492E7B24F250C900016B2A /* Embed App Extensions */ = { + 3F492E7B24F250C900016B2A /* Embed Foundation Extensions */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; dstSubfolderSpec = 13; files = ( - 3F508CF524FD6E2A008A7DCB /* SelectMovieIntentExtension.appex in Embed App Extensions */, - 3F492E7A24F250C900016B2A /* MovieReleaseWidgetExtension.appex in Embed App Extensions */, + 3F508CF524FD6E2A008A7DCB /* SelectMovieIntentExtension.appex in Embed Foundation Extensions */, + 3F492E7A24F250C900016B2A /* MovieReleaseWidgetExtension.appex in Embed Foundation Extensions */, ); - name = "Embed App Extensions"; + name = "Embed Foundation Extensions"; runOnlyForDeploymentPostprocessing = 0; }; /* End PBXCopyFilesBuildPhase section */ @@ -1148,7 +1148,7 @@ 3FF7912420DE274A007B7D37 /* Resources */, 3F31164B25C5CC980045FCCF /* Set version number in Settings.bundle */, 3F48A7A3257CDFD900956F2E /* Update Acknowledgements in Settings.bundle */, - 3F492E7B24F250C900016B2A /* Embed App Extensions */, + 3F492E7B24F250C900016B2A /* Embed Foundation Extensions */, ); buildRules = ( ); @@ -1175,8 +1175,9 @@ 95AE25941F9531E20067F5F5 /* Project object */ = { isa = PBXProject; attributes = { + BuildIndependentTargetsInParallel = YES; LastSwiftUpdateCheck = 1110; - LastUpgradeCheck = 1200; + LastUpgradeCheck = 1520; ORGANIZATIONNAME = spacepandas.de; TargetAttributes = { 3F2408F1203CB88E00EB9141 = { @@ -1307,6 +1308,7 @@ /* Begin PBXShellScriptBuildPhase section */ 3F31164B25C5CC980045FCCF /* Set version number in Settings.bundle */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -1325,6 +1327,7 @@ }; 3F48A7A3257CDFD900956F2E /* Update Acknowledgements in Settings.bundle */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -1339,10 +1342,11 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "if which license-plist >/dev/null; then\n license-plist \\\n --output-path Cineaste/Settings.bundle \\\n --package-path Cineaste.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.swift \\\n --prefix Acknowledgements \\\n --single-page \\\n --force\nelse\n echo \"warning: LicensePlist not installed, download from https://github.com/mono0926/LicensePlist\"\nfi\n"; + shellScript = "if which license-plist >/dev/null; then\n license-plist \\\n --output-path Cineaste/Settings.bundle \\\n --package-path Cineaste.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved \\\n --prefix Acknowledgements \\\n --single-page\nelse\n echo \"warning: LicensePlist not installed, download from https://github.com/mono0926/LicensePlist\"\nfi\n"; }; 3F5AF263218F80F8006717DC /* Check API Keys */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -1361,6 +1365,7 @@ }; 3F9C0A1B23C92ECA00CDB993 /* Swift Lint */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 12; files = ( ); diff --git a/Cineaste.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Cineaste.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index bbea573c..11055bd9 100644 --- a/Cineaste.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Cineaste.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,43 +1,50 @@ { - "object": { - "pins": [ - { - "package": "Kingfisher", - "repositoryURL": "https://github.com/onevcat/Kingfisher.git", - "state": { - "branch": null, - "revision": "32e4acdf6971f58f5ad552389cf2d7d016334eaf", - "version": "7.2.0" - } - }, - { - "package": "ReSwift", - "repositoryURL": "https://github.com/ReSwift/ReSwift.git", - "state": { - "branch": null, - "revision": "96146a29f394ae4c79be025fcec194e5b0d9c3b6", - "version": "6.1.0" - } - }, - { - "package": "ReSwiftThunk", - "repositoryURL": "https://github.com/ReSwift/ReSwift-Thunk.git", - "state": { - "branch": null, - "revision": "5ee9816158a2115863b1458c66cf1be9e9143b39", - "version": "2.0.1" - } - }, - { - "package": "SnapshotTesting", - "repositoryURL": "https://github.com/pointfreeco/swift-snapshot-testing.git", - "state": { - "branch": null, - "revision": "f8a9c997c3c1dab4e216a8ec9014e23144cbab37", - "version": "1.9.0" - } + "pins" : [ + { + "identity" : "kingfisher", + "kind" : "remoteSourceControl", + "location" : "https://github.com/onevcat/Kingfisher.git", + "state" : { + "revision" : "5b92f029fab2cce44386d28588098b5be0824ef5", + "version" : "7.11.0" } - ] - }, - "version": 1 + }, + { + "identity" : "reswift", + "kind" : "remoteSourceControl", + "location" : "https://github.com/ReSwift/ReSwift.git", + "state" : { + "revision" : "cb5c3c02f652420ef413dea41e13ac5a76b6c0fd", + "version" : "6.1.1" + } + }, + { + "identity" : "reswift-thunk", + "kind" : "remoteSourceControl", + "location" : "https://github.com/ReSwift/ReSwift-Thunk.git", + "state" : { + "revision" : "5ee9816158a2115863b1458c66cf1be9e9143b39", + "version" : "2.0.1" + } + }, + { + "identity" : "swift-snapshot-testing", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-snapshot-testing.git", + "state" : { + "revision" : "625ccca8570773dd84a34ee51a81aa2bc5a4f97a", + "version" : "1.16.0" + } + }, + { + "identity" : "swift-syntax", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-syntax", + "state" : { + "revision" : "303e5c5c36d6a558407d364878df131c3546fad8", + "version" : "510.0.2" + } + } + ], + "version" : 2 } diff --git a/Cineaste.xcodeproj/xcshareddata/xcschemes/Cineaste App.xcscheme b/Cineaste.xcodeproj/xcshareddata/xcschemes/Cineaste App.xcscheme index 7352b13c..176eaa02 100644 --- a/Cineaste.xcodeproj/xcshareddata/xcschemes/Cineaste App.xcscheme +++ b/Cineaste.xcodeproj/xcshareddata/xcschemes/Cineaste App.xcscheme @@ -1,6 +1,6 @@ UIPreviewAction { let action = UIPreviewAction( title: title, - style: style) { _, _ -> Void in + style: style + ) { _, _ -> Void in switch self { case .delete: store.dispatch(deleteMovie(movie)) diff --git a/Cineaste/Models/SwipeAction.swift b/Cineaste/Models/SwipeAction.swift index 10a3445b..affac5ae 100644 --- a/Cineaste/Models/SwipeAction.swift +++ b/Cineaste/Models/SwipeAction.swift @@ -16,7 +16,8 @@ enum SwipeAction { func contextualAction(for movie: Movie) -> UIContextualAction { let action = UIContextualAction( style: .normal, - title: title) { _, _, success in + title: title + ) { _, _, success in switch self { case .delete: store.dispatch(deleteMovie(movie)) diff --git a/Cineaste/Networking/Webservice.swift b/Cineaste/Networking/Webservice.swift index 919a610d..d66afee0 100644 --- a/Cineaste/Networking/Webservice.swift +++ b/Cineaste/Networking/Webservice.swift @@ -16,15 +16,6 @@ enum NetworkError: Error { } enum Webservice { - static var numberOfRequests = 0 { - didSet { - DispatchQueue.main.async { - UIApplication.shared.isNetworkActivityIndicatorVisible = - numberOfRequests > 0 - } - } - } - @discardableResult static func load(resource: Resource?, completion: @escaping (Result) -> Void) -> URLSessionTask? { guard let resource = resource else { @@ -38,11 +29,7 @@ enum Webservice { var request = URLRequest(url: url) request.httpMethod = resource.method.rawValue - numberOfRequests += 1 - let task = URLSession.shared.dataTask(with: request) { data, _, error in - numberOfRequests -= 1 - guard error == nil, let data = data else { // swiftlint:disable:next force_unwrapping completion(.failure(error!)) diff --git a/Cineaste/ReSwift/Thunks/SearchThunks.swift b/Cineaste/ReSwift/Thunks/SearchThunks.swift index a61589da..7dabaf89 100644 --- a/Cineaste/ReSwift/Thunks/SearchThunks.swift +++ b/Cineaste/ReSwift/Thunks/SearchThunks.swift @@ -9,7 +9,6 @@ import Dispatch import ReSwiftThunk -// swiftlint:disable:next closure_body_length let fetchSearchResults = Thunk { dispatch, getState in guard let state = getState()?.searchState, !state.hasLoadedAllMovies, diff --git a/Cineaste/Settings.bundle/Acknowledgements.latest_result.txt b/Cineaste/Settings.bundle/Acknowledgements.latest_result.txt index 900253d4..9c60511f 100644 --- a/Cineaste/Settings.bundle/Acknowledgements.latest_result.txt +++ b/Cineaste/Settings.bundle/Acknowledgements.latest_result.txt @@ -1,11 +1,23 @@ -name: Kingfisher, nameSpecified: Kingfisher, owner: onevcat, version: 7.2.0 +name: Kingfisher, nameSpecified: Kingfisher, owner: onevcat, version: 7.11.0, source: https://github.com/onevcat/Kingfisher -name: ReSwift, nameSpecified: ReSwift, owner: ReSwift, version: 6.1.0 +name: ReSwift, nameSpecified: ReSwift, owner: ReSwift, version: 6.1.1, source: https://github.com/ReSwift/ReSwift -name: ReSwift-Thunk, nameSpecified: ReSwiftThunk, owner: ReSwift, version: 2.0.1 +name: ReSwift-Thunk, nameSpecified: ReSwiftThunk, owner: ReSwift, version: 2.0.1, source: https://github.com/ReSwift/ReSwift-Thunk -name: swift-snapshot-testing, nameSpecified: SnapshotTesting, owner: pointfreeco, version: 1.9.0 +name: swift-snapshot-testing, nameSpecified: swift-snapshot-testing, owner: pointfreeco, version: 1.16.0, source: https://github.com/pointfreeco/swift-snapshot-testing + +name: swift-syntax, nameSpecified: swift-syntax, owner: apple, version: 510.0.2, source: https://github.com/apple/swift-syntax + +name: Kingfisher, nameSpecified: Kingfisher, owner: onevcat, version: 7.11.0, source: https://github.com/onevcat/Kingfisher + +name: ReSwift, nameSpecified: ReSwift, owner: ReSwift, version: 6.1.1, source: https://github.com/ReSwift/ReSwift + +name: ReSwift-Thunk, nameSpecified: ReSwiftThunk, owner: ReSwift, version: 2.0.1, source: https://github.com/ReSwift/ReSwift-Thunk + +name: swift-snapshot-testing, nameSpecified: swift-snapshot-testing, owner: pointfreeco, version: 1.16.0, source: https://github.com/pointfreeco/swift-snapshot-testing + +name: swift-syntax, nameSpecified: swift-syntax, owner: apple, version: 510.0.2, source: https://github.com/apple/swift-syntax add-version-numbers: false -LicensePlist Version: 3.0.7 \ No newline at end of file +LicensePlist Version: 3.24.10 \ No newline at end of file diff --git a/Cineaste/Settings.bundle/Acknowledgements.plist b/Cineaste/Settings.bundle/Acknowledgements.plist index 39bf8c17..11a79d91 100644 --- a/Cineaste/Settings.bundle/Acknowledgements.plist +++ b/Cineaste/Settings.bundle/Acknowledgements.plist @@ -29,6 +29,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + License + MIT Title Kingfisher Type @@ -44,6 +46,8 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + License + MIT Title ReSwift Type @@ -59,8 +63,10 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + License + MIT Title - ReSwift-Thunk + ReSwiftThunk Type PSGroupSpecifier @@ -88,11 +94,234 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + License + MIT Title swift-snapshot-testing Type PSGroupSpecifier + + FooterText + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + +## Runtime Library Exception to the Apache 2.0 License: ## + + + As an exception, if you use this Software to compile your source code and + portions of this Software are embedded into the binary product as a result, + you may redistribute such product without providing attribution as would + otherwise be required by Sections 4(a), 4(b) and 4(d) of the License. + + License + Apache-2.0 + Title + swift-syntax + Type + PSGroupSpecifier + diff --git a/Cineaste/Settings.bundle/Root.plist b/Cineaste/Settings.bundle/Root.plist index 7d85f0c4..7b65fcff 100644 --- a/Cineaste/Settings.bundle/Root.plist +++ b/Cineaste/Settings.bundle/Root.plist @@ -6,7 +6,7 @@ DefaultValue - DummyVersion + 0 Key version_preference Title diff --git a/Cineaste/Utils/AlertMessage.swift b/Cineaste/Utils/AlertMessage.swift index 00274886..9930da20 100644 --- a/Cineaste/Utils/AlertMessage.swift +++ b/Cineaste/Utils/AlertMessage.swift @@ -42,7 +42,8 @@ extension UIViewController { let alert = UIAlertController(message) let action = UIAlertAction( title: message.action, - style: .default) { _ in + style: .default + ) { _ in defaultActionHandler?() } alert.addAction(action) @@ -50,7 +51,8 @@ extension UIViewController { if let cancelTitle = message.cancel { let action = UIAlertAction( title: cancelTitle, - style: .cancel) { _ in + style: .cancel + ) { _ in cancelActionHandler?() } alert.addAction(action) diff --git a/Cineaste/Utils/AppGroup.swift b/Cineaste/Utils/AppGroup.swift index 4270879b..00ebd16f 100644 --- a/Cineaste/Utils/AppGroup.swift +++ b/Cineaste/Utils/AppGroup.swift @@ -8,7 +8,6 @@ import Foundation -// swiftlint:disable force_unwrapping duplicate_enum_cases public enum AppGroup: String { #if DEBUG case widget = "group.de.spacepandas.ios.cineaste-development" @@ -19,6 +18,6 @@ public enum AppGroup: String { public var containerURL: URL { FileManager.default.containerURL( forSecurityApplicationGroupIdentifier: self.rawValue - )! + )! // swiftlint:disable:this force_unwrapping } } diff --git a/Cineaste/World.swift b/Cineaste/World.swift index 971292c0..9e911f09 100644 --- a/Cineaste/World.swift +++ b/Cineaste/World.swift @@ -25,3 +25,4 @@ var Current = World() #else let Current = World() #endif +// swiftlint:enable identifier_name diff --git a/CineasteSnapshotTests/XCTestCase+SnapshotTests.swift b/CineasteSnapshotTests/XCTestCase+SnapshotTests.swift index 62f4d6b6..129c2a57 100644 --- a/CineasteSnapshotTests/XCTestCase+SnapshotTests.swift +++ b/CineasteSnapshotTests/XCTestCase+SnapshotTests.swift @@ -112,7 +112,7 @@ func assertThemedLandscapeViewControllerSnapshot( assertSnapshot( matching: value, - as: .image(on: .iPhoneX(.landscape), precision: 0.99), + as: .image(on: .iPhoneSe(.landscape), precision: 0.99), named: "landscape-\(theme.displayName)", record: false, timeout: 5, @@ -125,10 +125,10 @@ func assertThemedLandscapeViewControllerSnapshot( private func enforceSnapshotDevice() { let is2xDevice = UIScreen.main.scale == 2 - let isVersion15 = ProcessInfo().operatingSystemVersion.majorVersion == 15 + let isVersion17 = ProcessInfo().operatingSystemVersion.majorVersion == 17 - guard is2xDevice, isVersion15 else { - fatalError("Running device should have @2x screen scale (like iPhone 8) and iOS15.") + guard is2xDevice, isVersion17 else { + fatalError("Running device should have @2x screen scale (like iPhone SE) and iOS17.") } } diff --git a/CineasteSnapshotTests/__Snapshots__/MovieDetailViewControllerSnapshotTests/testGeneralAppearance.Dark.png b/CineasteSnapshotTests/__Snapshots__/MovieDetailViewControllerSnapshotTests/testGeneralAppearance.Dark.png index 8b6f0523..dfa573f8 100644 Binary files a/CineasteSnapshotTests/__Snapshots__/MovieDetailViewControllerSnapshotTests/testGeneralAppearance.Dark.png and b/CineasteSnapshotTests/__Snapshots__/MovieDetailViewControllerSnapshotTests/testGeneralAppearance.Dark.png differ diff --git a/CineasteSnapshotTests/__Snapshots__/MovieDetailViewControllerSnapshotTests/testGeneralAppearance.Light.png b/CineasteSnapshotTests/__Snapshots__/MovieDetailViewControllerSnapshotTests/testGeneralAppearance.Light.png index 4d9a28d9..8d825a87 100644 Binary files a/CineasteSnapshotTests/__Snapshots__/MovieDetailViewControllerSnapshotTests/testGeneralAppearance.Light.png and b/CineasteSnapshotTests/__Snapshots__/MovieDetailViewControllerSnapshotTests/testGeneralAppearance.Light.png differ diff --git a/CineasteSnapshotTests/__Snapshots__/MovieDetailViewControllerSnapshotTests/testWatchlistMovieAppearance.Dark.png b/CineasteSnapshotTests/__Snapshots__/MovieDetailViewControllerSnapshotTests/testWatchlistMovieAppearance.Dark.png index 2c63afc3..3f248656 100644 Binary files a/CineasteSnapshotTests/__Snapshots__/MovieDetailViewControllerSnapshotTests/testWatchlistMovieAppearance.Dark.png and b/CineasteSnapshotTests/__Snapshots__/MovieDetailViewControllerSnapshotTests/testWatchlistMovieAppearance.Dark.png differ diff --git a/CineasteSnapshotTests/__Snapshots__/MovieDetailViewControllerSnapshotTests/testWatchlistMovieAppearance.Light.png b/CineasteSnapshotTests/__Snapshots__/MovieDetailViewControllerSnapshotTests/testWatchlistMovieAppearance.Light.png index 5218703d..e711882f 100644 Binary files a/CineasteSnapshotTests/__Snapshots__/MovieDetailViewControllerSnapshotTests/testWatchlistMovieAppearance.Light.png and b/CineasteSnapshotTests/__Snapshots__/MovieDetailViewControllerSnapshotTests/testWatchlistMovieAppearance.Light.png differ diff --git a/CineasteSnapshotTests/__Snapshots__/MovieSnapshotTests/testCURLForDetails.1.txt b/CineasteSnapshotTests/__Snapshots__/MovieSnapshotTests/testCURLForDetails.1.txt index 92138f68..9e89a4ab 100644 --- a/CineasteSnapshotTests/__Snapshots__/MovieSnapshotTests/testCURLForDetails.1.txt +++ b/CineasteSnapshotTests/__Snapshots__/MovieSnapshotTests/testCURLForDetails.1.txt @@ -1,2 +1,2 @@ curl \ - "https://api.themoviedb.org/3/movie/515042?language=en-US®ion=US&api_key=xxx&append_to_response=release_dates" \ No newline at end of file + "https://api.themoviedb.org/3/movie/515042?api_key=xxx&append_to_response=release_dates&language=en-US®ion=US" \ No newline at end of file diff --git a/CineasteSnapshotTests/__Snapshots__/MovieSnapshotTests/testCURLForLatestReleases.1.txt b/CineasteSnapshotTests/__Snapshots__/MovieSnapshotTests/testCURLForLatestReleases.1.txt index c4f2710b..46e4dfb3 100644 --- a/CineasteSnapshotTests/__Snapshots__/MovieSnapshotTests/testCURLForLatestReleases.1.txt +++ b/CineasteSnapshotTests/__Snapshots__/MovieSnapshotTests/testCURLForLatestReleases.1.txt @@ -1,2 +1,2 @@ curl \ - "https://api.themoviedb.org/3/discover/movie?language=en-US&api_key=xxx®ion=US&release_date.gte=2020-11-28&release_date.lte=2021-01-27&with_release_type=3&page=0" \ No newline at end of file + "https://api.themoviedb.org/3/discover/movie?api_key=xxx&language=en-US&page=0®ion=US&release_date.gte=2020-11-28&release_date.lte=2021-01-27&with_release_type=3" \ No newline at end of file diff --git a/CineasteSnapshotTests/__Snapshots__/MovieSnapshotTests/testCURLForSearch.1.txt b/CineasteSnapshotTests/__Snapshots__/MovieSnapshotTests/testCURLForSearch.1.txt index fa9d0ac3..308ef0e4 100644 --- a/CineasteSnapshotTests/__Snapshots__/MovieSnapshotTests/testCURLForSearch.1.txt +++ b/CineasteSnapshotTests/__Snapshots__/MovieSnapshotTests/testCURLForSearch.1.txt @@ -1,2 +1,2 @@ curl \ - "https://api.themoviedb.org/3/search/movie?language=en-US&api_key=xxx&query=query®ion=US&with_release_type=3&page=0" \ No newline at end of file + "https://api.themoviedb.org/3/search/movie?api_key=xxx&language=en-US&page=0&query=query®ion=US&with_release_type=3" \ No newline at end of file diff --git a/CineasteSnapshotTests/__Snapshots__/MoviesViewControllerSnapshotTests/testEmptyAppearance.Dark.png b/CineasteSnapshotTests/__Snapshots__/MoviesViewControllerSnapshotTests/testEmptyAppearance.Dark.png index 2ba288c4..8643ecda 100644 Binary files a/CineasteSnapshotTests/__Snapshots__/MoviesViewControllerSnapshotTests/testEmptyAppearance.Dark.png and b/CineasteSnapshotTests/__Snapshots__/MoviesViewControllerSnapshotTests/testEmptyAppearance.Dark.png differ diff --git a/CineasteSnapshotTests/__Snapshots__/MoviesViewControllerSnapshotTests/testEmptyAppearance.Light.png b/CineasteSnapshotTests/__Snapshots__/MoviesViewControllerSnapshotTests/testEmptyAppearance.Light.png index 84143a02..bb8b14f6 100644 Binary files a/CineasteSnapshotTests/__Snapshots__/MoviesViewControllerSnapshotTests/testEmptyAppearance.Light.png and b/CineasteSnapshotTests/__Snapshots__/MoviesViewControllerSnapshotTests/testEmptyAppearance.Light.png differ diff --git a/CineasteSnapshotTests/__Snapshots__/MoviesViewControllerSnapshotTests/testGeneralAppearanceForHistory.Dark.png b/CineasteSnapshotTests/__Snapshots__/MoviesViewControllerSnapshotTests/testGeneralAppearanceForHistory.Dark.png index 5bbcb5c9..36942a41 100644 Binary files a/CineasteSnapshotTests/__Snapshots__/MoviesViewControllerSnapshotTests/testGeneralAppearanceForHistory.Dark.png and b/CineasteSnapshotTests/__Snapshots__/MoviesViewControllerSnapshotTests/testGeneralAppearanceForHistory.Dark.png differ diff --git a/CineasteSnapshotTests/__Snapshots__/MoviesViewControllerSnapshotTests/testGeneralAppearanceForHistory.Light.png b/CineasteSnapshotTests/__Snapshots__/MoviesViewControllerSnapshotTests/testGeneralAppearanceForHistory.Light.png index dc19e9d6..ac099565 100644 Binary files a/CineasteSnapshotTests/__Snapshots__/MoviesViewControllerSnapshotTests/testGeneralAppearanceForHistory.Light.png and b/CineasteSnapshotTests/__Snapshots__/MoviesViewControllerSnapshotTests/testGeneralAppearanceForHistory.Light.png differ diff --git a/CineasteSnapshotTests/__Snapshots__/MoviesViewControllerSnapshotTests/testGeneralAppearanceForWatchlist.Dark.png b/CineasteSnapshotTests/__Snapshots__/MoviesViewControllerSnapshotTests/testGeneralAppearanceForWatchlist.Dark.png index d70d9c32..47a2c425 100644 Binary files a/CineasteSnapshotTests/__Snapshots__/MoviesViewControllerSnapshotTests/testGeneralAppearanceForWatchlist.Dark.png and b/CineasteSnapshotTests/__Snapshots__/MoviesViewControllerSnapshotTests/testGeneralAppearanceForWatchlist.Dark.png differ diff --git a/CineasteSnapshotTests/__Snapshots__/MoviesViewControllerSnapshotTests/testGeneralAppearanceForWatchlist.Light.png b/CineasteSnapshotTests/__Snapshots__/MoviesViewControllerSnapshotTests/testGeneralAppearanceForWatchlist.Light.png index 31129659..3c2bf0e8 100644 Binary files a/CineasteSnapshotTests/__Snapshots__/MoviesViewControllerSnapshotTests/testGeneralAppearanceForWatchlist.Light.png and b/CineasteSnapshotTests/__Snapshots__/MoviesViewControllerSnapshotTests/testGeneralAppearanceForWatchlist.Light.png differ diff --git a/CineasteSnapshotTests/__Snapshots__/PosterViewControllerSnapshotTests/testGeneralAppearance.Dark.png b/CineasteSnapshotTests/__Snapshots__/PosterViewControllerSnapshotTests/testGeneralAppearance.Dark.png index bc38f0b3..97dea282 100644 Binary files a/CineasteSnapshotTests/__Snapshots__/PosterViewControllerSnapshotTests/testGeneralAppearance.Dark.png and b/CineasteSnapshotTests/__Snapshots__/PosterViewControllerSnapshotTests/testGeneralAppearance.Dark.png differ diff --git a/CineasteSnapshotTests/__Snapshots__/PosterViewControllerSnapshotTests/testGeneralAppearance.Light.png b/CineasteSnapshotTests/__Snapshots__/PosterViewControllerSnapshotTests/testGeneralAppearance.Light.png index bc38f0b3..97dea282 100644 Binary files a/CineasteSnapshotTests/__Snapshots__/PosterViewControllerSnapshotTests/testGeneralAppearance.Light.png and b/CineasteSnapshotTests/__Snapshots__/PosterViewControllerSnapshotTests/testGeneralAppearance.Light.png differ diff --git a/CineasteSnapshotTests/__Snapshots__/SearchMoviesCellSnapshotTests/testSeenAppearance.Dark.png b/CineasteSnapshotTests/__Snapshots__/SearchMoviesCellSnapshotTests/testSeenAppearance.Dark.png index 8e5ebba5..8fb06991 100644 Binary files a/CineasteSnapshotTests/__Snapshots__/SearchMoviesCellSnapshotTests/testSeenAppearance.Dark.png and b/CineasteSnapshotTests/__Snapshots__/SearchMoviesCellSnapshotTests/testSeenAppearance.Dark.png differ diff --git a/CineasteSnapshotTests/__Snapshots__/SearchMoviesCellSnapshotTests/testSeenAppearance.Light.png b/CineasteSnapshotTests/__Snapshots__/SearchMoviesCellSnapshotTests/testSeenAppearance.Light.png index 6463ffec..dead5356 100644 Binary files a/CineasteSnapshotTests/__Snapshots__/SearchMoviesCellSnapshotTests/testSeenAppearance.Light.png and b/CineasteSnapshotTests/__Snapshots__/SearchMoviesCellSnapshotTests/testSeenAppearance.Light.png differ diff --git a/CineasteSnapshotTests/__Snapshots__/SearchMoviesCellSnapshotTests/testUndefinedAppearance.Dark.png b/CineasteSnapshotTests/__Snapshots__/SearchMoviesCellSnapshotTests/testUndefinedAppearance.Dark.png index 1b34c39f..e4c209c5 100644 Binary files a/CineasteSnapshotTests/__Snapshots__/SearchMoviesCellSnapshotTests/testUndefinedAppearance.Dark.png and b/CineasteSnapshotTests/__Snapshots__/SearchMoviesCellSnapshotTests/testUndefinedAppearance.Dark.png differ diff --git a/CineasteSnapshotTests/__Snapshots__/SearchMoviesCellSnapshotTests/testUndefinedAppearance.Light.png b/CineasteSnapshotTests/__Snapshots__/SearchMoviesCellSnapshotTests/testUndefinedAppearance.Light.png index d1a16658..a2d01933 100644 Binary files a/CineasteSnapshotTests/__Snapshots__/SearchMoviesCellSnapshotTests/testUndefinedAppearance.Light.png and b/CineasteSnapshotTests/__Snapshots__/SearchMoviesCellSnapshotTests/testUndefinedAppearance.Light.png differ diff --git a/CineasteSnapshotTests/__Snapshots__/SearchMoviesCellSnapshotTests/testWatchlistAppearance.Dark.png b/CineasteSnapshotTests/__Snapshots__/SearchMoviesCellSnapshotTests/testWatchlistAppearance.Dark.png index da25acf8..f0435ce9 100644 Binary files a/CineasteSnapshotTests/__Snapshots__/SearchMoviesCellSnapshotTests/testWatchlistAppearance.Dark.png and b/CineasteSnapshotTests/__Snapshots__/SearchMoviesCellSnapshotTests/testWatchlistAppearance.Dark.png differ diff --git a/CineasteSnapshotTests/__Snapshots__/SearchMoviesCellSnapshotTests/testWatchlistAppearance.Light.png b/CineasteSnapshotTests/__Snapshots__/SearchMoviesCellSnapshotTests/testWatchlistAppearance.Light.png index ead84fbc..a888f5d2 100644 Binary files a/CineasteSnapshotTests/__Snapshots__/SearchMoviesCellSnapshotTests/testWatchlistAppearance.Light.png and b/CineasteSnapshotTests/__Snapshots__/SearchMoviesCellSnapshotTests/testWatchlistAppearance.Light.png differ diff --git a/CineasteSnapshotTests/__Snapshots__/SearchMoviesCellSnapshotTests/testWatchlistComingSoonAppearance.Dark.png b/CineasteSnapshotTests/__Snapshots__/SearchMoviesCellSnapshotTests/testWatchlistComingSoonAppearance.Dark.png index 762f1aee..34cbe766 100644 Binary files a/CineasteSnapshotTests/__Snapshots__/SearchMoviesCellSnapshotTests/testWatchlistComingSoonAppearance.Dark.png and b/CineasteSnapshotTests/__Snapshots__/SearchMoviesCellSnapshotTests/testWatchlistComingSoonAppearance.Dark.png differ diff --git a/CineasteSnapshotTests/__Snapshots__/SearchMoviesCellSnapshotTests/testWatchlistComingSoonAppearance.Light.png b/CineasteSnapshotTests/__Snapshots__/SearchMoviesCellSnapshotTests/testWatchlistComingSoonAppearance.Light.png index c7c586b3..beb6bd6f 100644 Binary files a/CineasteSnapshotTests/__Snapshots__/SearchMoviesCellSnapshotTests/testWatchlistComingSoonAppearance.Light.png and b/CineasteSnapshotTests/__Snapshots__/SearchMoviesCellSnapshotTests/testWatchlistComingSoonAppearance.Light.png differ diff --git a/CineasteSnapshotTests/__Snapshots__/SearchMoviesViewControllerSnapshotTests/testLoadingAppearance.Dark.png b/CineasteSnapshotTests/__Snapshots__/SearchMoviesViewControllerSnapshotTests/testLoadingAppearance.Dark.png index 8e1dd1b4..c9bf5a35 100644 Binary files a/CineasteSnapshotTests/__Snapshots__/SearchMoviesViewControllerSnapshotTests/testLoadingAppearance.Dark.png and b/CineasteSnapshotTests/__Snapshots__/SearchMoviesViewControllerSnapshotTests/testLoadingAppearance.Dark.png differ diff --git a/CineasteSnapshotTests/__Snapshots__/SearchMoviesViewControllerSnapshotTests/testLoadingAppearance.Light.png b/CineasteSnapshotTests/__Snapshots__/SearchMoviesViewControllerSnapshotTests/testLoadingAppearance.Light.png index e9578021..a3ef2954 100644 Binary files a/CineasteSnapshotTests/__Snapshots__/SearchMoviesViewControllerSnapshotTests/testLoadingAppearance.Light.png and b/CineasteSnapshotTests/__Snapshots__/SearchMoviesViewControllerSnapshotTests/testLoadingAppearance.Light.png differ diff --git a/CineasteSnapshotTests/__Snapshots__/SeenMovieCellSnapshotTests/testGeneralAppearance.Dark.png b/CineasteSnapshotTests/__Snapshots__/SeenMovieCellSnapshotTests/testGeneralAppearance.Dark.png index dfa6541e..59ae33e0 100644 Binary files a/CineasteSnapshotTests/__Snapshots__/SeenMovieCellSnapshotTests/testGeneralAppearance.Dark.png and b/CineasteSnapshotTests/__Snapshots__/SeenMovieCellSnapshotTests/testGeneralAppearance.Dark.png differ diff --git a/CineasteSnapshotTests/__Snapshots__/SeenMovieCellSnapshotTests/testGeneralAppearance.Light.png b/CineasteSnapshotTests/__Snapshots__/SeenMovieCellSnapshotTests/testGeneralAppearance.Light.png index 5223adc4..056f5908 100644 Binary files a/CineasteSnapshotTests/__Snapshots__/SeenMovieCellSnapshotTests/testGeneralAppearance.Light.png and b/CineasteSnapshotTests/__Snapshots__/SeenMovieCellSnapshotTests/testGeneralAppearance.Light.png differ diff --git a/CineasteSnapshotTests/__Snapshots__/SettingsDetailViewControllerSnapshotTests/testGeneralAppearance.Dark.png b/CineasteSnapshotTests/__Snapshots__/SettingsDetailViewControllerSnapshotTests/testGeneralAppearance.Dark.png index fc5a06dc..4dbacf7c 100644 Binary files a/CineasteSnapshotTests/__Snapshots__/SettingsDetailViewControllerSnapshotTests/testGeneralAppearance.Dark.png and b/CineasteSnapshotTests/__Snapshots__/SettingsDetailViewControllerSnapshotTests/testGeneralAppearance.Dark.png differ diff --git a/CineasteSnapshotTests/__Snapshots__/SettingsDetailViewControllerSnapshotTests/testGeneralAppearance.Light.png b/CineasteSnapshotTests/__Snapshots__/SettingsDetailViewControllerSnapshotTests/testGeneralAppearance.Light.png index af489c20..397f9028 100644 Binary files a/CineasteSnapshotTests/__Snapshots__/SettingsDetailViewControllerSnapshotTests/testGeneralAppearance.Light.png and b/CineasteSnapshotTests/__Snapshots__/SettingsDetailViewControllerSnapshotTests/testGeneralAppearance.Light.png differ diff --git a/CineasteSnapshotTests/__Snapshots__/SettingsViewControllerSnapshotTests/testGeneralAppearance.Dark.png b/CineasteSnapshotTests/__Snapshots__/SettingsViewControllerSnapshotTests/testGeneralAppearance.Dark.png index 2ff30b83..025e5a43 100644 Binary files a/CineasteSnapshotTests/__Snapshots__/SettingsViewControllerSnapshotTests/testGeneralAppearance.Dark.png and b/CineasteSnapshotTests/__Snapshots__/SettingsViewControllerSnapshotTests/testGeneralAppearance.Dark.png differ diff --git a/CineasteSnapshotTests/__Snapshots__/SettingsViewControllerSnapshotTests/testGeneralAppearance.Light.png b/CineasteSnapshotTests/__Snapshots__/SettingsViewControllerSnapshotTests/testGeneralAppearance.Light.png index 4a5a929b..c11417bc 100644 Binary files a/CineasteSnapshotTests/__Snapshots__/SettingsViewControllerSnapshotTests/testGeneralAppearance.Light.png and b/CineasteSnapshotTests/__Snapshots__/SettingsViewControllerSnapshotTests/testGeneralAppearance.Light.png differ diff --git a/CineasteSnapshotTests/__Snapshots__/WatchlistMovieCellSnapshotTests/testGeneralAppearance.Dark.png b/CineasteSnapshotTests/__Snapshots__/WatchlistMovieCellSnapshotTests/testGeneralAppearance.Dark.png index 0bc236f5..165bed55 100644 Binary files a/CineasteSnapshotTests/__Snapshots__/WatchlistMovieCellSnapshotTests/testGeneralAppearance.Dark.png and b/CineasteSnapshotTests/__Snapshots__/WatchlistMovieCellSnapshotTests/testGeneralAppearance.Dark.png differ diff --git a/CineasteSnapshotTests/__Snapshots__/WatchlistMovieCellSnapshotTests/testGeneralAppearance.Light.png b/CineasteSnapshotTests/__Snapshots__/WatchlistMovieCellSnapshotTests/testGeneralAppearance.Light.png index bd9ae60b..ae120be0 100644 Binary files a/CineasteSnapshotTests/__Snapshots__/WatchlistMovieCellSnapshotTests/testGeneralAppearance.Light.png and b/CineasteSnapshotTests/__Snapshots__/WatchlistMovieCellSnapshotTests/testGeneralAppearance.Light.png differ diff --git a/CineasteSnapshotTests/__Snapshots__/XCTestCase+SnapshotTests/assertThemedLandscapeViewControllerSnapshot-for-matching.landscape-Dark.png b/CineasteSnapshotTests/__Snapshots__/XCTestCase+SnapshotTests/assertThemedLandscapeViewControllerSnapshot-for-matching.landscape-Dark.png index 75054007..ffcc4240 100644 Binary files a/CineasteSnapshotTests/__Snapshots__/XCTestCase+SnapshotTests/assertThemedLandscapeViewControllerSnapshot-for-matching.landscape-Dark.png and b/CineasteSnapshotTests/__Snapshots__/XCTestCase+SnapshotTests/assertThemedLandscapeViewControllerSnapshot-for-matching.landscape-Dark.png differ diff --git a/CineasteSnapshotTests/__Snapshots__/XCTestCase+SnapshotTests/assertThemedLandscapeViewControllerSnapshot-for-matching.landscape-Light.png b/CineasteSnapshotTests/__Snapshots__/XCTestCase+SnapshotTests/assertThemedLandscapeViewControllerSnapshot-for-matching.landscape-Light.png index a9849fd6..a445cfeb 100644 Binary files a/CineasteSnapshotTests/__Snapshots__/XCTestCase+SnapshotTests/assertThemedLandscapeViewControllerSnapshot-for-matching.landscape-Light.png and b/CineasteSnapshotTests/__Snapshots__/XCTestCase+SnapshotTests/assertThemedLandscapeViewControllerSnapshot-for-matching.landscape-Light.png differ diff --git a/CineasteTests/DateFormatterTests.swift b/CineasteTests/DateFormatterTests.swift index be6da698..3a89d7fd 100644 --- a/CineasteTests/DateFormatterTests.swift +++ b/CineasteTests/DateFormatterTests.swift @@ -24,7 +24,7 @@ class DateFormatterTests: XCTestCase { let pairs: [(String, String)] = [ ("Dec 28, 2020", testDate.formatted), ("2020", testDate.formattedOnlyYear), - ("December 28, 2020 at 10:49 AM", testDate.formattedWithTime), + ("December 28, 2020 at 10:49 AM", testDate.formattedWithTime), ("2020-12-28", testDate.formattedForRequest), ("Dec 28, 2020 09:49:53", testDate.formattedForJson) ] diff --git a/CineasteTests/MovieTests.swift b/CineasteTests/MovieTests.swift index 8b1b213c..0f7998b3 100644 --- a/CineasteTests/MovieTests.swift +++ b/CineasteTests/MovieTests.swift @@ -46,7 +46,7 @@ class MovieTests: XCTestCase { let movie = Movie.testingSeen // Then - XCTAssertEqual("Added on November 17, 2017 at 9:49 PM", movie.formattedWatchedDate) + XCTAssertEqual("Added on November 17, 2017 at 9:49 PM", movie.formattedWatchedDate) } func testSoonAvailableShouldReturnTrue() { diff --git a/CineasteTests/NSNumberFormatterTests.swift b/CineasteTests/NSNumberFormatterTests.swift index f1138b8f..14d59532 100644 --- a/CineasteTests/NSNumberFormatterTests.swift +++ b/CineasteTests/NSNumberFormatterTests.swift @@ -14,7 +14,7 @@ class NSNumberFormatterTests: XCTestCase { func testFormattedForPercentageShouldFormatNSNumberCorrectly() { // Given Current.locale = Locale(identifier: "en-US") - let number: NSNumber = 0.123_1 + let number: NSNumber = 0.1231 let expected = "12%" // When diff --git a/CineasteUITests/ScreenshotsUITests.swift b/CineasteUITests/ScreenshotsUITests.swift index b567a49e..c21fd449 100644 --- a/CineasteUITests/ScreenshotsUITests.swift +++ b/CineasteUITests/ScreenshotsUITests.swift @@ -29,7 +29,9 @@ class ScreenshotsUITests: XCTestCase { // "UICTContentSizeCategoryL" ] - setupSnapshot(app, waitForAnimations: false) + Task { + await setupSnapshot(self.app, waitForAnimations: true) + } } func testScreenshots() { @@ -179,16 +181,18 @@ extension ScreenshotsUITests { } private func namedSnapshot(_ name: String) { - var snapshotName = name + Task { + var snapshotName = name - if app.launchArguments.contains("UICTContentSizeCategoryAccessibilityL") { - snapshotName += "_a11y" - } + if app.launchArguments.contains("UICTContentSizeCategoryAccessibilityL") { + snapshotName += "_a11y" + } - if app.launchArguments.contains("UI_TEST_DARK_MODE") { - snapshotName += "_dark" - } + if app.launchArguments.contains("UI_TEST_DARK_MODE") { + snapshotName += "_dark" + } - snapshot(snapshotName, timeWaitingForIdle: 0) + await snapshot(snapshotName, timeWaitingForIdle: 0) + } } } diff --git a/CineasteUITests/SnapshotHelper.swift b/CineasteUITests/SnapshotHelper.swift index 0046aaa6..6dec1302 100644 --- a/CineasteUITests/SnapshotHelper.swift +++ b/CineasteUITests/SnapshotHelper.swift @@ -15,13 +15,12 @@ import Foundation import XCTest -var deviceLanguage = "" -var locale = "" - +@MainActor func setupSnapshot(_ app: XCUIApplication, waitForAnimations: Bool = true) { Snapshot.setupSnapshot(app, waitForAnimations: waitForAnimations) } +@MainActor func snapshot(_ name: String, waitForLoadingIndicator: Bool) { if waitForLoadingIndicator { Snapshot.snapshot(name) @@ -33,6 +32,7 @@ func snapshot(_ name: String, waitForLoadingIndicator: Bool) { /// - Parameters: /// - name: The name of the snapshot /// - timeout: Amount of seconds to wait until the network loading indicator disappears. Pass `0` if you don't want to wait. +@MainActor func snapshot(_ name: String, timeWaitingForIdle timeout: TimeInterval = 20) { Snapshot.snapshot(name, timeWaitingForIdle: timeout) } @@ -52,6 +52,7 @@ enum SnapshotError: Error, CustomDebugStringConvertible { } @objcMembers +@MainActor open class Snapshot: NSObject { static var app: XCUIApplication? static var waitForAnimations = true @@ -59,6 +60,8 @@ open class Snapshot: NSObject { static var screenshotsDirectory: URL? { return cacheDirectory?.appendingPathComponent("screenshots", isDirectory: true) } + static var deviceLanguage = "" + static var currentLocale = "" open class func setupSnapshot(_ app: XCUIApplication, waitForAnimations: Bool = true) { @@ -103,17 +106,17 @@ open class Snapshot: NSObject { do { let trimCharacterSet = CharacterSet.whitespacesAndNewlines - locale = try String(contentsOf: path, encoding: .utf8).trimmingCharacters(in: trimCharacterSet) + currentLocale = try String(contentsOf: path, encoding: .utf8).trimmingCharacters(in: trimCharacterSet) } catch { NSLog("Couldn't detect/set locale...") } - if locale.isEmpty && !deviceLanguage.isEmpty { - locale = Locale(identifier: deviceLanguage).identifier + if currentLocale.isEmpty && !deviceLanguage.isEmpty { + currentLocale = Locale(identifier: deviceLanguage).identifier } - if !locale.isEmpty { - app.launchArguments += ["-AppleLocale", "\"\(locale)\""] + if !currentLocale.isEmpty { + app.launchArguments += ["-AppleLocale", "\"\(currentLocale)\""] } } @@ -181,7 +184,7 @@ open class Snapshot: NSObject { let path = screenshotsDir.appendingPathComponent("\(simulator)-\(name).png") #if swift(<5.0) - UIImagePNGRepresentation(image)?.write(to: path, options: .atomic) + try UIImagePNGRepresentation(image)?.write(to: path, options: .atomic) #else try image.pngData()?.write(to: path, options: .atomic) #endif @@ -281,6 +284,7 @@ private extension XCUIElementQuery { return self.containing(isNetworkLoadingIndicator) } + @MainActor var deviceStatusBars: XCUIElementQuery { guard let app = Snapshot.app else { fatalError("XCUIApplication is not set. Please call setupSnapshot(app) before snapshot().") @@ -306,4 +310,4 @@ private extension CGFloat { // Please don't remove the lines below // They are used to detect outdated configuration files -// SnapshotHelperVersion [1.28] +// SnapshotHelperVersion [1.30] diff --git a/Gemfile.lock b/Gemfile.lock index 9b8bb329..941f63ed 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,43 +1,45 @@ GEM remote: https://rubygems.org/ specs: - CFPropertyList (3.0.5) + CFPropertyList (3.0.7) + base64 + nkf rexml - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) - artifactory (3.0.15) + addressable (2.8.6) + public_suffix (>= 2.0.2, < 6.0) + artifactory (3.0.17) atomos (0.1.3) - aws-eventstream (1.2.0) - aws-partitions (1.581.0) - aws-sdk-core (3.130.2) - aws-eventstream (~> 1, >= 1.0.2) - aws-partitions (~> 1, >= 1.525.0) - aws-sigv4 (~> 1.1) - jmespath (~> 1.0) - aws-sdk-kms (1.56.0) - aws-sdk-core (~> 3, >= 3.127.0) + aws-eventstream (1.3.0) + aws-partitions (1.927.0) + aws-sdk-core (3.195.0) + aws-eventstream (~> 1, >= 1.3.0) + aws-partitions (~> 1, >= 1.651.0) + aws-sigv4 (~> 1.8) + jmespath (~> 1, >= 1.6.1) + aws-sdk-kms (1.80.0) + aws-sdk-core (~> 3, >= 3.193.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.113.2) - aws-sdk-core (~> 3, >= 3.127.0) + aws-sdk-s3 (1.149.1) + aws-sdk-core (~> 3, >= 3.194.0) aws-sdk-kms (~> 1) - aws-sigv4 (~> 1.4) - aws-sigv4 (1.5.0) + aws-sigv4 (~> 1.8) + aws-sigv4 (1.8.0) aws-eventstream (~> 1, >= 1.0.2) babosa (1.0.4) - claide (1.0.3) + base64 (0.2.0) + claide (1.1.0) colored (1.2) colored2 (3.1.2) commander (4.6.0) highline (~> 2.0.0) declarative (0.0.20) - digest-crc (0.6.4) + digest-crc (0.6.5) rake (>= 12.0.0, < 14.0.0) - domain_name (0.5.20190701) - unf (>= 0.0.5, < 1.0.0) - dotenv (2.7.6) + domain_name (0.6.20240107) + dotenv (2.8.1) emoji_regex (3.2.3) - excon (0.92.3) - faraday (1.10.0) + excon (0.110.0) + faraday (1.10.3) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) @@ -56,8 +58,8 @@ GEM faraday-em_synchrony (1.0.0) faraday-excon (1.1.0) faraday-httpclient (1.0.1) - faraday-multipart (1.0.3) - multipart-post (>= 1.2, < 3) + faraday-multipart (1.0.4) + multipart-post (~> 2) faraday-net_http (1.0.1) faraday-net_http_persistent (1.2.0) faraday-patron (1.0.0) @@ -65,15 +67,15 @@ GEM faraday-retry (1.0.3) faraday_middleware (1.2.0) faraday (~> 1.0) - fastimage (2.2.6) - fastlane (2.205.2) + fastimage (2.3.1) + fastlane (2.220.0) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.8, < 3.0.0) artifactory (~> 3.0) aws-sdk-s3 (~> 1.0) babosa (>= 1.0.3, < 2.0.0) bundler (>= 1.12.0, < 3.0.0) - colored + colored (~> 1.2) commander (~> 4.6) dotenv (>= 2.1.1, < 3.0.0) emoji_regex (>= 0.1, < 4.0) @@ -85,30 +87,32 @@ GEM gh_inspector (>= 1.1.2, < 2.0.0) google-apis-androidpublisher_v3 (~> 0.3) google-apis-playcustomapp_v1 (~> 0.1) + google-cloud-env (>= 1.6.0, < 2.0.0) google-cloud-storage (~> 1.31) highline (~> 2.0) + http-cookie (~> 1.0.5) json (< 3.0.0) jwt (>= 2.1.0, < 3) mini_magick (>= 4.9.4, < 5.0.0) - multipart-post (~> 2.0.0) + multipart-post (>= 2.0.0, < 3.0.0) naturally (~> 2.2) - optparse (~> 0.1.1) + optparse (>= 0.1.1, < 1.0.0) plist (>= 3.1.0, < 4.0.0) rubyzip (>= 2.0.0, < 3.0.0) - security (= 0.1.3) + security (= 0.1.5) simctl (~> 1.6.3) terminal-notifier (>= 2.0.0, < 3.0.0) - terminal-table (>= 1.4.5, < 2.0.0) + terminal-table (~> 3) tty-screen (>= 0.6.3, < 1.0.0) tty-spinner (>= 0.8.0, < 1.0.0) word_wrap (~> 1.0.0) xcodeproj (>= 1.13.0, < 2.0.0) xcpretty (~> 0.3.0) - xcpretty-travis-formatter (>= 0.0.3) + xcpretty-travis-formatter (>= 0.0.3, < 2.0.0) gh_inspector (1.1.3) - google-apis-androidpublisher_v3 (0.19.0) - google-apis-core (>= 0.4, < 2.a) - google-apis-core (0.4.2) + google-apis-androidpublisher_v3 (0.54.0) + google-apis-core (>= 0.11.0, < 2.a) + google-apis-core (0.11.3) addressable (~> 2.5, >= 2.5.1) googleauth (>= 0.16.2, < 2.a) httpclient (>= 2.8.1, < 3.a) @@ -116,90 +120,85 @@ GEM representable (~> 3.0) retriable (>= 2.0, < 4.a) rexml - webrick - google-apis-iamcredentials_v1 (0.10.0) - google-apis-core (>= 0.4, < 2.a) - google-apis-playcustomapp_v1 (0.7.0) - google-apis-core (>= 0.4, < 2.a) - google-apis-storage_v1 (0.13.0) - google-apis-core (>= 0.4, < 2.a) - google-cloud-core (1.6.0) - google-cloud-env (~> 1.0) + google-apis-iamcredentials_v1 (0.17.0) + google-apis-core (>= 0.11.0, < 2.a) + google-apis-playcustomapp_v1 (0.13.0) + google-apis-core (>= 0.11.0, < 2.a) + google-apis-storage_v1 (0.31.0) + google-apis-core (>= 0.11.0, < 2.a) + google-cloud-core (1.7.0) + google-cloud-env (>= 1.0, < 3.a) google-cloud-errors (~> 1.0) google-cloud-env (1.6.0) faraday (>= 0.17.3, < 3.0) - google-cloud-errors (1.2.0) - google-cloud-storage (1.36.2) + google-cloud-errors (1.4.0) + google-cloud-storage (1.47.0) addressable (~> 2.8) digest-crc (~> 0.4) google-apis-iamcredentials_v1 (~> 0.1) - google-apis-storage_v1 (~> 0.1) + google-apis-storage_v1 (~> 0.31.0) google-cloud-core (~> 1.6) googleauth (>= 0.16.2, < 2.a) mini_mime (~> 1.0) - googleauth (1.1.3) + googleauth (1.8.1) faraday (>= 0.17.3, < 3.a) jwt (>= 1.4, < 3.0) - memoist (~> 0.16) multi_json (~> 1.11) os (>= 0.9, < 2.0) signet (>= 0.16, < 2.a) highline (2.0.3) - http-cookie (1.0.4) + http-cookie (1.0.5) domain_name (~> 0.5) httpclient (2.8.3) - jmespath (1.6.1) - json (2.6.1) - jwt (2.3.0) - memoist (0.16.2) - mini_magick (4.11.0) - mini_mime (1.1.2) + jmespath (1.6.2) + json (2.7.2) + jwt (2.8.1) + base64 + mini_magick (4.12.0) + mini_mime (1.1.5) multi_json (1.15.0) - multipart-post (2.0.0) + multipart-post (2.4.1) nanaimo (0.3.0) naturally (2.2.1) - optparse (0.1.1) + nkf (0.2.0) + optparse (0.5.0) os (1.1.4) - plist (3.6.0) - public_suffix (4.0.7) - rake (13.0.6) - representable (3.1.1) + plist (3.7.1) + public_suffix (5.0.5) + rake (13.2.1) + representable (3.2.0) declarative (< 0.1.0) trailblazer-option (>= 0.1.1, < 0.2.0) uber (< 0.2.0) retriable (3.1.2) - rexml (3.2.5) + rexml (3.2.6) rouge (2.0.7) ruby2_keywords (0.0.5) rubyzip (2.3.2) - security (0.1.3) - signet (0.16.1) + security (0.1.5) + signet (0.19.0) addressable (~> 2.8) - faraday (>= 0.17.5, < 3.0) + faraday (>= 0.17.5, < 3.a) jwt (>= 1.5, < 3.0) multi_json (~> 1.10) - simctl (1.6.8) + simctl (1.6.10) CFPropertyList naturally terminal-notifier (2.0.0) - terminal-table (1.8.0) - unicode-display_width (~> 1.1, >= 1.1.1) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) trailblazer-option (0.1.2) tty-cursor (0.7.1) - tty-screen (0.8.1) + tty-screen (0.8.2) tty-spinner (0.9.3) tty-cursor (~> 0.7) uber (0.1.0) - unf (0.1.4) - unf_ext - unf_ext (0.0.8.1) - unicode-display_width (1.8.0) - webrick (1.7.0) + unicode-display_width (2.5.0) word_wrap (1.0.0) - xcode-install (2.8.0) - claide (>= 0.9.1, < 1.1.0) + xcode-install (2.8.1) + claide (>= 0.9.1) fastlane (>= 2.1.0, < 3.0.0) - xcodeproj (1.21.0) + xcodeproj (1.24.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) diff --git a/MovieReleaseWidgetExtension/CountdownMinimalisticWidget/View/PosterWithDescriptionView.swift b/MovieReleaseWidgetExtension/CountdownMinimalisticWidget/View/PosterWithDescriptionView.swift index 96b54ea9..d4123b40 100644 --- a/MovieReleaseWidgetExtension/CountdownMinimalisticWidget/View/PosterWithDescriptionView.swift +++ b/MovieReleaseWidgetExtension/CountdownMinimalisticWidget/View/PosterWithDescriptionView.swift @@ -9,8 +9,6 @@ import SwiftUI import WidgetKit -// swiftlint:disable closure_body_length - struct PosterWithDescriptionView: View { let title: String let description: LocalizedStringKey diff --git a/MovieReleaseWidgetExtension/CountdownWidget/View/AlreadyReleasedView.swift b/MovieReleaseWidgetExtension/CountdownWidget/View/AlreadyReleasedView.swift index d803bf2c..fa96e6e4 100644 --- a/MovieReleaseWidgetExtension/CountdownWidget/View/AlreadyReleasedView.swift +++ b/MovieReleaseWidgetExtension/CountdownWidget/View/AlreadyReleasedView.swift @@ -9,8 +9,6 @@ import SwiftUI import WidgetKit -// swiftlint:disable closure_body_length multiline_arguments_brackets - private struct TextHeightPreference: PreferenceKey { static var defaultValue: CGFloat = 0 @@ -35,6 +33,7 @@ struct AlreadyReleasedView: View { } var body: some View { + // swiftlint:disable:next closure_body_length GeometryReader { proxy in ZStack(alignment: .bottom) { image diff --git a/MovieReleaseWidgetExtension/CountdownWidget/View/CountdownView.swift b/MovieReleaseWidgetExtension/CountdownWidget/View/CountdownView.swift index 651bf51a..8a92dacc 100644 --- a/MovieReleaseWidgetExtension/CountdownWidget/View/CountdownView.swift +++ b/MovieReleaseWidgetExtension/CountdownWidget/View/CountdownView.swift @@ -9,8 +9,6 @@ import SwiftUI import WidgetKit -// swiftlint:disable closure_body_length multiline_arguments_brackets - private struct TextHeightPreference: PreferenceKey { static var defaultValue: CGFloat = 0 @@ -35,7 +33,9 @@ struct CountdownView: SwiftUI.View { } var body: some SwiftUI.View { + // swiftlint:disable:next closure_body_length GeometryReader { proxy in + // swiftlint:disable:next closure_body_length ZStack(alignment: .bottom) { image .resizable() diff --git a/MovieReleaseWidgetExtension/Extensions/Movie+ImageLoading.swift b/MovieReleaseWidgetExtension/Extensions/Movie+ImageLoading.swift index fee84401..da19bc69 100644 --- a/MovieReleaseWidgetExtension/Extensions/Movie+ImageLoading.swift +++ b/MovieReleaseWidgetExtension/Extensions/Movie+ImageLoading.swift @@ -9,8 +9,6 @@ import SwiftUI import Kingfisher -// swiftlint:disable trailing_closure multiline_arguments_brackets - private let cache = AppGroup.imageCache extension Movie { @@ -31,18 +29,19 @@ extension Movie { } } } else { + // swiftlint:disable:next trailing_closure ImageDownloader.default.downloadImage( with: url, options: [.targetCache(cache)], completionHandler: { result in - switch result { case .success(let value): completion(Image(uiImage: value.image)) case .failure: completion(placeholder) } - }) + } + ) } } } diff --git a/MovieReleaseWidgetExtension/WidgetURL.swift b/MovieReleaseWidgetExtension/WidgetURL.swift index c17bca1d..7e229fae 100644 --- a/MovieReleaseWidgetExtension/WidgetURL.swift +++ b/MovieReleaseWidgetExtension/WidgetURL.swift @@ -9,7 +9,6 @@ import Foundation // swiftlint:disable force_unwrapping - enum WidgetURL { static func deepLink(for movieID: Int64) -> URL { URL(string: "widget-deeplink://\(movieID)")! @@ -17,3 +16,4 @@ enum WidgetURL { static let search = URL(string: "widget-deeplink://search")! } +// swiftlint:enable force_unwrapping diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 7f6c8af5..d6b49ba3 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -10,9 +10,9 @@ Scheme_UnitTests = 'UnitTests' Scheme_SnapshotTests = 'SnapshotTests' Scheme_UITests = 'UITests' -Test_Device = 'iPhone 8' +Test_Device = 'iPhone SE (3rd generation) (17.0)' Test_Devices = [ - 'iPhone SE (2nd generation)', + 'iPhone SE (3rd generation) (17.0', 'iPhone 8 Plus', 'iPhone 11 Pro', 'iPhone 11 Pro Max', diff --git a/update-dependencies.sh b/update-dependencies.sh index 816dc6f9..4eb88acd 100755 --- a/update-dependencies.sh +++ b/update-dependencies.sh @@ -2,7 +2,7 @@ update-license-plist() { if brew ls --versions "license-plist" >/dev/null; then - HOMEBREW_NO_AUTO_UPDATE=1 brew upgrade "license-plist" + HOMEBREW_NO_AUTO_UPDATE=1 brew upgrade licenseplist else echo "warning: LicensePlist not installed, download from https://github.com/mono0926/LicensePlist" exit -1 @@ -13,7 +13,7 @@ generate-new-license-plist() { if which license-plist >/dev/null; then license-plist \ --output-path Cineaste/Settings.bundle \ - --package-path Cineaste.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.swift \ + --package-path Cineaste.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved \ --prefix Acknowledgements \ --single-page \ --force