diff --git a/.github/workflows/githubrelease.yml b/.github/workflows/githubrelease.yml index 853d5c1cc..08a63a024 100644 --- a/.github/workflows/githubrelease.yml +++ b/.github/workflows/githubrelease.yml @@ -5,7 +5,7 @@ on: jobs: set_github_release: - runs-on: macos-12 + runs-on: macos-13 steps: - name: checkout uses: actions/checkout@v3 diff --git a/.github/workflows/pull_requests.yml b/.github/workflows/pull_requests.yml index 574f67d9b..5ab4818bf 100644 --- a/.github/workflows/pull_requests.yml +++ b/.github/workflows/pull_requests.yml @@ -10,7 +10,7 @@ jobs: runs-on: macos-12 if: ${{ github.event.pull_request.draft == false }} steps: - - uses: maxim-lobanov/setup-xcode@v1.1 + - uses: maxim-lobanov/setup-xcode@v1.5.1 with: xcode-version: latest-stable @@ -25,7 +25,6 @@ jobs: LANG: en_US.UTF-8 LC_ALL: en_US.UTF-8 FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT: 60 - uses: maierj/fastlane-action@v2.0.1 + uses: maierj/fastlane-action@v2.3.0 with: lane: unittests - skip-tracking: true diff --git a/.swiftlint.yml b/.swiftlint.yml index 54404646e..d9cc6f35e 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -3,7 +3,6 @@ opt_in_rules: - empty_count - redundant_type_annotation - trailing_closure - - unused_import - implicit_return - multiline_function_chains - anyobject_protocol diff --git a/CHANGELOG.md b/CHANGELOG.md index e6578138b..28ed7ec96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +## [Version 2.4.58, Build 1580410536] - 2023-05-31Z + +- Implement forceAsItem support for Charts in Sitemaps +- Fixes #689 + ## [Version 2.4.53, Build 1580410519] - 2022-08-27Z - Fixes an incompatibility with openHAB 1.x systems diff --git a/Gemfile.lock b/Gemfile.lock index d894f1a49..36e0aeb3e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,7 +8,7 @@ GEM artifactory (3.0.15) atomos (0.1.3) aws-eventstream (1.2.0) - aws-partitions (1.659.0) + aws-partitions (1.660.0) aws-sdk-core (3.167.0) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.651.0) @@ -66,7 +66,7 @@ GEM faraday_middleware (1.2.0) faraday (~> 1.0) fastimage (2.2.6) - fastlane (2.210.1) + fastlane (2.211.0) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.8, < 3.0.0) artifactory (~> 3.0) @@ -219,4 +219,4 @@ DEPENDENCIES fastlane-plugin-versioning BUNDLED WITH - 2.3.24 + 2.3.11 diff --git a/OpenHABCore/Sources/OpenHABCore/Model/DataExtension.swift b/OpenHABCore/Sources/OpenHABCore/Model/DataExtension.swift index af1146d34..5e9c20c4e 100644 --- a/OpenHABCore/Sources/OpenHABCore/Model/DataExtension.swift +++ b/OpenHABCore/Sources/OpenHABCore/Model/DataExtension.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Sources/OpenHABCore/Model/DataObject.swift b/OpenHABCore/Sources/OpenHABCore/Model/DataObject.swift index 82e8bad8c..0ac36900f 100644 --- a/OpenHABCore/Sources/OpenHABCore/Model/DataObject.swift +++ b/OpenHABCore/Sources/OpenHABCore/Model/DataObject.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Sources/OpenHABCore/Model/NumberState.swift b/OpenHABCore/Sources/OpenHABCore/Model/NumberState.swift index c5aca256e..9b906cc28 100644 --- a/OpenHABCore/Sources/OpenHABCore/Model/NumberState.swift +++ b/OpenHABCore/Sources/OpenHABCore/Model/NumberState.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Sources/OpenHABCore/Model/OpenHABItem.swift b/OpenHABCore/Sources/OpenHABCore/Model/OpenHABItem.swift index 776dc1d74..3bdfd5b19 100644 --- a/OpenHABCore/Sources/OpenHABCore/Model/OpenHABItem.swift +++ b/OpenHABCore/Sources/OpenHABCore/Model/OpenHABItem.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Sources/OpenHABCore/Model/OpenHABLinkedPage.swift b/OpenHABCore/Sources/OpenHABCore/Model/OpenHABLinkedPage.swift index 84f6ba694..58ac1639c 100644 --- a/OpenHABCore/Sources/OpenHABCore/Model/OpenHABLinkedPage.swift +++ b/OpenHABCore/Sources/OpenHABCore/Model/OpenHABLinkedPage.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Sources/OpenHABCore/Model/OpenHABOptions.swift b/OpenHABCore/Sources/OpenHABCore/Model/OpenHABOptions.swift index 77d4be37d..5363ef993 100644 --- a/OpenHABCore/Sources/OpenHABCore/Model/OpenHABOptions.swift +++ b/OpenHABCore/Sources/OpenHABCore/Model/OpenHABOptions.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Sources/OpenHABCore/Model/OpenHABServerProperties.swift b/OpenHABCore/Sources/OpenHABCore/Model/OpenHABServerProperties.swift index bc6cb2bec..21830cb6c 100644 --- a/OpenHABCore/Sources/OpenHABCore/Model/OpenHABServerProperties.swift +++ b/OpenHABCore/Sources/OpenHABCore/Model/OpenHABServerProperties.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Sources/OpenHABCore/Model/OpenHABSitemap.swift b/OpenHABCore/Sources/OpenHABCore/Model/OpenHABSitemap.swift index e1681d6ef..05dfa09a5 100644 --- a/OpenHABCore/Sources/OpenHABCore/Model/OpenHABSitemap.swift +++ b/OpenHABCore/Sources/OpenHABCore/Model/OpenHABSitemap.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Sources/OpenHABCore/Model/OpenHABSitemapPage.swift b/OpenHABCore/Sources/OpenHABCore/Model/OpenHABSitemapPage.swift index f205b8797..f0760b2a6 100644 --- a/OpenHABCore/Sources/OpenHABCore/Model/OpenHABSitemapPage.swift +++ b/OpenHABCore/Sources/OpenHABCore/Model/OpenHABSitemapPage.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Sources/OpenHABCore/Model/OpenHABStateDescription.swift b/OpenHABCore/Sources/OpenHABCore/Model/OpenHABStateDescription.swift index ec2fbabad..ade7b2210 100644 --- a/OpenHABCore/Sources/OpenHABCore/Model/OpenHABStateDescription.swift +++ b/OpenHABCore/Sources/OpenHABCore/Model/OpenHABStateDescription.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Sources/OpenHABCore/Model/OpenHABUiTile.swift b/OpenHABCore/Sources/OpenHABCore/Model/OpenHABUiTile.swift index 4a04c4b4c..3e602a331 100644 --- a/OpenHABCore/Sources/OpenHABCore/Model/OpenHABUiTile.swift +++ b/OpenHABCore/Sources/OpenHABCore/Model/OpenHABUiTile.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Sources/OpenHABCore/Model/OpenHABWidget.swift b/OpenHABCore/Sources/OpenHABCore/Model/OpenHABWidget.swift index aedc37403..86971fb8e 100644 --- a/OpenHABCore/Sources/OpenHABCore/Model/OpenHABWidget.swift +++ b/OpenHABCore/Sources/OpenHABCore/Model/OpenHABWidget.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. @@ -91,6 +91,7 @@ public class OpenHABWidget: NSObject, MKAnnotation, Identifiable { public var text = "" public var legend: Bool? public var encoding = "" + public var forceAsItem: Bool? public var item: OpenHABItem? public var linkedPage: OpenHABLinkedPage? public var mappings: [OpenHABWidgetMapping] = [] @@ -108,7 +109,7 @@ public class OpenHABWidget: NSObject, MKAnnotation, Identifiable { // Text between square brackets public var labelValue: String? { // Swift 5 raw strings - let regex = try? NSRegularExpression(pattern: #"\[(.*?)\]"#, options: []) + let regex = try? NSRegularExpression(pattern: #"\[(.*?)\]"#, options: [.dotMatchesLineSeparators]) guard let match = regex?.firstMatch(in: label, options: [], range: NSRange(location: 0, length: (label as NSString).length)) else { return nil } guard let range = Range(match.range(at: 1), in: label) else { return nil } return String(label[range]) @@ -212,7 +213,7 @@ extension OpenHABWidget.WidgetType: UnknownCaseRepresentable { extension OpenHABWidget { // This is an ugly initializer - convenience init(widgetId: String, label: String, icon: String, type: WidgetType, url: String?, period: String?, minValue: Double?, maxValue: Double?, step: Double?, refresh: Int?, height: Double?, isLeaf: Bool?, iconColor: String?, labelColor: String?, valueColor: String?, service: String?, state: String?, text: String?, legend: Bool?, encoding: String?, item: OpenHABItem?, linkedPage: OpenHABLinkedPage?, mappings: [OpenHABWidgetMapping], widgets: [OpenHABWidget], visibility: Bool?, switchSupport: Bool?) { + convenience init(widgetId: String, label: String, icon: String, type: WidgetType, url: String?, period: String?, minValue: Double?, maxValue: Double?, step: Double?, refresh: Int?, height: Double?, isLeaf: Bool?, iconColor: String?, labelColor: String?, valueColor: String?, service: String?, state: String?, text: String?, legend: Bool?, encoding: String?, item: OpenHABItem?, linkedPage: OpenHABLinkedPage?, mappings: [OpenHABWidgetMapping], widgets: [OpenHABWidget], visibility: Bool?, switchSupport: Bool?, forceAsItem: Bool?) { self.init() id = widgetId self.widgetId = widgetId @@ -250,6 +251,8 @@ extension OpenHABWidget { self.step = abs(self.step) self.visibility = visibility ?? true self.switchSupport = switchSupport ?? false + + self.forceAsItem = forceAsItem } convenience init(xml xmlElement: XMLElement) { @@ -322,6 +325,7 @@ public extension OpenHABWidget { let widgets: [OpenHABWidget.CodingData] let visibility: Bool? let switchSupport: Bool? + let forceAsItem: Bool? } } @@ -329,7 +333,7 @@ public extension OpenHABWidget { extension OpenHABWidget.CodingData { var openHABWidget: OpenHABWidget { let mappedWidgets = widgets.map(\.openHABWidget) - return OpenHABWidget(widgetId: widgetId, label: label, icon: icon, type: type, url: url, period: period, minValue: minValue, maxValue: maxValue, step: step, refresh: refresh, height: height, isLeaf: isLeaf, iconColor: iconColor, labelColor: labelcolor, valueColor: valuecolor, service: service, state: state, text: text, legend: legend, encoding: encoding, item: item?.openHABItem, linkedPage: linkedPage, mappings: mappings, widgets: mappedWidgets, visibility: visibility, switchSupport: switchSupport) + return OpenHABWidget(widgetId: widgetId, label: label, icon: icon, type: type, url: url, period: period, minValue: minValue, maxValue: maxValue, step: step, refresh: refresh, height: height, isLeaf: isLeaf, iconColor: iconColor, labelColor: labelcolor, valueColor: valuecolor, service: service, state: state, text: text, legend: legend, encoding: encoding, item: item?.openHABItem, linkedPage: linkedPage, mappings: mappings, widgets: mappedWidgets, visibility: visibility, switchSupport: switchSupport, forceAsItem: forceAsItem) } } diff --git a/OpenHABCore/Sources/OpenHABCore/Model/OpenHABWidgetMapping.swift b/OpenHABCore/Sources/OpenHABCore/Model/OpenHABWidgetMapping.swift index 6b2199716..373014c09 100644 --- a/OpenHABCore/Sources/OpenHABCore/Model/OpenHABWidgetMapping.swift +++ b/OpenHABCore/Sources/OpenHABCore/Model/OpenHABWidgetMapping.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Sources/OpenHABCore/Model/Sequence+KeyPath.swift b/OpenHABCore/Sources/OpenHABCore/Model/Sequence+KeyPath.swift index 4064413c6..a2d24ed34 100644 --- a/OpenHABCore/Sources/OpenHABCore/Model/Sequence+KeyPath.swift +++ b/OpenHABCore/Sources/OpenHABCore/Model/Sequence+KeyPath.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Sources/OpenHABCore/Util/ClientCertificateManager.swift b/OpenHABCore/Sources/OpenHABCore/Util/ClientCertificateManager.swift index 9dedf6e5e..78dd94dd1 100644 --- a/OpenHABCore/Sources/OpenHABCore/Util/ClientCertificateManager.swift +++ b/OpenHABCore/Sources/OpenHABCore/Util/ClientCertificateManager.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Sources/OpenHABCore/Util/Collection+SafeAccess.swift b/OpenHABCore/Sources/OpenHABCore/Util/Collection+SafeAccess.swift index 19fa2f0f6..8e29a4e9d 100644 --- a/OpenHABCore/Sources/OpenHABCore/Util/Collection+SafeAccess.swift +++ b/OpenHABCore/Sources/OpenHABCore/Util/Collection+SafeAccess.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Sources/OpenHABCore/Util/DateFormatterExtension.swift b/OpenHABCore/Sources/OpenHABCore/Util/DateFormatterExtension.swift index 89d24e1b7..57005ac18 100644 --- a/OpenHABCore/Sources/OpenHABCore/Util/DateFormatterExtension.swift +++ b/OpenHABCore/Sources/OpenHABCore/Util/DateFormatterExtension.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Sources/OpenHABCore/Util/DoubleExtension.swift b/OpenHABCore/Sources/OpenHABCore/Util/DoubleExtension.swift index 1850086ab..7cbee9994 100644 --- a/OpenHABCore/Sources/OpenHABCore/Util/DoubleExtension.swift +++ b/OpenHABCore/Sources/OpenHABCore/Util/DoubleExtension.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Sources/OpenHABCore/Util/Endpoint.swift b/OpenHABCore/Sources/OpenHABCore/Util/Endpoint.swift index 2f80ad0d8..29fb5fe39 100644 --- a/OpenHABCore/Sources/OpenHABCore/Util/Endpoint.swift +++ b/OpenHABCore/Sources/OpenHABCore/Util/Endpoint.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. @@ -114,7 +114,7 @@ public extension Endpoint { } // swiftlint:disable:next function_parameter_count - static func chart(rootUrl: String, period: String?, type: OpenHABItem.ItemType?, service: String?, name: String?, legend: Bool?, theme: ChartStyle = .light) -> Endpoint { + static func chart(rootUrl: String, period: String?, type: OpenHABItem.ItemType?, service: String?, name: String?, legend: Bool?, theme: ChartStyle = .light, forceAsItem: Bool?) -> Endpoint { let random = Int.random(in: 0 ..< 1000) var endpoint = Endpoint( baseURL: rootUrl, @@ -125,7 +125,9 @@ public extension Endpoint { ] ) - if type == .group { + let forceAsItem = forceAsItem ?? false + + if type == .group, !forceAsItem { endpoint.queryItems.append(URLQueryItem(name: "groups", value: name)) } else { endpoint.queryItems.append(URLQueryItem(name: "items", value: name)) diff --git a/OpenHABCore/Sources/OpenHABCore/Util/Equatable.swift b/OpenHABCore/Sources/OpenHABCore/Util/Equatable.swift index d1a8ebe5e..f67477fe5 100644 --- a/OpenHABCore/Sources/OpenHABCore/Util/Equatable.swift +++ b/OpenHABCore/Sources/OpenHABCore/Util/Equatable.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Sources/OpenHABCore/Util/Future.swift b/OpenHABCore/Sources/OpenHABCore/Util/Future.swift index b99c4c3d8..77a0080b2 100644 --- a/OpenHABCore/Sources/OpenHABCore/Util/Future.swift +++ b/OpenHABCore/Sources/OpenHABCore/Util/Future.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Sources/OpenHABCore/Util/KeyedDecodingContainerProtocolExtension.swift b/OpenHABCore/Sources/OpenHABCore/Util/KeyedDecodingContainerProtocolExtension.swift index 9ef78d856..151a4e446 100644 --- a/OpenHABCore/Sources/OpenHABCore/Util/KeyedDecodingContainerProtocolExtension.swift +++ b/OpenHABCore/Sources/OpenHABCore/Util/KeyedDecodingContainerProtocolExtension.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Sources/OpenHABCore/Util/NetworkConnection.swift b/OpenHABCore/Sources/OpenHABCore/Util/NetworkConnection.swift index c29f0cb51..573b8f6f3 100644 --- a/OpenHABCore/Sources/OpenHABCore/Util/NetworkConnection.swift +++ b/OpenHABCore/Sources/OpenHABCore/Util/NetworkConnection.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Sources/OpenHABCore/Util/OSLogExtension.swift b/OpenHABCore/Sources/OpenHABCore/Util/OSLogExtension.swift index 39b12173d..da121d43e 100644 --- a/OpenHABCore/Sources/OpenHABCore/Util/OSLogExtension.swift +++ b/OpenHABCore/Sources/OpenHABCore/Util/OSLogExtension.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Sources/OpenHABCore/Util/OpenHABAccessTokenAdapter.swift b/OpenHABCore/Sources/OpenHABCore/Util/OpenHABAccessTokenAdapter.swift index a7ae4d036..5b6b35231 100644 --- a/OpenHABCore/Sources/OpenHABCore/Util/OpenHABAccessTokenAdapter.swift +++ b/OpenHABCore/Sources/OpenHABCore/Util/OpenHABAccessTokenAdapter.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Sources/OpenHABCore/Util/OpenHABItemCache.swift b/OpenHABCore/Sources/OpenHABCore/Util/OpenHABItemCache.swift index 3792407ad..92aa6085d 100644 --- a/OpenHABCore/Sources/OpenHABCore/Util/OpenHABItemCache.swift +++ b/OpenHABCore/Sources/OpenHABCore/Util/OpenHABItemCache.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Sources/OpenHABCore/Util/OpenHABLogger.swift b/OpenHABCore/Sources/OpenHABCore/Util/OpenHABLogger.swift index bccb31f09..a78cd4148 100644 --- a/OpenHABCore/Sources/OpenHABCore/Util/OpenHABLogger.swift +++ b/OpenHABCore/Sources/OpenHABCore/Util/OpenHABLogger.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Sources/OpenHABCore/Util/OpenHABSessionDelegate.swift b/OpenHABCore/Sources/OpenHABCore/Util/OpenHABSessionDelegate.swift index b933f3d27..48b26251a 100644 --- a/OpenHABCore/Sources/OpenHABCore/Util/OpenHABSessionDelegate.swift +++ b/OpenHABCore/Sources/OpenHABCore/Util/OpenHABSessionDelegate.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. @@ -16,6 +16,7 @@ import Foundation // The alternative method is explained by jshier in https://github.com/Alamofire/Alamofire/issues/2886#issuecomment-517951747 class OpenHABSessionDelegate: SessionDelegate { + // swiftlint:disable:next large_tuple typealias ChallengeEvaluation = (disposition: URLSession.AuthChallengeDisposition, credential: URLCredential?, error: AFError?) var eventMonitor: EventMonitor? diff --git a/OpenHABCore/Sources/OpenHABCore/Util/Preferences.swift b/OpenHABCore/Sources/OpenHABCore/Util/Preferences.swift index a59e2a33b..b73d4773a 100644 --- a/OpenHABCore/Sources/OpenHABCore/Util/Preferences.swift +++ b/OpenHABCore/Sources/OpenHABCore/Util/Preferences.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. @@ -91,6 +91,7 @@ public enum Preferences { @UserDefault("sendCrashReports", defaultValue: false) public static var sendCrashReports: Bool @UserDefault("sortSitemapsBy", defaultValue: 0) public static var sortSitemapsby: Int @UserDefault("defaultMainUIPath", defaultValue: "") public static var defaultMainUIPath: String + @UserDefault("alwaysAllowWebRTC", defaultValue: false) public static var alwaysAllowWebRTC: Bool // MARK: - Private diff --git a/OpenHABCore/Sources/OpenHABCore/Util/ServerCertificateManager.swift b/OpenHABCore/Sources/OpenHABCore/Util/ServerCertificateManager.swift index 7b36f431a..a9aac69ed 100644 --- a/OpenHABCore/Sources/OpenHABCore/Util/ServerCertificateManager.swift +++ b/OpenHABCore/Sources/OpenHABCore/Util/ServerCertificateManager.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Sources/OpenHABCore/Util/StringExtension.swift b/OpenHABCore/Sources/OpenHABCore/Util/StringExtension.swift index b201b7493..cc8808b75 100644 --- a/OpenHABCore/Sources/OpenHABCore/Util/StringExtension.swift +++ b/OpenHABCore/Sources/OpenHABCore/Util/StringExtension.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Sources/OpenHABCore/Util/UIColorExtension.swift b/OpenHABCore/Sources/OpenHABCore/Util/UIColorExtension.swift index f319a4139..bd9d6ceb0 100644 --- a/OpenHABCore/Sources/OpenHABCore/Util/UIColorExtension.swift +++ b/OpenHABCore/Sources/OpenHABCore/Util/UIColorExtension.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Sources/OpenHABCore/Util/UnknownCaseRepresentable.swift b/OpenHABCore/Sources/OpenHABCore/Util/UnknownCaseRepresentable.swift index c24cf6957..281460ee3 100644 --- a/OpenHABCore/Sources/OpenHABCore/Util/UnknownCaseRepresentable.swift +++ b/OpenHABCore/Sources/OpenHABCore/Util/UnknownCaseRepresentable.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Tests/OpenHABCoreTests/ItemCacheTests.swift b/OpenHABCore/Tests/OpenHABCoreTests/ItemCacheTests.swift index 6d7505b2b..6a3b8f3d4 100644 --- a/OpenHABCore/Tests/OpenHABCoreTests/ItemCacheTests.swift +++ b/OpenHABCore/Tests/OpenHABCoreTests/ItemCacheTests.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Tests/OpenHABCoreTests/JSONData.swift b/OpenHABCore/Tests/OpenHABCoreTests/JSONData.swift index ed4398399..5cee6a181 100644 --- a/OpenHABCore/Tests/OpenHABCoreTests/JSONData.swift +++ b/OpenHABCore/Tests/OpenHABCoreTests/JSONData.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Tests/OpenHABCoreTests/JSONParserTests.swift b/OpenHABCore/Tests/OpenHABCoreTests/JSONParserTests.swift index 0534ad264..a52f5bf55 100644 --- a/OpenHABCore/Tests/OpenHABCoreTests/JSONParserTests.swift +++ b/OpenHABCore/Tests/OpenHABCoreTests/JSONParserTests.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Tests/OpenHABCoreTests/MockURLProtocol.swift b/OpenHABCore/Tests/OpenHABCoreTests/MockURLProtocol.swift index 3e611f809..652510ad2 100644 --- a/OpenHABCore/Tests/OpenHABCoreTests/MockURLProtocol.swift +++ b/OpenHABCore/Tests/OpenHABCoreTests/MockURLProtocol.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Tests/OpenHABCoreTests/NumberStateTests.swift b/OpenHABCore/Tests/OpenHABCoreTests/NumberStateTests.swift index 6e4d29349..cd44a8ca9 100644 --- a/OpenHABCore/Tests/OpenHABCoreTests/NumberStateTests.swift +++ b/OpenHABCore/Tests/OpenHABCoreTests/NumberStateTests.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Tests/OpenHABCoreTests/OpenHABCoreGeneralTests.swift b/OpenHABCore/Tests/OpenHABCoreTests/OpenHABCoreGeneralTests.swift index e5ec2f983..5b80d3f04 100644 --- a/OpenHABCore/Tests/OpenHABCoreTests/OpenHABCoreGeneralTests.swift +++ b/OpenHABCore/Tests/OpenHABCoreTests/OpenHABCoreGeneralTests.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Tests/OpenHABCoreTests/ParseAsTests.swift b/OpenHABCore/Tests/OpenHABCoreTests/ParseAsTests.swift index f9e250945..240c667b1 100644 --- a/OpenHABCore/Tests/OpenHABCoreTests/ParseAsTests.swift +++ b/OpenHABCore/Tests/OpenHABCoreTests/ParseAsTests.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Tests/OpenHABCoreTests/RESTAPITests.swift b/OpenHABCore/Tests/OpenHABCoreTests/RESTAPITests.swift index 97a69c568..0374856ae 100644 --- a/OpenHABCore/Tests/OpenHABCoreTests/RESTAPITests.swift +++ b/OpenHABCore/Tests/OpenHABCoreTests/RESTAPITests.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Tests/OpenHABCoreTests/UserDefaultsTests.swift b/OpenHABCore/Tests/OpenHABCoreTests/UserDefaultsTests.swift index a71d815b8..9e290c514 100644 --- a/OpenHABCore/Tests/OpenHABCoreTests/UserDefaultsTests.swift +++ b/OpenHABCore/Tests/OpenHABCoreTests/UserDefaultsTests.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Tests/OpenHABCoreTests/XMLData.swift b/OpenHABCore/Tests/OpenHABCoreTests/XMLData.swift index 30750f53b..9dfc29031 100644 --- a/OpenHABCore/Tests/OpenHABCoreTests/XMLData.swift +++ b/OpenHABCore/Tests/OpenHABCoreTests/XMLData.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/OpenHABCore/Tests/OpenHABCoreTests/XMLParserTests.swift b/OpenHABCore/Tests/OpenHABCoreTests/XMLParserTests.swift index 7aefa1910..711411413 100644 --- a/OpenHABCore/Tests/OpenHABCoreTests/XMLParserTests.swift +++ b/OpenHABCore/Tests/OpenHABCoreTests/XMLParserTests.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/README.md b/README.md index 1fe7c5aef..fcaa4b58c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@

