Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from WatchKit storyboard to SwiftUI and its lifecycle #739

Open
wants to merge 48 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
8e176b5
Migration of watch app to SwiftUI and its lifecycle
timbms Nov 7, 2023
867f5b7
Migrate trustedCertificates from [String: Any] to [String: Data]
timbms Nov 7, 2023
0edb173
Fixes UI Test for main ui (#733)
digitaldan Oct 27, 2023
cfc940b
Migrate onReceiveSessionTaskChallenge and onReceiveSessionTaskChallen…
timbms Oct 29, 2023
0a5a287
keyWindow fix (#737)
timbms Oct 29, 2023
c600086
Migrated to clamped(to:) from min(max. Makes it much more readable (#…
timbms Oct 30, 2023
f4f4680
Dropping Unwrap.swift - as of swift 5.3 this can be expressed much si…
timbms Nov 7, 2023
44c756f
Changed endpoint
timbms Nov 8, 2023
990419c
Migration of watch app to SwiftUI and its lifecycle
timbms Nov 7, 2023
af72494
Merge branch 'develop' into watchkit
timbms Nov 8, 2023
6d20d08
Renamed EncircledIconwithAction to ImageWithAction
timbms Nov 8, 2023
56bd336
Transition from NSRegularExpression to Swift Regular Expression avail…
timbms Nov 8, 2023
5fa2f18
Getting the notification functionality back in SwiftUI watch app
timbms Nov 8, 2023
aa6c592
Added name of presented sitemap
timbms Nov 10, 2023
bb1219b
Settings entry for watch sitemap - transfer to watch / Watch should n…
timbms Nov 14, 2023
c1c2f4b
Merge branch 'develop' into watchkit
timbms Nov 16, 2023
67b6b4f
Merge branch 'develop' into watchkit
timbms Nov 22, 2023
02077ea
Merge branch 'develop' into watchkit
timbms Dec 27, 2023
c9009e4
Merge branch 'develop' into watchkit
timbms Jan 10, 2024
9e0a446
Handling of svg images on watchOS with SDWebImage, [porting handling…
timbms Jan 11, 2024
a589c84
Addressing test errors
timbms Jan 11, 2024
b129a52
Adding missing OpenHABImageDownloaderOperation to commit
timbms Jan 11, 2024
0452d79
Merge branch 'develop' of https://github.com/openhab/openhab-ios into…
timbms Jan 11, 2024
ce0f178
Moved MulitcastDelegate.swift to openHABCore
timbms Jan 12, 2024
3e2b282
Passing iconType from iOS to watchOS
timbms Jan 12, 2024
7dc51a2
Reverted to target 8.0 - minor constraint on labelValue display
timbms Jan 14, 2024
22b9aad
Merge branch 'develop' into watchkit
timbms Jan 15, 2024
fdb026f
Cleanup of Bonjour discovery
timbms Jan 15, 2024
aef7bbd
Ticked Automatically Manage Signing for openHABIntents
timbms Jan 15, 2024
99afd88
Merge branch 'develop' into watchkit
timbms Jun 5, 2024
347d787
Replacing references to old app identifier
timbms Jun 11, 2024
dbcd584
Get rid of old app identifier / step 2
timbms Jun 11, 2024
8698feb
Update to fastlane version 2.220.0
timbms Jun 11, 2024
a0e763d
Merged develop. Changed preferences view to show settings.sitemapForW…
timbms Jul 28, 2024
3946d2b
Update for SDWebImage
timbms Sep 7, 2024
4256155
Integrating latest changes on develop into watchkit branch
timbms Sep 7, 2024
861de67
Merge branch 'develop' into watchkit
timbms Sep 7, 2024
cb9b3d8
Update to latest available https://github.com/weakfl/SwiftFormatPlugin
timbms Sep 7, 2024
d77bd97
Merge branch 'watchkit' of https://github.com/openhab/openhab-ios int…
timbms Sep 7, 2024
e27e44d
Reworking on cells and migration to EnvironmentObject instead of shared
timbms Sep 12, 2024
79d8ff7
Only formatting
Oct 11, 2024
2732f8b
Merge branch develop
Oct 13, 2024
9e3ec95
Merge branch 'develop' into watchkit
Oct 13, 2024
b307fab
Merge branch 'develop' into watchkit
timbms Oct 13, 2024
6fa4be0
Revert to Alamofire calls without concurrencz
Oct 13, 2024
df4eeb5
Merge branch 'watchkit' of https://github.com/openhab/openhab-ios int…
Oct 13, 2024
cf07f2e
Double to select the sitemap for watch
Oct 13, 2024
71f4c46
Align with develop
Oct 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ openHAB.ipa
build/
BuildTools/.build
OpenHABCore/Package.resolved

swift-openapi-generator/
OpenHABCore/swift-openapi-generator/
1 change: 1 addition & 0 deletions BuildTools/.swiftformat
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
--exclude ../fastlane
--exclude ../OpenHABCore/.build
--exclude ./build
--exclude ../OpenHABCore/swift-openapi-generator
--symlinks ignore

# disabled rules
Expand Down
4 changes: 2 additions & 2 deletions BuildTools/Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/weakfl/SwiftFormatPlugin",
"state" : {
"revision" : "29d6c0bc4c078f819504d92fb5b359e63fd32046",
"version" : "0.53.2"
"revision" : "65e4f4aaba165f03f311bd1472b771988f11828e",
"version" : "0.54.3"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion BuildTools/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ let package = Package(
name: "BuildTools",
platforms: [.macOS(.v10_13)],
dependencies: [
.package(url: "https://github.com/weakfl/SwiftFormatPlugin", exact: "0.53.2"),
.package(url: "https://github.com/weakfl/SwiftFormatPlugin", exact: "0.54.3"),
.package(url: "https://github.com/weakfl/SwiftLintPlugin.git", exact: "0.54.0")
],
targets: [
Expand Down
1 change: 0 additions & 1 deletion OpenHABCore/Sources/OpenHABCore/Model/OpenHABWidget.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
//
// SPDX-License-Identifier: EPL-2.0

import Alamofire
import Foundation
import MapKit
import os.log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Foundation
import os.log
import Security

public protocol ClientCertificateManagerDelegate: NSObjectProtocol {
public protocol ClientCertificateManagerDelegate: AnyObject {
// delegate should ask user for a decision on whether to import the client certificate into the keychain
func askForClientCertificateImport(_ clientCertificateManager: ClientCertificateManager?)
// delegate should ask user for the export password used to decode the PKCS#12
Expand Down
1 change: 1 addition & 0 deletions OpenHABCore/Sources/OpenHABCore/Util/Preferences.swift
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ public enum Preferences {
@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
@UserDefault("sitemapForWatch", defaultValue: "watch") public static var sitemapForWatch: String

// MARK: - Private

Expand Down
2 changes: 2 additions & 0 deletions OpenHABCore/Tests/OpenHABCoreTests/UserDefaultsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ final class UserDefaultsTests: XCTestCase {
Preferences.idleOff = Preferences.idleOff
Preferences.iconType = Preferences.iconType
Preferences.defaultSitemap = Preferences.defaultSitemap
Preferences.sitemapForWatch = Preferences.sitemapForWatch
}

// Testing the consistency between properties of Preferences and the corresponding entry in UserDefaults
Expand All @@ -45,5 +46,6 @@ final class UserDefaultsTests: XCTestCase {
XCTAssertEqual(Preferences.idleOff, data.bool(forKey: "idleOff"))
XCTAssertEqual(Preferences.iconType, data.integer(forKey: "iconType"))
XCTAssertEqual(Preferences.defaultSitemap, data.string(forKey: "defaultSitemap"))
XCTAssertEqual(Preferences.sitemapForWatch, data.string(forKey: "sitemapForWatch"))
}
}
532 changes: 449 additions & 83 deletions openHAB.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,249 @@
{
"originHash" : "3e04d0efd248e4773eeea4bddf4c08890d8cb5b0c615e3a2ff865ffe7b192275",
"pins" : [
{
"identity" : "abseil-cpp-binary",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/abseil-cpp-binary.git",
"state" : {
"revision" : "194a6706acbd25e4ef639bcaddea16e8758a3e27",
"version" : "1.2024011602.0"
}
},
{
"identity" : "alamofire",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Alamofire/Alamofire.git",
"state" : {
"revision" : "f455c2975872ccd2d9c81594c658af65716e9b9a",
"version" : "5.9.1"
}
},
{
"identity" : "alamofirenetworkactivityindicator",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Alamofire/AlamofireNetworkActivityIndicator.git",
"state" : {
"revision" : "392bed083e8d193aca16bfa684ee24e4bcff0510",
"version" : "3.1.0"
}
},
{
"identity" : "app-check",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/app-check.git",
"state" : {
"revision" : "3b62f154d00019ae29a71e9738800bb6f18b236d",
"version" : "10.19.2"
}
},
{
"identity" : "cocoalumberjack",
"kind" : "remoteSourceControl",
"location" : "https://github.com/CocoaLumberjack/CocoaLumberjack.git",
"state" : {
"revision" : "4b8714a7fb84d42393314ce897127b3939885ec3",
"version" : "3.8.5"
}
},
{
"identity" : "devicekit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/devicekit/DeviceKit.git",
"state" : {
"revision" : "d37e70cb2646666dcf276d7d3d4a9760a41ff8a6",
"version" : "4.9.0"
}
},
{
"identity" : "firebase-ios-sdk",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/firebase-ios-sdk.git",
"state" : {
"revision" : "eca84fd638116dd6adb633b5a3f31cc7befcbb7d",
"version" : "10.29.0"
}
},
{
"identity" : "flexcolorpicker",
"kind" : "remoteSourceControl",
"location" : "https://github.com/RastislavMirek/FlexColorPicker.git",
"state" : {
"revision" : "72a5c2c5e28074e6c5f13efe3c98eb780ae2f906",
"version" : "1.4.4"
}
},
{
"identity" : "googleappmeasurement",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleAppMeasurement.git",
"state" : {
"revision" : "fe727587518729046fc1465625b9afd80b5ab361",
"version" : "10.28.0"
}
},
{
"identity" : "googledatatransport",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleDataTransport.git",
"state" : {
"revision" : "a637d318ae7ae246b02d7305121275bc75ed5565",
"version" : "9.4.0"
}
},
{
"identity" : "googleutilities",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleUtilities.git",
"state" : {
"revision" : "57a1d307f42df690fdef2637f3e5b776da02aad6",
"version" : "7.13.3"
}
},
{
"identity" : "grpc-binary",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/grpc-binary.git",
"state" : {
"revision" : "e9fad491d0673bdda7063a0341fb6b47a30c5359",
"version" : "1.62.2"
}
},
{
"identity" : "gtm-session-fetcher",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/gtm-session-fetcher.git",
"state" : {
"revision" : "a2ab612cb980066ee56d90d60d8462992c07f24b",
"version" : "3.5.0"
}
},
{
"identity" : "interop-ios-for-google-sdks",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/interop-ios-for-google-sdks.git",
"state" : {
"revision" : "2d12673670417654f08f5f90fdd62926dc3a2648",
"version" : "100.0.0"
}
},
{
"identity" : "kingfisher",
"kind" : "remoteSourceControl",
"location" : "https://github.com/onevcat/Kingfisher.git",
"state" : {
"revision" : "2ef543ee21d63734e1c004ad6c870255e8716c50",
"version" : "7.12.0"
}
},
{
"identity" : "leveldb",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/leveldb.git",
"state" : {
"revision" : "a0bc79961d7be727d258d33d5a6b2f1023270ba1",
"version" : "1.22.5"
}
},
{
"identity" : "nanopb",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/nanopb.git",
"state" : {
"revision" : "b7e1104502eca3a213b46303391ca4d3bc8ddec1",
"version" : "2.30910.0"
}
},
{
"identity" : "promises",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/promises.git",
"state" : {
"revision" : "540318ecedd63d883069ae7f1ed811a2df00b6ac",
"version" : "2.4.0"
}
},
{
"identity" : "sdwebimage",
"kind" : "remoteSourceControl",
"location" : "https://github.com/SDWebImage/SDWebImage.git",
"state" : {
"revision" : "8a1be70a625683bc04d6903e2935bf23f3c6d609",
"version" : "5.19.7"
}
},
{
"identity" : "sdwebimagesvgcoder",
"kind" : "remoteSourceControl",
"location" : "https://github.com/SDWebImage/SDWebImageSVGCoder.git",
"state" : {
"revision" : "950167445ab703740569869c8b7510efc9d09a26",
"version" : "1.7.0"
}
},
{
"identity" : "sdwebimageswiftui",
"kind" : "remoteSourceControl",
"location" : "https://github.com/SDWebImage/SDWebImageSwiftUI.git",
"state" : {
"revision" : "53573d6dd017e354c0e7d8f1c86b77ef1383c996",
"version" : "2.2.7"
}
},
{
"identity" : "sfsafesymbols",
"kind" : "remoteSourceControl",
"location" : "https://github.com/SFSafeSymbols/SFSafeSymbols",
"state" : {
"revision" : "e2e28f4e56e1769c2ec3c61c9355fc64eb7a535a",
"version" : "5.3.0"
}
},
{
"identity" : "sidemenu",
"kind" : "remoteSourceControl",
"location" : "https://github.com/jonkykong/SideMenu.git",
"state" : {
"revision" : "8bd4fd128923cf5494fa726839af8afe12908ad9",
"version" : "6.5.0"
}
},
{
"identity" : "svgkit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/SVGKit/SVGKit.git",
"state" : {
"branch" : "3.x",
"revision" : "1b8a3cf210ab4681c18fbb62059bbdbb37dd649a"
}
},
{
"identity" : "swift-log",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-log",
"state" : {
"revision" : "9cb486020ebf03bfa5b5df985387a14a98744537",
"version" : "1.6.1"
}
},
{
"identity" : "swift-protobuf",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-protobuf.git",
"state" : {
"revision" : "edb6ed4919f7756157fe02f2552b7e3850a538e5",
"version" : "1.28.1"
}
},
{
"identity" : "swiftmessages",
"kind" : "remoteSourceControl",
"location" : "https://github.com/SwiftKickMobile/SwiftMessages.git",
"state" : {
"revision" : "62e12e138fc3eedf88c7553dd5d98712aa119f40",
"version" : "9.0.9"
}
}
],
"version" : 3
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
debugServiceExtension = "internal"
allowLocationSimulation = "YES"
launchAutomaticallySubstyle = "8"
notificationPayloadFile = "openHABWatch Extension/PushNotificationPayload.apns">
notificationPayloadFile = "openHABWatch/Extension/PushNotificationPayload.apns">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
Expand All @@ -74,7 +74,7 @@
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
launchAutomaticallySubstyle = "8"
notificationPayloadFile = "openHABWatch Extension/PushNotificationPayload.apns">
notificationPayloadFile = "openHABWatch/Extension/PushNotificationPayload.apns">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
Expand Down
15 changes: 7 additions & 8 deletions openHAB.xcodeproj/xcshareddata/xcschemes/openHABWatch.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
buildForTesting = "NO"
buildForRunning = "NO"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DFB2622618830A3600D3244D"
Expand Down Expand Up @@ -54,7 +54,7 @@
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES"
notificationPayloadFile = "openHABWatch Extension/PushNotificationPayload.apns">
notificationPayloadFile = "openHABWatch/Extension/PushNotificationPayload.apns">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
Expand All @@ -71,8 +71,7 @@
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
notificationPayloadFile = "openHABWatch Extension/PushNotificationPayload.apns">
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
Expand Down
Loading