diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 50e497ca0..4066bea70 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -13,14 +13,14 @@ on: jobs: build_and_deploy: - runs-on: macos-11 + runs-on: macos-12 steps: - uses: maxim-lobanov/setup-xcode@v1.1 with: xcode-version: latest-stable - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: token: ${{ secrets.ACCESS_TOKEN }} fetch-depth: 0 diff --git a/.github/workflows/pull_requests.yml b/.github/workflows/pull_requests.yml index 99a79c42c..fa780dec1 100644 --- a/.github/workflows/pull_requests.yml +++ b/.github/workflows/pull_requests.yml @@ -6,17 +6,14 @@ on: jobs: build_and_test: - runs-on: macos-11 + runs-on: macos-12 if: ${{ github.event.pull_request.draft == false }} steps: - uses: maxim-lobanov/setup-xcode@v1.1 with: xcode-version: latest-stable - - uses: actions/checkout@v2 - with: - token: ${{ github.token }} - ref: ${{ github.event.pull_request.head.ref }} + - uses: actions/checkout@v3 - name: Cache BuildTools uses: actions/cache@v2 diff --git a/BuildTools/Package.resolved b/BuildTools/Package.resolved index 41281c440..f76cc5e96 100644 --- a/BuildTools/Package.resolved +++ b/BuildTools/Package.resolved @@ -6,8 +6,8 @@ "repositoryURL": "https://github.com/jpsim/SourceKitten.git", "state": { "branch": null, - "revision": "558628392eb31d37cb251cfe626c53eafd330df6", - "version": "0.31.1" + "revision": "817dfa6f2e09b0476f3a6c9dbc035991f02f0241", + "version": "0.32.0" } }, { @@ -19,13 +19,22 @@ "version": "1.0.3" } }, + { + "package": "SwiftSyntax", + "repositoryURL": "https://github.com/apple/swift-syntax.git", + "state": { + "branch": null, + "revision": "0b6c22b97f8e9320bca62e82cdbee601cf37ad3f", + "version": "0.50600.1" + } + }, { "package": "SwiftFormat", "repositoryURL": "https://github.com/nicklockwood/SwiftFormat", "state": { "branch": null, - "revision": "a07e7dca002072f1761bae8d5c53fa64462b2c2a", - "version": "0.49.5" + "revision": "21ccc092d6f645609e87ac92ae6f2ba63c9b1ccb", + "version": "0.49.10" } }, { @@ -33,8 +42,8 @@ "repositoryURL": "https://github.com/realm/SwiftLint", "state": { "branch": null, - "revision": "e8ef21fef61f12536964c4e3cf6d5a6e3ad81e49", - "version": "0.46.5" + "revision": "e497f1f5b161af96ba439049d21970c6204d06c6", + "version": "0.47.1" } }, { @@ -51,8 +60,8 @@ "repositoryURL": "https://github.com/drmohundro/SWXMLHash.git", "state": { "branch": null, - "revision": "9183170d20857753d4f331b0ca63f73c60764bf3", - "version": "5.0.2" + "revision": "6469881a3f30417c5bb02404ea4b69207f297592", + "version": "6.0.0" } }, { diff --git a/BuildTools/Package.swift b/BuildTools/Package.swift index ed5c80ca8..ef474b049 100644 --- a/BuildTools/Package.swift +++ b/BuildTools/Package.swift @@ -3,6 +3,7 @@ import PackageDescription let package = Package( name: "BuildTools", + platforms: [.macOS(.v10_12)], dependencies: [ // Define any tools you want available from your build phases // Here's an example with SwiftFormat diff --git a/Gemfile.lock b/Gemfile.lock index 5f6db42cb..1c3f3a595 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,20 +8,20 @@ GEM artifactory (3.0.15) atomos (0.1.3) aws-eventstream (1.2.0) - aws-partitions (1.559.0) - aws-sdk-core (3.127.0) + aws-partitions (1.600.0) + aws-sdk-core (3.131.2) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.525.0) aws-sigv4 (~> 1.1) - jmespath (~> 1.0) - aws-sdk-kms (1.55.0) + jmespath (~> 1, >= 1.6.1) + aws-sdk-kms (1.57.0) aws-sdk-core (~> 3, >= 3.127.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.113.0) + aws-sdk-s3 (1.114.0) aws-sdk-core (~> 3, >= 3.127.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.4) - aws-sigv4 (1.4.0) + aws-sigv4 (1.5.0) aws-eventstream (~> 1, >= 1.0.2) babosa (1.0.4) claide (1.1.0) @@ -36,7 +36,7 @@ GEM unf (>= 0.0.5, < 1.0.0) dotenv (2.7.6) emoji_regex (3.2.3) - excon (0.91.0) + excon (0.92.3) faraday (1.10.0) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) @@ -56,8 +56,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) @@ -66,7 +66,7 @@ GEM faraday_middleware (1.2.0) faraday (~> 1.0) fastimage (2.2.6) - fastlane (2.204.3) + fastlane (2.206.2) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.8, < 3.0.0) artifactory (~> 3.0) @@ -108,9 +108,9 @@ GEM fastlane-plugin-changelog (0.16.0) fastlane-plugin-versioning (0.5.0) gh_inspector (1.1.3) - google-apis-androidpublisher_v3 (0.16.0) - google-apis-core (>= 0.4, < 2.a) - google-apis-core (0.4.2) + google-apis-androidpublisher_v3 (0.22.0) + google-apis-core (>= 0.5, < 2.a) + google-apis-core (0.6.0) addressable (~> 2.5, >= 2.5.1) googleauth (>= 0.16.2, < 2.a) httpclient (>= 2.8.1, < 3.a) @@ -119,19 +119,19 @@ GEM 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.11.0) - google-apis-core (>= 0.4, < 2.a) + google-apis-iamcredentials_v1 (0.12.0) + google-apis-core (>= 0.6, < 2.a) + google-apis-playcustomapp_v1 (0.9.0) + google-apis-core (>= 0.6, < 2.a) + google-apis-storage_v1 (0.15.0) + google-apis-core (>= 0.5, < 2.a) google-cloud-core (1.6.0) google-cloud-env (~> 1.0) google-cloud-errors (~> 1.0) - google-cloud-env (1.5.0) - faraday (>= 0.17.3, < 2.0) + google-cloud-env (1.6.0) + faraday (>= 0.17.3, < 3.0) google-cloud-errors (1.2.0) - google-cloud-storage (1.36.1) + google-cloud-storage (1.36.2) addressable (~> 2.8) digest-crc (~> 0.4) google-apis-iamcredentials_v1 (~> 0.1) @@ -139,7 +139,7 @@ GEM google-cloud-core (~> 1.6) googleauth (>= 0.16.2, < 2.a) mini_mime (~> 1.0) - googleauth (1.1.2) + googleauth (1.1.3) faraday (>= 0.17.3, < 3.a) jwt (>= 1.4, < 3.0) memoist (~> 0.16) @@ -147,12 +147,12 @@ GEM 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.0) - json (2.6.1) - jwt (2.3.0) + jmespath (1.6.1) + json (2.6.2) + jwt (2.4.1) memoist (0.16.2) mini_magick (4.11.0) mini_mime (1.1.2) @@ -163,9 +163,9 @@ GEM optparse (0.1.1) os (1.1.4) plist (3.6.0) - public_suffix (4.0.6) + public_suffix (4.0.7) rake (13.0.6) - representable (3.1.1) + representable (3.2.0) declarative (< 0.1.0) trailblazer-option (>= 0.1.1, < 0.2.0) uber (< 0.2.0) @@ -194,7 +194,7 @@ GEM uber (0.1.0) unf (0.1.4) unf_ext - unf_ext (0.0.8) + unf_ext (0.0.8.2) unicode-display_width (1.8.0) webrick (1.7.0) word_wrap (1.0.0) diff --git a/openHAB.xcodeproj/project.pbxproj b/openHAB.xcodeproj/project.pbxproj index 35fbe38f3..5a3d7fe74 100644 --- a/openHAB.xcodeproj/project.pbxproj +++ b/openHAB.xcodeproj/project.pbxproj @@ -1189,17 +1189,17 @@ ); mainGroup = DFB2621E18830A3600D3244D; packageReferences = ( - 937E4480270B378F00A98C26 /* XCRemoteSwiftPackageReference "Fuzi.git" */, - 937E4483270B379900A98C26 /* XCRemoteSwiftPackageReference "DeviceKit.git" */, - 937E4486270B37A600A98C26 /* XCRemoteSwiftPackageReference "Kingfisher.git" */, - 93F8061927AE615D0035A6B0 /* XCRemoteSwiftPackageReference "Alamofire.git" */, - 93F8063027AE6B940035A6B0 /* XCRemoteSwiftPackageReference "AlamofireNetworkActivityIndicator.git" */, - 93F8063327AE6C620035A6B0 /* XCRemoteSwiftPackageReference "firebase-ios-sdk.git" */, - 93F8064527AE7A050035A6B0 /* XCRemoteSwiftPackageReference "SwiftMessages.git" */, - 93F8064827AE7A2E0035A6B0 /* XCRemoteSwiftPackageReference "FlexColorPicker.git" */, - 93F8064B27AE7A4D0035A6B0 /* XCRemoteSwiftPackageReference "DynamicButton.git" */, - 93F8064E27AE7A820035A6B0 /* XCRemoteSwiftPackageReference "SideMenu.git" */, - 93F8065127AE7B580035A6B0 /* XCRemoteSwiftPackageReference "SVGKit.git" */, + 937E4480270B378F00A98C26 /* XCRemoteSwiftPackageReference "Fuzi" */, + 937E4483270B379900A98C26 /* XCRemoteSwiftPackageReference "DeviceKit" */, + 937E4486270B37A600A98C26 /* XCRemoteSwiftPackageReference "Kingfisher" */, + 93F8061927AE615D0035A6B0 /* XCRemoteSwiftPackageReference "Alamofire" */, + 93F8063027AE6B940035A6B0 /* XCRemoteSwiftPackageReference "AlamofireNetworkActivityIndicator" */, + 93F8063327AE6C620035A6B0 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */, + 93F8064527AE7A050035A6B0 /* XCRemoteSwiftPackageReference "SwiftMessages" */, + 93F8064827AE7A2E0035A6B0 /* XCRemoteSwiftPackageReference "FlexColorPicker" */, + 93F8064B27AE7A4D0035A6B0 /* XCRemoteSwiftPackageReference "DynamicButton" */, + 93F8064E27AE7A820035A6B0 /* XCRemoteSwiftPackageReference "SideMenu" */, + 93F8065127AE7B580035A6B0 /* XCRemoteSwiftPackageReference "SVGKit" */, ); productRefGroup = DFB2622818830A3600D3244D /* Products */; projectDirPath = ""; @@ -1319,7 +1319,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd BuildTools\nSDKROOT=(xcrun --sdk macosx --show-sdk-path)\n\nswift run swiftformat --config \"$SRCROOT/BuildTools/.swiftformat\" --swiftversion \"5.5\" $SRCROOT\nswift run swiftlint --config $SRCROOT/BuildTools/.swiftlint.yml --path $SRCROOT\n"; + shellScript = "cd BuildTools\nSDKROOT=(xcrun --sdk macosx --show-sdk-path)\n\nswift run --configuration release swiftformat --config \"$SRCROOT/BuildTools/.swiftformat\" --swiftversion \"5.6\" $SRCROOT\nswift run --configuration release swiftlint --config $SRCROOT/BuildTools/.swiftlint.yml --path $SRCROOT\n"; }; /* End PBXShellScriptBuildPhase section */ @@ -2239,7 +2239,7 @@ /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ - 937E4480270B378F00A98C26 /* XCRemoteSwiftPackageReference "Fuzi.git" */ = { + 937E4480270B378F00A98C26 /* XCRemoteSwiftPackageReference "Fuzi" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/cezheng/Fuzi.git"; requirement = { @@ -2247,7 +2247,7 @@ minimumVersion = 3.0.0; }; }; - 937E4483270B379900A98C26 /* XCRemoteSwiftPackageReference "DeviceKit.git" */ = { + 937E4483270B379900A98C26 /* XCRemoteSwiftPackageReference "DeviceKit" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/devicekit/DeviceKit.git"; requirement = { @@ -2255,7 +2255,7 @@ minimumVersion = 4.0.0; }; }; - 937E4486270B37A600A98C26 /* XCRemoteSwiftPackageReference "Kingfisher.git" */ = { + 937E4486270B37A600A98C26 /* XCRemoteSwiftPackageReference "Kingfisher" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/onevcat/Kingfisher.git"; requirement = { @@ -2263,7 +2263,7 @@ minimumVersion = 7.0.0; }; }; - 93F8061927AE615D0035A6B0 /* XCRemoteSwiftPackageReference "Alamofire.git" */ = { + 93F8061927AE615D0035A6B0 /* XCRemoteSwiftPackageReference "Alamofire" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/Alamofire/Alamofire.git"; requirement = { @@ -2271,7 +2271,7 @@ version = 5.4.4; }; }; - 93F8063027AE6B940035A6B0 /* XCRemoteSwiftPackageReference "AlamofireNetworkActivityIndicator.git" */ = { + 93F8063027AE6B940035A6B0 /* XCRemoteSwiftPackageReference "AlamofireNetworkActivityIndicator" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/Alamofire/AlamofireNetworkActivityIndicator.git"; requirement = { @@ -2279,7 +2279,7 @@ minimumVersion = 3.0.0; }; }; - 93F8063327AE6C620035A6B0 /* XCRemoteSwiftPackageReference "firebase-ios-sdk.git" */ = { + 93F8063327AE6C620035A6B0 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/firebase/firebase-ios-sdk.git"; requirement = { @@ -2287,7 +2287,7 @@ minimumVersion = 8.0.0; }; }; - 93F8064527AE7A050035A6B0 /* XCRemoteSwiftPackageReference "SwiftMessages.git" */ = { + 93F8064527AE7A050035A6B0 /* XCRemoteSwiftPackageReference "SwiftMessages" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/SwiftKickMobile/SwiftMessages.git"; requirement = { @@ -2295,7 +2295,7 @@ minimumVersion = 9.0.0; }; }; - 93F8064827AE7A2E0035A6B0 /* XCRemoteSwiftPackageReference "FlexColorPicker.git" */ = { + 93F8064827AE7A2E0035A6B0 /* XCRemoteSwiftPackageReference "FlexColorPicker" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/RastislavMirek/FlexColorPicker.git"; requirement = { @@ -2303,7 +2303,7 @@ minimumVersion = 1.0.0; }; }; - 93F8064B27AE7A4D0035A6B0 /* XCRemoteSwiftPackageReference "DynamicButton.git" */ = { + 93F8064B27AE7A4D0035A6B0 /* XCRemoteSwiftPackageReference "DynamicButton" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/yannickl/DynamicButton.git"; requirement = { @@ -2311,7 +2311,7 @@ minimumVersion = 6.0.0; }; }; - 93F8064E27AE7A820035A6B0 /* XCRemoteSwiftPackageReference "SideMenu.git" */ = { + 93F8064E27AE7A820035A6B0 /* XCRemoteSwiftPackageReference "SideMenu" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/jonkykong/SideMenu.git"; requirement = { @@ -2319,7 +2319,7 @@ minimumVersion = 6.0.0; }; }; - 93F8065127AE7B580035A6B0 /* XCRemoteSwiftPackageReference "SVGKit.git" */ = { + 93F8065127AE7B580035A6B0 /* XCRemoteSwiftPackageReference "SVGKit" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/SVGKit/SVGKit.git"; requirement = { @@ -2340,37 +2340,37 @@ }; 937E4481270B378F00A98C26 /* Fuzi */ = { isa = XCSwiftPackageProductDependency; - package = 937E4480270B378F00A98C26 /* XCRemoteSwiftPackageReference "Fuzi.git" */; + package = 937E4480270B378F00A98C26 /* XCRemoteSwiftPackageReference "Fuzi" */; productName = Fuzi; }; 937E4484270B379900A98C26 /* DeviceKit */ = { isa = XCSwiftPackageProductDependency; - package = 937E4483270B379900A98C26 /* XCRemoteSwiftPackageReference "DeviceKit.git" */; + package = 937E4483270B379900A98C26 /* XCRemoteSwiftPackageReference "DeviceKit" */; productName = DeviceKit; }; 937E4487270B37A600A98C26 /* Kingfisher */ = { isa = XCSwiftPackageProductDependency; - package = 937E4486270B37A600A98C26 /* XCRemoteSwiftPackageReference "Kingfisher.git" */; + package = 937E4486270B37A600A98C26 /* XCRemoteSwiftPackageReference "Kingfisher" */; productName = Kingfisher; }; 937E448B270B37CA00A98C26 /* Kingfisher */ = { isa = XCSwiftPackageProductDependency; - package = 937E4486270B37A600A98C26 /* XCRemoteSwiftPackageReference "Kingfisher.git" */; + package = 937E4486270B37A600A98C26 /* XCRemoteSwiftPackageReference "Kingfisher" */; productName = Kingfisher; }; 937E448D270B37D200A98C26 /* DeviceKit */ = { isa = XCSwiftPackageProductDependency; - package = 937E4483270B379900A98C26 /* XCRemoteSwiftPackageReference "DeviceKit.git" */; + package = 937E4483270B379900A98C26 /* XCRemoteSwiftPackageReference "DeviceKit" */; productName = DeviceKit; }; 937E4491270B37FE00A98C26 /* Kingfisher */ = { isa = XCSwiftPackageProductDependency; - package = 937E4486270B37A600A98C26 /* XCRemoteSwiftPackageReference "Kingfisher.git" */; + package = 937E4486270B37A600A98C26 /* XCRemoteSwiftPackageReference "Kingfisher" */; productName = Kingfisher; }; 937E4493270B380500A98C26 /* Fuzi */ = { isa = XCSwiftPackageProductDependency; - package = 937E4480270B378F00A98C26 /* XCRemoteSwiftPackageReference "Fuzi.git" */; + package = 937E4480270B378F00A98C26 /* XCRemoteSwiftPackageReference "Fuzi" */; productName = Fuzi; }; 937E44E1270B393C00A98C26 /* OpenHABCore */ = { @@ -2379,47 +2379,47 @@ }; 93F8061A27AE615D0035A6B0 /* Alamofire */ = { isa = XCSwiftPackageProductDependency; - package = 93F8061927AE615D0035A6B0 /* XCRemoteSwiftPackageReference "Alamofire.git" */; + package = 93F8061927AE615D0035A6B0 /* XCRemoteSwiftPackageReference "Alamofire" */; productName = Alamofire; }; 93F8062E27AE63620035A6B0 /* Alamofire */ = { isa = XCSwiftPackageProductDependency; - package = 93F8061927AE615D0035A6B0 /* XCRemoteSwiftPackageReference "Alamofire.git" */; + package = 93F8061927AE615D0035A6B0 /* XCRemoteSwiftPackageReference "Alamofire" */; productName = Alamofire; }; 93F8063127AE6B940035A6B0 /* AlamofireNetworkActivityIndicator */ = { isa = XCSwiftPackageProductDependency; - package = 93F8063027AE6B940035A6B0 /* XCRemoteSwiftPackageReference "AlamofireNetworkActivityIndicator.git" */; + package = 93F8063027AE6B940035A6B0 /* XCRemoteSwiftPackageReference "AlamofireNetworkActivityIndicator" */; productName = AlamofireNetworkActivityIndicator; }; 93F8063427AE6C620035A6B0 /* FirebaseCrashlytics */ = { isa = XCSwiftPackageProductDependency; - package = 93F8063327AE6C620035A6B0 /* XCRemoteSwiftPackageReference "firebase-ios-sdk.git" */; + package = 93F8063327AE6C620035A6B0 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; productName = FirebaseCrashlytics; }; 93F8064627AE7A050035A6B0 /* SwiftMessages */ = { isa = XCSwiftPackageProductDependency; - package = 93F8064527AE7A050035A6B0 /* XCRemoteSwiftPackageReference "SwiftMessages.git" */; + package = 93F8064527AE7A050035A6B0 /* XCRemoteSwiftPackageReference "SwiftMessages" */; productName = SwiftMessages; }; 93F8064927AE7A2E0035A6B0 /* FlexColorPicker */ = { isa = XCSwiftPackageProductDependency; - package = 93F8064827AE7A2E0035A6B0 /* XCRemoteSwiftPackageReference "FlexColorPicker.git" */; + package = 93F8064827AE7A2E0035A6B0 /* XCRemoteSwiftPackageReference "FlexColorPicker" */; productName = FlexColorPicker; }; 93F8064C27AE7A4D0035A6B0 /* DynamicButton */ = { isa = XCSwiftPackageProductDependency; - package = 93F8064B27AE7A4D0035A6B0 /* XCRemoteSwiftPackageReference "DynamicButton.git" */; + package = 93F8064B27AE7A4D0035A6B0 /* XCRemoteSwiftPackageReference "DynamicButton" */; productName = DynamicButton; }; 93F8064F27AE7A830035A6B0 /* SideMenu */ = { isa = XCSwiftPackageProductDependency; - package = 93F8064E27AE7A820035A6B0 /* XCRemoteSwiftPackageReference "SideMenu.git" */; + package = 93F8064E27AE7A820035A6B0 /* XCRemoteSwiftPackageReference "SideMenu" */; productName = SideMenu; }; 93F8065227AE7B580035A6B0 /* SVGKit */ = { isa = XCSwiftPackageProductDependency; - package = 93F8065127AE7B580035A6B0 /* XCRemoteSwiftPackageReference "SVGKit.git" */; + package = 93F8065127AE7B580035A6B0 /* XCRemoteSwiftPackageReference "SVGKit" */; productName = SVGKit; }; /* End XCSwiftPackageProductDependency section */ diff --git a/openHAB/OpenHABViewController.swift b/openHAB/OpenHABViewController.swift index a9fae176c..0229bc52e 100644 --- a/openHAB/OpenHABViewController.swift +++ b/openHAB/OpenHABViewController.swift @@ -266,9 +266,7 @@ class OpenHABViewController: UIViewController { super.viewWillDisappear(animated) // workaround for #309 (see: https://stackoverflow.com/questions/46301813/broken-uisearchbar-animation-embedded-in-navigationitem) - if #available(iOS 13.0, *) { - // do nothing - } else { + if #unavailable(iOS 13.0) { if animated, !search.isActive, !search.isEditing, navigationController.map({ $0.viewControllers.last != self }) ?? false, let searchBarSuperview = search.searchBar.superview, let searchBarHeightConstraint = searchBarSuperview.constraints.first(where: {