Bountysource
- Logo + Logo
openHAB client for iOS

diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 120fce128..d44df67b3 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -57,7 +57,7 @@ platform :ios do scheme: 'openHABTestsSwift', xcargs: '-skipPackagePluginValidation', testplan: 'openHABTests', - devices: ['iPhone 13 Pro'], + devices: ['iPhone 14 Pro'], clean: true ) end @@ -176,7 +176,7 @@ platform :ios do ) push_to_git_remote(tags: true) sh 'git checkout develop' - + if is_ci? set_github_release( api_bearer: ENV['FASTLANE_GITHUB_RELEASE_API_BEARER'], @@ -187,7 +187,7 @@ platform :ios do commitish: 'main' # upload_assets: no assets supported ) - else + else set_github_release( api_token: ENV['GITHUB_API_TOKEN'], repository_name: 'openhab/openhab-ios', @@ -198,7 +198,7 @@ platform :ios do # upload_assets: no assets supported ) end - + end end diff --git a/fastlane/SnapshotHelper.swift b/fastlane/SnapshotHelper.swift index 40ec58f99..e97caeeee 100644 --- a/fastlane/SnapshotHelper.swift +++ b/fastlane/SnapshotHelper.swift @@ -1,14 +1,3 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project -// -// See the NOTICE file(s) distributed with this work for additional -// information. -// -// This program and the accompanying materials are made available under the -// terms of the Eclipse Public License 2.0 which is available at -// http://www.eclipse.org/legal/epl-2.0 -// -// SPDX-License-Identifier: EPL-2.0 - // ----------------------------------------------------- // IMPORTANT: When modifying this file, make sure to // increment the version number at the very diff --git a/openHAB.xcodeproj/project.pbxproj b/openHAB.xcodeproj/project.pbxproj index b0af4a9de..3fe6531cd 100644 --- a/openHAB.xcodeproj/project.pbxproj +++ b/openHAB.xcodeproj/project.pbxproj @@ -1517,7 +1517,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1580410532; + CURRENT_PROJECT_VERSION = 1580410536; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = PBAPXHRAM9; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -1531,7 +1531,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 2.4.57; + MARKETING_VERSION = 2.4.58; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = es.spaphone.openhab.openHABIntents; @@ -1560,7 +1560,7 @@ CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1580410532; + CURRENT_PROJECT_VERSION = 1580410536; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = PBAPXHRAM9; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -1573,7 +1573,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 2.4.57; + MARKETING_VERSION = 2.4.58; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = es.spaphone.openhab.openHABIntents; @@ -1618,6 +1618,7 @@ CURRENT_PROJECT_VERSION = 1580410529; CURRENT_PROJECT_VERSION = 1580410531; CURRENT_PROJECT_VERSION = 1580410532; + CURRENT_PROJECT_VERSION = 1580410536; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = PBAPXHRAM9; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -1646,6 +1647,7 @@ MARKETING_VERSION = 2.4.55; MARKETING_VERSION = 2.4.56; MARKETING_VERSION = 2.4.57; + MARKETING_VERSION = 2.4.58; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = es.spaphone.openHABUITests; @@ -1694,6 +1696,7 @@ CURRENT_PROJECT_VERSION = 1580410529; CURRENT_PROJECT_VERSION = 1580410531; CURRENT_PROJECT_VERSION = 1580410532; + CURRENT_PROJECT_VERSION = 1580410536; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = PBAPXHRAM9; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -1722,6 +1725,7 @@ MARKETING_VERSION = 2.4.55; MARKETING_VERSION = 2.4.56; MARKETING_VERSION = 2.4.57; + MARKETING_VERSION = 2.4.58; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = es.spaphone.openHABUITests; @@ -1988,7 +1992,7 @@ CURRENT_PROJECT_VERSION = 1580410446; CURRENT_PROJECT_VERSION = 1580410455; "CODE_SIGN_STYLE[sdk=*]" = Automatic; - CURRENT_PROJECT_VERSION = 1580410532; + CURRENT_PROJECT_VERSION = 1580410536; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = PBAPXHRAM9; GCC_C_LANGUAGE_STANDARD = "compiler-default"; @@ -2001,7 +2005,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 2.4.57; + MARKETING_VERSION = 2.4.58; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = es.spaphone.openhab.watchkitapp; @@ -2053,6 +2057,7 @@ CURRENT_PROJECT_VERSION = 1580410529; CURRENT_PROJECT_VERSION = 1580410531; CURRENT_PROJECT_VERSION = 1580410532; + CURRENT_PROJECT_VERSION = 1580410536; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = PBAPXHRAM9; GCC_C_LANGUAGE_STANDARD = "compiler-default"; @@ -2065,7 +2070,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 2.4.57; + MARKETING_VERSION = 2.4.58; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = es.spaphone.openhab.watchkitapp; @@ -2257,6 +2262,7 @@ CURRENT_PROJECT_VERSION = 1580410529; CURRENT_PROJECT_VERSION = 1580410531; CURRENT_PROJECT_VERSION = 1580410532; + CURRENT_PROJECT_VERSION = 1580410536; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = PBAPXHRAM9; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -2285,6 +2291,7 @@ MARKETING_VERSION = 2.4.55; MARKETING_VERSION = 2.4.56; MARKETING_VERSION = 2.4.57; + MARKETING_VERSION = 2.4.58; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = "com.reg-labs.openHABTestsSwift"; @@ -2334,6 +2341,7 @@ CURRENT_PROJECT_VERSION = 1580410529; CURRENT_PROJECT_VERSION = 1580410531; CURRENT_PROJECT_VERSION = 1580410532; + CURRENT_PROJECT_VERSION = 1580410536; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = PBAPXHRAM9; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -2362,6 +2370,7 @@ MARKETING_VERSION = 2.4.55; MARKETING_VERSION = 2.4.56; MARKETING_VERSION = 2.4.57; + MARKETING_VERSION = 2.4.58; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = "com.reg-labs.openHABTestsSwift"; @@ -2522,6 +2531,7 @@ CURRENT_PROJECT_VERSION = 1580410529; CURRENT_PROJECT_VERSION = 1580410531; CURRENT_PROJECT_VERSION = 1580410532; + CURRENT_PROJECT_VERSION = 1580410536; DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = PBAPXHRAM9; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -2555,6 +2565,7 @@ MARKETING_VERSION = 2.4.55; MARKETING_VERSION = 2.4.56; MARKETING_VERSION = 2.4.57; + MARKETING_VERSION = 2.4.58; OTHER_SWIFT_FLAGS = "$(inherited) -DDEBUG -Xfrontend -warn-long-expression-type-checking=200 -Xfrontend -warn-long-function-bodies=200"; PRODUCT_BUNDLE_IDENTIFIER = es.spaphone.openhab; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -2588,7 +2599,7 @@ CODE_SIGN_IDENTITY = "Apple Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1580410532; + CURRENT_PROJECT_VERSION = 1580410536; DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = PBAPXHRAM9; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -2622,6 +2633,7 @@ MARKETING_VERSION = 2.4.55; MARKETING_VERSION = 2.4.56; MARKETING_VERSION = 2.4.57; + MARKETING_VERSION = 2.4.58; PRODUCT_BUNDLE_IDENTIFIER = es.spaphone.openhab; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; @@ -2710,8 +2722,8 @@ isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/weakfl/SwiftLintPlugin.git"; requirement = { - branch = main; - kind = branch; + kind = upToNextMajorVersion; + minimumVersion = 0.50.3; }; }; 937E4480270B378F00A98C26 /* XCRemoteSwiftPackageReference "Fuzi.git" */ = { diff --git a/openHAB.xcworkspace/xcshareddata/swiftpm/Package.resolved b/openHAB.xcworkspace/xcshareddata/swiftpm/Package.resolved index 6b34bcbf6..d6c4f01a7 100644 --- a/openHAB.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/openHAB.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -213,17 +213,17 @@ "repositoryURL": "https://github.com/weakfl/SwiftFormatPlugin.git", "state": { "branch": null, - "revision": "503a58bf51ee8b40cb53a83a84b13f3daf43ff42", - "version": "0.50.3" + "revision": "749f67e06cddc05bfbff8e1b1a17f2c4c8e150eb", + "version": "0.50.7" } }, { "package": "SwiftLintPlugin", "repositoryURL": "https://github.com/weakfl/SwiftLintPlugin.git", "state": { - "branch": "main", - "revision": "efa3f94160b65329b2a2596033e05cfe66286a23", - "version": null + "branch": null, + "revision": "8cbc2433be11093a4c9c243eafc101cb5ada820b", + "version": "0.50.3" } }, { diff --git a/openHAB/AppDelegate.swift b/openHAB/AppDelegate.swift index 3794c8527..d17d186a5 100644 --- a/openHAB/AppDelegate.swift +++ b/openHAB/AppDelegate.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/openHAB/ColorPickerUITableViewCell.swift b/openHAB/ColorPickerUITableViewCell.swift index c5996a3fd..7b7433b2c 100644 --- a/openHAB/ColorPickerUITableViewCell.swift +++ b/openHAB/ColorPickerUITableViewCell.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/openHAB/ColorPickerViewController.swift b/openHAB/ColorPickerViewController.swift index b315438ec..a5cdbc22b 100644 --- a/openHAB/ColorPickerViewController.swift +++ b/openHAB/ColorPickerViewController.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. @@ -62,6 +62,7 @@ class ColorPickerViewController: DefaultColorPickerViewController { } func sendColorUpdate(color: UIColor) { + // swiftlint:disable:next large_tuple var (hue, saturation, brightness, alpha): (CGFloat, CGFloat, CGFloat, CGFloat) = (0.0, 0.0, 0.0, 0.0) color.getHue(&hue, saturation: &saturation, brightness: &brightness, alpha: &alpha) diff --git a/openHAB/DrawerUITableViewCell.swift b/openHAB/DrawerUITableViewCell.swift index 0b4cffc13..2ebb6a2f8 100644 --- a/openHAB/DrawerUITableViewCell.swift +++ b/openHAB/DrawerUITableViewCell.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/openHAB/DynamicButtonStyleBell.swift b/openHAB/DynamicButtonStyleBell.swift index 84188fed7..f7571722e 100644 --- a/openHAB/DynamicButtonStyleBell.swift +++ b/openHAB/DynamicButtonStyleBell.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/openHAB/DynamicButtonStyleGear.swift b/openHAB/DynamicButtonStyleGear.swift index 33f218fd3..5610aa135 100644 --- a/openHAB/DynamicButtonStyleGear.swift +++ b/openHAB/DynamicButtonStyleGear.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/openHAB/FrameUITableViewCell.swift b/openHAB/FrameUITableViewCell.swift index 0ce64315d..ee76ab09e 100644 --- a/openHAB/FrameUITableViewCell.swift +++ b/openHAB/FrameUITableViewCell.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. diff --git a/openHAB/GenericUITableViewCell.swift b/openHAB/GenericUITableViewCell.swift index f66a6de97..15b99c53c 100644 --- a/openHAB/GenericUITableViewCell.swift +++ b/openHAB/GenericUITableViewCell.swift @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2022 Contributors to the openHAB project +// Copyright (c) 2010-2023 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. @@ -17,8 +17,17 @@ protocol GenericCellCacheProtocol: UITableViewCell { func invalidateCache() } +protocol GenericUITableViewCellTouchEventDelegate: AnyObject { + func touchDown() + func touchUp() +} + class GenericUITableViewCell: UITableViewCell { private var _widget: OpenHABWidget! + + // optional event callback if table cells neeed to notify on touch up or down events + weak var touchEventDelegate: GenericUITableViewCellTouchEventDelegate? + var widget: OpenHABWidget! { get { _widget diff --git a/openHAB/Images.xcassets/AppIcon.appiconset/Contents.json b/openHAB/Images.xcassets/AppIcon.appiconset/Contents.json index 0e6af4b0b..b3f44eb29 100644 --- a/openHAB/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/openHAB/Images.xcassets/AppIcon.appiconset/Contents.json @@ -1,116 +1,14 @@ { "images" : [ { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "icon_20pt@2x-1.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "icon_20pt@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "icon_29pt@2x-1.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "icon_29pt@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "icon_40pt@2x-1.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "icon_40pt@3x.png", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "icon_60pt@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "icon_60pt@3x.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "icon_20pt.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "icon_20pt@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "icon_29pt.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "icon_29pt@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "icon_40pt.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "icon_40pt@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "icon_76pt.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "icon_76pt@2x.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "icon_83.5@2x.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", "filename" : "Icon.png", - "scale" : "1x" + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" } ], "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } -} \ No newline at end of file +} diff --git a/openHAB/Images.xcassets/AppIcon.appiconset/icon_20pt.png b/openHAB/Images.xcassets/AppIcon.appiconset/icon_20pt.png deleted file mode 100644 index 6a4da9da6..000000000 Binary files a/openHAB/Images.xcassets/AppIcon.appiconset/icon_20pt.png and /dev/null differ diff --git a/openHAB/Images.xcassets/AppIcon.appiconset/icon_20pt@2x-1.png b/openHAB/Images.xcassets/AppIcon.appiconset/icon_20pt@2x-1.png deleted file mode 100644 index a018d991c..000000000 Binary files a/openHAB/Images.xcassets/AppIcon.appiconset/icon_20pt@2x-1.png and /dev/null differ diff --git a/openHAB/Images.xcassets/AppIcon.appiconset/icon_20pt@2x.png b/openHAB/Images.xcassets/AppIcon.appiconset/icon_20pt@2x.png deleted file mode 100644 index a018d991c..000000000 Binary files a/openHAB/Images.xcassets/AppIcon.appiconset/icon_20pt@2x.png and /dev/null differ diff --git a/openHAB/Images.xcassets/AppIcon.appiconset/icon_20pt@3x.png b/openHAB/Images.xcassets/AppIcon.appiconset/icon_20pt@3x.png deleted file mode 100644 index 0a762e088..000000000 Binary files a/openHAB/Images.xcassets/AppIcon.appiconset/icon_20pt@3x.png and /dev/null differ diff --git a/openHAB/Images.xcassets/AppIcon.appiconset/icon_29pt.png b/openHAB/Images.xcassets/AppIcon.appiconset/icon_29pt.png deleted file mode 100644 index 258267356..000000000 Binary files a/openHAB/Images.xcassets/AppIcon.appiconset/icon_29pt.png and /dev/null differ diff --git a/openHAB/Images.xcassets/AppIcon.appiconset/icon_29pt@2x-1.png b/openHAB/Images.xcassets/AppIcon.appiconset/icon_29pt@2x-1.png deleted file mode 100644 index cdb3748a6..000000000 Binary files a/openHAB/Images.xcassets/AppIcon.appiconset/icon_29pt@2x-1.png and /dev/null differ diff --git a/openHAB/Images.xcassets/AppIcon.appiconset/icon_29pt@2x.png b/openHAB/Images.xcassets/AppIcon.appiconset/icon_29pt@2x.png deleted file mode 100644 index cdb3748a6..000000000 Binary files a/openHAB/Images.xcassets/AppIcon.appiconset/icon_29pt@2x.png and /dev/null differ diff --git a/openHAB/Images.xcassets/AppIcon.appiconset/icon_29pt@3x.png b/openHAB/Images.xcassets/AppIcon.appiconset/icon_29pt@3x.png deleted file mode 100644 index a344bcc27..000000000 Binary files a/openHAB/Images.xcassets/AppIcon.appiconset/icon_29pt@3x.png and /dev/null differ diff --git a/openHAB/Images.xcassets/AppIcon.appiconset/icon_40pt.png b/openHAB/Images.xcassets/AppIcon.appiconset/icon_40pt.png deleted file mode 100644 index a018d991c..000000000 Binary files a/openHAB/Images.xcassets/AppIcon.appiconset/icon_40pt.png and /dev/null differ diff --git a/openHAB/Images.xcassets/AppIcon.appiconset/icon_40pt@2x-1.png b/openHAB/Images.xcassets/AppIcon.appiconset/icon_40pt@2x-1.png deleted file mode 100644 index b5b074799..000000000 Binary files a/openHAB/Images.xcassets/AppIcon.appiconset/icon_40pt@2x-1.png and /dev/null differ diff --git a/openHAB/Images.xcassets/AppIcon.appiconset/icon_40pt@2x.png b/openHAB/Images.xcassets/AppIcon.appiconset/icon_40pt@2x.png deleted file mode 100644 index b5b074799..000000000 Binary files a/openHAB/Images.xcassets/AppIcon.appiconset/icon_40pt@2x.png and /dev/null differ diff --git a/openHAB/Images.xcassets/AppIcon.appiconset/icon_40pt@3x.png b/openHAB/Images.xcassets/AppIcon.appiconset/icon_40pt@3x.png deleted file mode 100644 index eff9bb752..000000000 Binary files a/openHAB/Images.xcassets/AppIcon.appiconset/icon_40pt@3x.png and /dev/null differ diff --git a/openHAB/Images.xcassets/AppIcon.appiconset/icon_60pt@2x.png b/openHAB/Images.xcassets/AppIcon.appiconset/icon_60pt@2x.png deleted file mode 100644 index eff9bb752..000000000 Binary files a/openHAB/Images.xcassets/AppIcon.appiconset/icon_60pt@2x.png and /dev/null differ diff --git a/openHAB/Images.xcassets/AppIcon.appiconset/icon_60pt@3x.png b/openHAB/Images.xcassets/AppIcon.appiconset/icon_60pt@3x.png deleted file mode 100644 index 737961575..000000000 Binary files a/openHAB/Images.xcassets/AppIcon.appiconset/icon_60pt@3x.png and /dev/null differ diff --git a/openHAB/Images.xcassets/AppIcon.appiconset/icon_76pt.png b/openHAB/Images.xcassets/AppIcon.appiconset/icon_76pt.png deleted file mode 100644 index bcf20aed5..000000000 Binary files a/openHAB/Images.xcassets/AppIcon.appiconset/icon_76pt.png and /dev/null differ diff --git a/openHAB/Images.xcassets/AppIcon.appiconset/icon_76pt@2x.png b/openHAB/Images.xcassets/AppIcon.appiconset/icon_76pt@2x.png deleted file mode 100644 index 0e0fdd2f0..000000000 Binary files a/openHAB/Images.xcassets/AppIcon.appiconset/icon_76pt@2x.png and /dev/null differ diff --git a/openHAB/Images.xcassets/AppIcon.appiconset/icon_83.5@2x.png b/openHAB/Images.xcassets/AppIcon.appiconset/icon_83.5@2x.png deleted file mode 100644 index 21a25393c..000000000 Binary files a/openHAB/Images.xcassets/AppIcon.appiconset/icon_83.5@2x.png and /dev/null differ diff --git a/openHAB/Main.storyboard b/openHAB/Main.storyboard index b6a621d9c..fd3790ea0 100644 --- a/openHAB/Main.storyboard +++ b/openHAB/Main.storyboard @@ -1,9 +1,9 @@ - + - + @@ -25,7 +25,7 @@ - + @@ -50,20 +50,20 @@ - + - + @@ -84,14 +84,14 @@ - + - + - + @@ -269,19 +269,20 @@ + - + - + - + @@ -361,7 +362,7 @@ @@ -392,7 +393,7 @@ - + @@ -438,12 +439,12 @@ - + @@ -498,7 +499,7 @@ - + @@ -523,7 +524,7 @@ - + @@ -534,7 +535,7 @@ - + @@ -580,14 +581,14 @@ - + - + @@ -617,14 +618,14 @@ - + - + @@ -656,14 +657,14 @@ - + - + @@ -696,14 +697,14 @@ - + - + @@ -735,14 +736,14 @@ - + - + @@ -774,14 +775,14 @@ - + - + @@ -815,14 +816,14 @@ - + - + @@ -853,14 +854,14 @@ - + - + @@ -891,14 +892,14 @@ - + - + @@ -936,14 +937,14 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -1009,14 +1048,14 @@ - + - + - + - + - - + - - + - + @@ -1165,14 +1204,14 @@ - + - + - + - + - + - + @@ -1291,20 +1330,20 @@ - +