diff --git a/Changes.md b/Changes.md new file mode 100644 index 000000000..6ff18f925 --- /dev/null +++ b/Changes.md @@ -0,0 +1,53 @@ +# What has changed + +* The app is now ready for iOS 13: + * It supports the beautiful Dark Mode + +* Improvements relevant to users + * Haptic feedback when buttons. This is available as of iPhone 7 + * Throttling the flow of events from colorpicker to max once every 0.3 s + * Better screen space usage with fixed layout constraints and doubled slider width depending on size class + * Rollershutter button order changed + * Handling of many variants on server side for instance http/https connections to servers still on 1.x + * Video element: Added mjpeg support + * Label for state value for rollershutter + * Changed the Basic Auth challenge handler to check against the tracked URL rather than the remote/local URL from the settings. This should ensure Basic Auth works in cases where the URL is discovered via Bonjour. + * Fix for parsing of string to number without the locale setup + * Fix for app always showing SSL certificate warning + * Handling the case where only one default sitemap is returned in a sitemappage + * Improved video URL handling on cell reuse + +* Behind the scenes + * URLSession wrapped in Alamofire for network access, AFNetworking completely removed + * Improved handling of SSL certificate warning + * Display of icons when connected via https + * Setting authorization header also for icons + * Caching of icons with Kingfisher - SDWebImage purged from code base + * Converted direct URLSession usage in OpenHABTracker to use NetworkConnection.shared.manager instead to ensure that auth handling is handled properly - in particular when a 401 is returned from the server. + * Refactored HTTP Basic Auth to use the taskDidReceiveChallenge delegate so it only includes the Authorization header if requested by the server. + * Completed migration from AFNetworking to Alamofire: purged AlamofireRememberingSecurityPolicy.swift: init(policies: [String: ServerTrustPolicy]) to override ancestor, uncommented evaluateClientTrust and handleAuthenticationChallenge Reworked NetworkManager to it compile successfully with AlamofireRememberingSecurityPolicy Removed main.m, openHAB-Prefix.pch files, openHAB-Bridging-Header.h, openHABTests-Bridging-Header.h + * Fixed retain cycle in setWillSendRequestForAuthenticationChallenge closure + * SFSymbols as source of icons for iOS 13 to eventually replace DynamicButton + * Build improvements + * Swift Package Manager to replace CocoaPod where possible + * Improved fastlane + * Improved test coverage for instance for large JSON files, XML trimming whitespace, improved logic + * Many bug fixes: correct recognition of labelValue + * Refactoring: + * Completed onReceiveSessionTaskChallenge and onReceiveSessionChallenge for image download + * Recursive traversal of widgets data structure + * Refinement of swiftlint, usage of swiftformat + * Update to recent versions of SideMenu: clearing widgets to ensure cell invalidation on sitemap change + * Access to UserDefaults via Preferences to avoid typing errors and improve consistency + * Migrated from responseJSON to responseData + * Reworked XML parsing: now completely based on Fuzi framework + * Setting the FrameUITableViewCell font and color to match Apple's Guidelines + * Retain cycle in loadPage fixed + * Cache invalidation on sitemap change fixed + +## Trademark Disclaimer + +Product names, logos, brands and other trademarks referred to within the openHAB website are the +property of their respective trademark holders. These trademark holders are not affiliated with +openHAB or our website. They do not sponsor or endorse our materials. + diff --git a/Podfile b/Podfile index c295c7744..996194640 100644 --- a/Podfile +++ b/Podfile @@ -12,7 +12,6 @@ target 'openHAB' do pod 'Crashlytics', '~> 3.9.3' pod 'SwiftMessages' pod 'FlexColorPicker' - pod 'DynamicButton', '~> 6.2' pod 'Fuzi', '~> 3.1' end diff --git a/Podfile.lock b/Podfile.lock index ad2d40b8c..9e0f55fd7 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -4,7 +4,6 @@ PODS: - CocoaLumberjack/Core (3.5.3) - Crashlytics (3.9.3): - Fabric (~> 1.7.2) - - DynamicButton (6.2.0) - Fabric (1.7.13) - Firebase/Core (6.9.0): - Firebase/CoreOnly @@ -80,7 +79,6 @@ PODS: DEPENDENCIES: - Crashlytics (~> 3.9.3) - - DynamicButton (~> 6.2) - Fabric (~> 1.7.2) - Firebase/Core - FlexColorPicker @@ -94,7 +92,6 @@ SPEC REPOS: trunk: - CocoaLumberjack - Crashlytics - - DynamicButton - Fabric - Firebase - FirebaseAnalytics @@ -117,7 +114,6 @@ SPEC REPOS: SPEC CHECKSUMS: CocoaLumberjack: 2f44e60eb91c176d471fdba43b9e3eae6a721947 Crashlytics: dbb07d01876c171c5ccbdf7826410380189e452c - DynamicButton: 99858ce823ceed7263a4eed43bd3870e72723cb2 Fabric: 25d0963b691fc97be566392243ff0ecef5a68338 Firebase: 2d750c54cda57d5a6ae31212cfe5cc813c6be7e4 FirebaseAnalytics: 5d9ccbf46ed25d3ec9304d263f85bddf1e93e2d2 @@ -137,6 +133,6 @@ SPEC CHECKSUMS: SwiftLint: 5553187048b900c91aa03552807681bb6b027846 SwiftMessages: b577dc7043be8b299857ab35bb663dbff6483bd0 -PODFILE CHECKSUM: 6bb5377410427f4a716ad1f5f60aa01acb9115f1 +PODFILE CHECKSUM: 5e31c858063487afb7c7888d7cc69a00d397d559 COCOAPODS: 1.8.1 diff --git a/openHAB.xcodeproj/project.pbxproj b/openHAB.xcodeproj/project.pbxproj index cd36cc1fd..5aacff872 100644 --- a/openHAB.xcodeproj/project.pbxproj +++ b/openHAB.xcodeproj/project.pbxproj @@ -65,6 +65,8 @@ DA2DC23921F275B100830730 /* OpenHABNotification.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF1B302C1CF5C667009C921C /* OpenHABNotification.swift */; }; DA4A1A64223D57AE005F530F /* ColorUtil.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA4A1A63223D57AD005F530F /* ColorUtil.swift */; }; DA4A1A65223D57AE005F530F /* ColorUtil.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA4A1A63223D57AD005F530F /* ColorUtil.swift */; }; + DA4D4DB5233F9ACB00B37E37 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = DA4D4DB4233F9ACB00B37E37 /* README.md */; }; + DA4D4E0D23409A4600B37E37 /* DynamicButton in Frameworks */ = {isa = PBXBuildFile; productRef = DA4D4E0C23409A4600B37E37 /* DynamicButton */; }; DA5D0F81223E9991007ADDBD /* Endpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA5D0F80223E9991007ADDBD /* Endpoint.swift */; }; DA5D0F82223E9991007ADDBD /* Endpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA5D0F80223E9991007ADDBD /* Endpoint.swift */; }; DA7E1E492230227E002AEFD8 /* OpenHABTracker.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFDEE4161883C6A5008B26AC /* OpenHABTracker.swift */; }; @@ -299,6 +301,8 @@ DA2DC23121F2736C00830730 /* OpenHABJSONParserTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenHABJSONParserTests.swift; sourceTree = ""; }; DA2DC23321F2736C00830730 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; DA4A1A63223D57AD005F530F /* ColorUtil.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ColorUtil.swift; sourceTree = ""; }; + DA4D4DB4233F9ACB00B37E37 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; + DA4D4E0E2340A00200B37E37 /* Changes.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = Changes.md; sourceTree = ""; }; DA5D0F80223E9991007ADDBD /* Endpoint.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Endpoint.swift; sourceTree = ""; }; DA7E1E47222EB00B002AEFD8 /* PlayerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayerView.swift; sourceTree = ""; }; DA88F8C522EC377100B408E5 /* ReleaseNotes.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = ReleaseNotes.md; sourceTree = ""; }; @@ -407,6 +411,7 @@ DA2D457C233BF844003DDDEF /* Alamofire in Frameworks */, DA2D4579233BF812003DDDEF /* Kingfisher in Frameworks */, DA2D4646233D5EF9003DDDEF /* SideMenu in Frameworks */, + DA4D4E0D23409A4600B37E37 /* DynamicButton in Frameworks */, FBA52365FFB7B2D216F485D5 /* Pods_openHAB.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -668,6 +673,8 @@ DFB2621E18830A3600D3244D = { isa = PBXGroup; children = ( + DA4D4DB4233F9ACB00B37E37 /* README.md */, + DA4D4E0E2340A00200B37E37 /* Changes.md */, DFB2623018830A3600D3244D /* openHAB */, DA2DC23021F2736C00830730 /* openHABTestsSwift */, 1224F793228A8AE400750965 /* openHABWatch */, @@ -886,6 +893,7 @@ DA2D4578233BF812003DDDEF /* Kingfisher */, DA2D457B233BF844003DDDEF /* Alamofire */, DA2D4645233D5EF9003DDDEF /* SideMenu */, + DA4D4E0C23409A4600B37E37 /* DynamicButton */, ); productName = openHAB; productReference = DFB2622718830A3600D3244D /* openHAB.app */; @@ -953,6 +961,7 @@ DA2D4577233BF812003DDDEF /* XCRemoteSwiftPackageReference "Kingfisher" */, DA2D457A233BF844003DDDEF /* XCRemoteSwiftPackageReference "Alamofire" */, DA2D4644233D5EF9003DDDEF /* XCRemoteSwiftPackageReference "SideMenu" */, + DA4D4E0B23409A4600B37E37 /* XCRemoteSwiftPackageReference "DynamicButton" */, ); productRefGroup = DFB2622818830A3600D3244D /* Products */; projectDirPath = ""; @@ -1006,6 +1015,7 @@ files = ( DF4B84071885AE0E00F34902 /* blankicon.png in Resources */, DFB2624618830A3600D3244D /* Images.xcassets in Resources */, + DA4D4DB5233F9ACB00B37E37 /* README.md in Resources */, DFB2623518830A3600D3244D /* InfoPlist.strings in Resources */, DA88F8C622EC377200B408E5 /* ReleaseNotes.md in Resources */, DFDF45311932042B00A6E581 /* legal.rtf in Resources */, @@ -1912,6 +1922,15 @@ minimumVersion = 6.4.2; }; }; + DA4D4E0B23409A4600B37E37 /* XCRemoteSwiftPackageReference "DynamicButton" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/yannickl/DynamicButton"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 6.2.1; + }; + }; + /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ @@ -1935,6 +1954,12 @@ package = DA2D4644233D5EF9003DDDEF /* XCRemoteSwiftPackageReference "SideMenu" */; productName = SideMenu; }; + DA4D4E0C23409A4600B37E37 /* DynamicButton */ = { + isa = XCSwiftPackageProductDependency; + package = DA4D4E0B23409A4600B37E37 /* XCRemoteSwiftPackageReference "DynamicButton" */; + productName = DynamicButton; + }; + /* End XCSwiftPackageProductDependency section */ }; rootObject = DFB2621F18830A3600D3244D /* Project object */; diff --git a/openHAB.xcworkspace/xcshareddata/swiftpm/Package.resolved b/openHAB.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 000000000..2def75ecd --- /dev/null +++ b/openHAB.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,43 @@ +{ + "object": { + "pins": [ + { + "package": "Alamofire", + "repositoryURL": "https://github.com/Alamofire/Alamofire", + "state": { + "branch": null, + "revision": "ce5be6fbc6f51414c49f56fc8e2b7c99253d9f8e", + "version": "4.9.0" + } + }, + { + "package": "DynamicButton", + "repositoryURL": "https://github.com/yannickl/DynamicButton", + "state": { + "branch": null, + "revision": "4fbd60e46a548e77fd118483bbb4e58d3c11c5ed", + "version": "6.2.1" + } + }, + { + "package": "Kingfisher", + "repositoryURL": "https://github.com/onevcat/Kingfisher", + "state": { + "branch": null, + "revision": "ea84ff22e8c6da676354b162476aad0efd013d7d", + "version": "5.8.1" + } + }, + { + "package": "SideMenu", + "repositoryURL": "https://github.com/jonkykong/SideMenu", + "state": { + "branch": null, + "revision": "8dde1951c37b5ea0f696dae7d895f7d6fa53d3e1", + "version": "6.4.2" + } + } + ] + }, + "version": 1 +} diff --git a/openHAB/ColorPickerUITableViewCell.swift b/openHAB/ColorPickerUITableViewCell.swift index 5ad088ced..ca0fca16e 100644 --- a/openHAB/ColorPickerUITableViewCell.swift +++ b/openHAB/ColorPickerUITableViewCell.swift @@ -10,6 +10,7 @@ import DynamicButton import os.log +import UIKit protocol ColorPickerUITableViewCellDelegate: NSObjectProtocol { func didPressColorButton(_ cell: ColorPickerUITableViewCell?) diff --git a/openHAB/RollershutterUITableViewCell.swift b/openHAB/RollershutterUITableViewCell.swift index f4560b7a6..7f9a51b5e 100644 --- a/openHAB/RollershutterUITableViewCell.swift +++ b/openHAB/RollershutterUITableViewCell.swift @@ -10,6 +10,7 @@ import DynamicButton import os.log +import UIKit class RollershutterUITableViewCell: GenericUITableViewCell { private let feedbackGenerator = UIImpactFeedbackGenerator(style: .light) diff --git a/openHAB/SetpointUITableViewCell.swift b/openHAB/SetpointUITableViewCell.swift index a1436d18d..fb0d58a99 100644 --- a/openHAB/SetpointUITableViewCell.swift +++ b/openHAB/SetpointUITableViewCell.swift @@ -9,6 +9,7 @@ // import DynamicButton import os.log +import UIKit class SetpointUITableViewCell: GenericUITableViewCell { private var isIntStep: Bool {