From 87f43300a66a8b04d353c22f374325446de6050e Mon Sep 17 00:00:00 2001 From: openhab-bot Date: Sat, 7 Sep 2024 19:37:19 +0000 Subject: [PATCH 1/6] committed version bump: 3.0.6 (12) Signed-off-by: Anka --- openHAB.xcodeproj/project.pbxproj | 48 +++++++++++++++---------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/openHAB.xcodeproj/project.pbxproj b/openHAB.xcodeproj/project.pbxproj index ebad98d2..e10e7243 100644 --- a/openHAB.xcodeproj/project.pbxproj +++ b/openHAB.xcodeproj/project.pbxproj @@ -1611,7 +1611,7 @@ CODE_SIGN_ENTITLEMENTS = openHABIntents/openHABIntents.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 11; + CURRENT_PROJECT_VERSION = 12; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = PBAPXHRAM9; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -1625,7 +1625,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 3.0.5; + MARKETING_VERSION = 3.0.6; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.openhab.app.openHABIntents; @@ -1654,7 +1654,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 11; + CURRENT_PROJECT_VERSION = 12; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = PBAPXHRAM9; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = PBAPXHRAM9; @@ -1668,7 +1668,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 3.0.5; + MARKETING_VERSION = 3.0.6; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.openhab.app.openHABIntents; @@ -1695,7 +1695,7 @@ CODE_SIGN_ENTITLEMENTS = NotificationService/NotificationService.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 11; + CURRENT_PROJECT_VERSION = 12; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = PBAPXHRAM9; ENABLE_USER_SCRIPT_SANDBOXING = YES; @@ -1714,7 +1714,7 @@ "@executable_path/../../Frameworks", ); LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 3.0.5; + MARKETING_VERSION = 3.0.6; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.openhab.app.NotificationService; @@ -1742,7 +1742,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 11; + CURRENT_PROJECT_VERSION = 12; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = PBAPXHRAM9; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = PBAPXHRAM9; @@ -1761,7 +1761,7 @@ "@executable_path/../../Frameworks", ); LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 3.0.5; + MARKETING_VERSION = 3.0.6; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.openhab.app.NotificationService; @@ -1788,7 +1788,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 11; + CURRENT_PROJECT_VERSION = 12; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = PBAPXHRAM9; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -1799,7 +1799,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 3.0.5; + MARKETING_VERSION = 3.0.6; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = es.spaphone.openHABUITests; @@ -1834,7 +1834,7 @@ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 11; + CURRENT_PROJECT_VERSION = 12; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = PBAPXHRAM9; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -1845,7 +1845,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 3.0.5; + MARKETING_VERSION = 3.0.6; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = es.spaphone.openHABUITests; @@ -1879,7 +1879,7 @@ CODE_SIGN_ENTITLEMENTS = "openHABWatch Extension/openHABWatch Extension.entitlements"; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 11; + CURRENT_PROJECT_VERSION = 12; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = PBAPXHRAM9; GCC_C_LANGUAGE_STANDARD = "compiler-default"; @@ -1890,7 +1890,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 3.0.5; + MARKETING_VERSION = 3.0.6; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.openhab.app.watchkitapp; @@ -1925,7 +1925,7 @@ "CODE_SIGN_IDENTITY[sdk=watchos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 11; + CURRENT_PROJECT_VERSION = 12; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = PBAPXHRAM9; "DEVELOPMENT_TEAM[sdk=watchos*]" = PBAPXHRAM9; @@ -1937,7 +1937,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 3.0.5; + MARKETING_VERSION = 3.0.6; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.openhab.app.watchkitapp; @@ -1969,7 +1969,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 11; + CURRENT_PROJECT_VERSION = 12; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = PBAPXHRAM9; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -1980,7 +1980,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 3.0.5; + MARKETING_VERSION = 3.0.6; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = "com.reg-labs.openHABTestsSwift"; @@ -2012,7 +2012,7 @@ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 11; + CURRENT_PROJECT_VERSION = 12; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = PBAPXHRAM9; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -2023,7 +2023,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 3.0.5; + MARKETING_VERSION = 3.0.6; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = "com.reg-labs.openHABTestsSwift"; @@ -2171,7 +2171,7 @@ CODE_SIGN_ENTITLEMENTS = openHAB/openHAB.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 11; + CURRENT_PROJECT_VERSION = 12; DEVELOPMENT_TEAM = PBAPXHRAM9; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "openHAB/openHAB-Prefix.pch"; @@ -2186,7 +2186,7 @@ "@loader_path/../../Frameworks", ); LIBRARY_SEARCH_PATHS = "$(inherited)"; - MARKETING_VERSION = 3.0.5; + MARKETING_VERSION = 3.0.6; OTHER_SWIFT_FLAGS = "$(inherited) -DDEBUG -Xfrontend -warn-long-expression-type-checking=200 -Xfrontend -warn-long-function-bodies=200"; PRODUCT_BUNDLE_IDENTIFIER = org.openhab.app; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -2215,7 +2215,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 11; + CURRENT_PROJECT_VERSION = 12; DEVELOPMENT_TEAM = PBAPXHRAM9; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = PBAPXHRAM9; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -2231,7 +2231,7 @@ "@loader_path/../../Frameworks", ); LIBRARY_SEARCH_PATHS = "$(inherited)"; - MARKETING_VERSION = 3.0.5; + MARKETING_VERSION = 3.0.6; PRODUCT_BUNDLE_IDENTIFIER = org.openhab.app; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; From 46c361093ce622384f092a6f9fb53dd3068a3e29 Mon Sep 17 00:00:00 2001 From: Dan Cunningham Date: Mon, 9 Sep 2024 14:51:26 -0700 Subject: [PATCH 2/6] Make label optional in command items (#805) Fixes #803 Fixes #792 Signed-off-by: Dan Cunningham --- .../Sources/OpenHABCore/Model/OpenHABCommandOptions.swift | 2 +- OpenHABCore/Sources/OpenHABCore/Model/OpenHABWidget.swift | 2 +- openHAB/OpenHABSitemapViewController.swift | 5 +++++ .../Model/ObservableOpenHABWidget.swift | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/OpenHABCore/Sources/OpenHABCore/Model/OpenHABCommandOptions.swift b/OpenHABCore/Sources/OpenHABCore/Model/OpenHABCommandOptions.swift index 5484d214..1e610277 100644 --- a/OpenHABCore/Sources/OpenHABCore/Model/OpenHABCommandOptions.swift +++ b/OpenHABCore/Sources/OpenHABCore/Model/OpenHABCommandOptions.swift @@ -13,5 +13,5 @@ import Foundation public class OpenHABCommandOptions: Decodable { public var command = "" - public var label = "" + public var label: String? = "" } diff --git a/OpenHABCore/Sources/OpenHABCore/Model/OpenHABWidget.swift b/OpenHABCore/Sources/OpenHABCore/Model/OpenHABWidget.swift index b881bd56..f0fe5511 100644 --- a/OpenHABCore/Sources/OpenHABCore/Model/OpenHABWidget.swift +++ b/OpenHABCore/Sources/OpenHABCore/Model/OpenHABWidget.swift @@ -118,7 +118,7 @@ public class OpenHABWidget: NSObject, MKAnnotation, Identifiable { public var mappingsOrItemOptions: [OpenHABWidgetMapping] { if mappings.isEmpty, let commandOptions = item?.commandDescription?.commandOptions { - commandOptions.map { OpenHABWidgetMapping(command: $0.command, label: $0.label) } + commandOptions.map { OpenHABWidgetMapping(command: $0.command, label: $0.label ?? "") } } else if mappings.isEmpty, let stateOptions = item?.stateDescription?.options { stateOptions.map { OpenHABWidgetMapping(command: $0.value, label: $0.label) } } else { diff --git a/openHAB/OpenHABSitemapViewController.swift b/openHAB/OpenHABSitemapViewController.swift index c0a329d6..37926003 100644 --- a/openHAB/OpenHABSitemapViewController.swift +++ b/openHAB/OpenHABSitemapViewController.swift @@ -341,7 +341,12 @@ class OpenHABSitemapViewController: OpenHABViewController, GenericUITableViewCel return sitemapPageCodingData.openHABSitemapPage }() } catch { + //Printing the error is the only way to actually get the real issue, localizedDescription is pretty useless here + print(error) os_log("Should not throw %{PUBLIC}@", log: OSLog.remoteAccess, type: .error, error.localizedDescription) + DispatchQueue.main.async { + self.showPopupMessage(seconds: 5, title: NSLocalizedString("error", comment: ""), message: error.localizedDescription, theme: .error) + } } currentPage = openHABSitemapPage diff --git a/openHABWatch Extension/openHABWatch Extension/Model/ObservableOpenHABWidget.swift b/openHABWatch Extension/openHABWatch Extension/Model/ObservableOpenHABWidget.swift index 8e0c798b..051ea2e2 100644 --- a/openHABWatch Extension/openHABWatch Extension/Model/ObservableOpenHABWidget.swift +++ b/openHABWatch Extension/openHABWatch Extension/Model/ObservableOpenHABWidget.swift @@ -95,7 +95,7 @@ class ObservableOpenHABWidget: NSObject, MKAnnotation, Identifiable, ObservableO var mappingsOrItemOptions: [OpenHABWidgetMapping] { if mappings.isEmpty, let commandOptions = item?.commandDescription?.commandOptions { - commandOptions.map { OpenHABWidgetMapping(command: $0.command, label: $0.label) } + commandOptions.map { OpenHABWidgetMapping(command: $0.command, label: $0.label ?? "") } } else if mappings.isEmpty, let stateOptions = item?.stateDescription?.options { stateOptions.map { OpenHABWidgetMapping(command: $0.value, label: $0.label) } } else { From 0cd05cd433877eba4b74d820aaf21914aaf0f132 Mon Sep 17 00:00:00 2001 From: Dan Cunningham Date: Wed, 11 Sep 2024 13:11:21 -0700 Subject: [PATCH 3/6] Add 'none' option to version bumping. This avoids long Testflight reviews for incremental build releases. This acording to Apple: (#807) "A review is only required for the first build of a version and subsequent builds may not need a full review. Testing can begin once a build is approved." . https://developer.apple.com/help/app-store-connect/test-a-beta-version/testflight-overview/ Signed-off-by: Dan Cunningham --- .github/workflows/publish.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1c0d720f..ec4a96ed 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,6 +9,7 @@ on: type: choice description: 'Select version bump type:' options: + - none - patch - minor - major @@ -41,6 +42,15 @@ jobs: ssh-private-key: | ${{ secrets.MATCH_GIT_PRIVATE_KEY }} + - name: Set Fastlane Options + id: set_options + run: | + if [ "${{ github.event.inputs.bump_type }}" != "none" ]; then + echo "fastlane_options={ \"bump\": \"${{ github.event.inputs.bump_type }}\" }" >> $GITHUB_ENV + else + echo "fastlane_options={}" >> $GITHUB_ENV + fi + - name: Deploy on TestFlight env: OH_CROWDIN_PROJECT_ID: openhab-ios @@ -59,5 +69,5 @@ jobs: uses: maierj/fastlane-action@v3.1.0 with: lane: beta - options: '{ "bump": "${{ github.event.inputs.bump_type }}" }' + options: ${{ steps.set_options.outputs.fastlane_options }} skip-tracking: true From 8c8025fb9a1e722913169e65e61bbd86dbcbcf9d Mon Sep 17 00:00:00 2001 From: Dan Cunningham Date: Wed, 11 Sep 2024 13:33:11 -0700 Subject: [PATCH 4/6] =?UTF-8?q?Rendering=20of=20the=20openHAB=20ui=20in=20?= =?UTF-8?q?a=20Webview=20on=20an=20iPad=20was=20way=20to=20small.=E2=80=A6?= =?UTF-8?q?=20(#806)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Rendering of the openHAB ui in a Webview on an iPad was way to small. Safari however renders the openHAB UI correctly, this makes our webview behave like Safari. Changing the user agent string is the only way to acheive this. Signed-off-by: Dan Cunningham * Formatting Signed-off-by: Dan Cunningham --------- Signed-off-by: Dan Cunningham --- openHAB/OpenHABWebViewController.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openHAB/OpenHABWebViewController.swift b/openHAB/OpenHABWebViewController.swift index e0cbb224..6ac6533a 100644 --- a/openHAB/OpenHABWebViewController.swift +++ b/openHAB/OpenHABWebViewController.swift @@ -224,6 +224,7 @@ class OpenHABWebViewController: OpenHABViewController { // adds: window.webkit.messageHandlers.xxxx.postMessage to JS env config.userContentController.add(self, name: "Native") config.userContentController.addUserScript(WKUserScript(source: js, injectionTime: .atDocumentStart, forMainFrameOnly: false)) + let webView = WKWebView(frame: view.bounds, configuration: config) // Alow rotation of webview webView.autoresizingMask = [.flexibleWidth, .flexibleHeight] @@ -233,6 +234,10 @@ class OpenHABWebViewController: OpenHABViewController { // support dark mode and avoid white flashing when loading webView.isOpaque = false webView.backgroundColor = UIColor.clear + if UIDevice.current.userInterfaceIdiom == .pad { + // since ios 13 Safari sets the user agent to desktop mode on iPads so the view renders correctly with larger screens + webView.customUserAgent = "Mozilla/5.0 (iPad; CPU OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Mobile/15E148 Safari/604.1" + } if #available(iOS 16.4, *) { webView.isInspectable = true } From b662b3224a2d4d3430da650764549882779a9839 Mon Sep 17 00:00:00 2001 From: Dan Cunningham Date: Wed, 11 Sep 2024 13:52:09 -0700 Subject: [PATCH 5/6] =?UTF-8?q?Revert=20"Add=20'none'=20option=20to=20vers?= =?UTF-8?q?ion=20bumping.=20This=20avoids=20long=20Testflight=20rev?= =?UTF-8?q?=E2=80=A6"=20(#812)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 0cd05cd433877eba4b74d820aaf21914aaf0f132. --- .github/workflows/publish.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ec4a96ed..1c0d720f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,7 +9,6 @@ on: type: choice description: 'Select version bump type:' options: - - none - patch - minor - major @@ -42,15 +41,6 @@ jobs: ssh-private-key: | ${{ secrets.MATCH_GIT_PRIVATE_KEY }} - - name: Set Fastlane Options - id: set_options - run: | - if [ "${{ github.event.inputs.bump_type }}" != "none" ]; then - echo "fastlane_options={ \"bump\": \"${{ github.event.inputs.bump_type }}\" }" >> $GITHUB_ENV - else - echo "fastlane_options={}" >> $GITHUB_ENV - fi - - name: Deploy on TestFlight env: OH_CROWDIN_PROJECT_ID: openhab-ios @@ -69,5 +59,5 @@ jobs: uses: maierj/fastlane-action@v3.1.0 with: lane: beta - options: ${{ steps.set_options.outputs.fastlane_options }} + options: '{ "bump": "${{ github.event.inputs.bump_type }}" }' skip-tracking: true From fc036ee76d5203851cc1db99641588ec85da4bef Mon Sep 17 00:00:00 2001 From: Dan Cunningham Date: Wed, 11 Sep 2024 13:55:58 -0700 Subject: [PATCH 6/6] Add 'none' option to version bumping. (#813) This avoids long Test Flight reviews for incremental build releases. This according to Apple: "A review is only required for the first build of a version and subsequent builds may not need a full review. Testing can begin once a build is approved." . https://developer.apple.com/help/app-store-connect/test-a-beta-version/testflight-overview/ Signed-off-by: Dan Cunningham --- .github/workflows/publish.yml | 1 + fastlane/Fastfile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1c0d720f..336b229e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,6 +9,7 @@ on: type: choice description: 'Select version bump type:' options: + - none - patch - minor - major diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 600ee55d..2782273f 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -100,7 +100,7 @@ platform :ios do type = options[:bump] - if !options[:isfeaturebuild] + if !options[:isfeaturebuild] && type != 'none' increment_version_number_in_xcodeproj( bump_type: type, xcodeproj: 'openHAB.xcodeproj',