Skip to content

Commit

Permalink
Merge branch 'develop' into tracker-combine-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
digitaldan authored Sep 11, 2024
2 parents e4fab60 + fc036ee commit 743afad
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
type: choice
description: 'Select version bump type:'
options:
- none
- patch
- minor
- major
Expand Down
2 changes: 1 addition & 1 deletion fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
5 changes: 5 additions & 0 deletions openHAB/OpenHABWebViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,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]
Expand All @@ -255,6 +256,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
}
Expand Down

0 comments on commit 743afad

Please sign in to comment.