Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
4 changes: 4 additions & 0 deletions Sources/CareKitEssentials/Cards/Shared/CardViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2022 NetReconLab. All rights reserved.
//

#if canImport(SwiftUI)

import CareKit
import CareKitStore
import Foundation
Expand Down Expand Up @@ -120,3 +122,5 @@ open class CardViewModel: ObservableObject {
}.sorted { $0.createdDate > $1.createdDate }
}
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// Created by Corey Baker on 4/28/25.
//

#if canImport(SwiftUI)

import SwiftUI

struct CKEConfigurationView: View {
Expand Down Expand Up @@ -119,3 +121,5 @@ struct CKEConfigurationView_Previews: PreviewProvider {
.listStyle(.automatic)
}
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// Copyright © 2024 Network Reconnaissance Lab. All rights reserved.
//

#if canImport(SwiftUI)
import Charts
import os.log
import SwiftUI

struct CareKitEssentialChartBodyView: View {
Expand Down Expand Up @@ -215,3 +215,5 @@ struct CareKitEssentialChartBodyView: View {
)
}
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2025 Network Reconnaissance Lab. All rights reserved.
//

#if canImport(SwiftUI)

import CareKit
import CareKitStore
import CareKitUI
Expand Down Expand Up @@ -242,3 +244,5 @@ struct CareKitEssentialChartDetailView_Previews: PreviewProvider {
.environment(\.careStore, previewStore)
}
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2024 Network Reconnaissance Lab. All rights reserved.
//

#if canImport(SwiftUI)

import SwiftUI

struct CareKitEssentialChartHeaderView: View {
Expand Down Expand Up @@ -44,3 +46,5 @@ struct CareEssentialChartHeaderView_Previews: PreviewProvider {
)
}
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// Created by Corey Baker on 4/27/25.
//

#if canImport(SwiftUI)

import CareKit
import CareKitStore
import CareKitUI
Expand Down Expand Up @@ -195,3 +197,5 @@ struct CareKitEssentialChartView_Previews: PreviewProvider {
.environment(\.careStore, previewStore)
}
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2024 NetReconLab. All rights reserved.
//

#if canImport(SwiftUI)

import CareKitStore
import Charts
import Foundation
Expand All @@ -17,7 +19,6 @@
/// series, allowing for for several data series to be plotted on a single axis for easy comparison.
public struct CKEDataSeries: Identifiable, Hashable {

#if !swift(<6.0)
/// An enumerator specifying the types of plots that can be used to display data series.
@available(iOS 18.0, macOS 15.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
public enum PlotType: String, CaseIterable, Hashable {
Expand Down Expand Up @@ -54,7 +55,7 @@
domain: domain,
function: function
)
} else {

Check warning on line 58 in Sources/CareKitEssentials/Cards/Shared/Chart/Data/CKEDataSeries.swift

View workflow job for this annotation

GitHub Actions / test (platform=visionOS\ Simulator,name=Apple\ Vision\ Pro CODE_SIGN_IDENTITY="", build)

code after 'throw' will never be executed

Check warning on line 58 in Sources/CareKitEssentials/Cards/Shared/Chart/Data/CKEDataSeries.swift

View workflow job for this annotation

GitHub Actions / test (platform=macOS CODE_SIGN_IDENTITY="", test)

code after 'throw' will never be executed

Check warning on line 58 in Sources/CareKitEssentials/Cards/Shared/Chart/Data/CKEDataSeries.swift

View workflow job for this annotation

GitHub Actions / test (platform=watchOS\ Simulator,name=Apple\ Watch\ Series\ 11\ \(46mm\), build)

code after 'throw' will never be executed
throw CareKitEssentialsError.couldntUnwrapRequiredField
}
case .line:
Expand All @@ -75,14 +76,13 @@
domain: domain,
function: function
)
} else {

Check warning on line 79 in Sources/CareKitEssentials/Cards/Shared/Chart/Data/CKEDataSeries.swift

View workflow job for this annotation

GitHub Actions / test (platform=visionOS\ Simulator,name=Apple\ Vision\ Pro CODE_SIGN_IDENTITY="", build)

code after 'throw' will never be executed

Check warning on line 79 in Sources/CareKitEssentials/Cards/Shared/Chart/Data/CKEDataSeries.swift

View workflow job for this annotation

GitHub Actions / test (platform=macOS CODE_SIGN_IDENTITY="", test)

code after 'throw' will never be executed

Check warning on line 79 in Sources/CareKitEssentials/Cards/Shared/Chart/Data/CKEDataSeries.swift

View workflow job for this annotation

GitHub Actions / test (platform=watchOS\ Simulator,name=Apple\ Watch\ Series\ 11\ \(46mm\), build)

code after 'throw' will never be executed
throw CareKitEssentialsError.couldntUnwrapRequiredField
}
}
}

}
#endif

/// An enumerator specifying the types of marks that can be used to display data series.
public enum MarkType: String, CaseIterable, Hashable {
Expand Down Expand Up @@ -581,3 +581,5 @@
hasher.combine(gradientStartColor)
}
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2024 NetReconLab. All rights reserved.
//

#if canImport(SwiftUI)

import CareKitStore
import SwiftUI
import Charts
Expand Down Expand Up @@ -182,3 +184,5 @@ extension CKEDataSeriesConfiguration {
hasher.combine(gradientStartColor)
}
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2025 Network Reconnaissance Lab. All rights reserved.
//

#if canImport(SwiftUI)

import CareKit
import CareKitStore
import Charts
Expand Down Expand Up @@ -307,3 +309,5 @@ extension CareKitEssentialChartable {
return progressPerPeriodComponent
}
}

#endif
4 changes: 4 additions & 0 deletions Sources/CareKitEssentials/Cards/Shared/CustomLabelView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2022 NetReconLab. All rights reserved.
//

#if canImport(SwiftUI)

import CareKit
import CareKitStore
import CareKitUI
Expand Down Expand Up @@ -225,3 +227,5 @@ struct CustomLabelView_Previews: PreviewProvider {
}
}
}

#endif
4 changes: 4 additions & 0 deletions Sources/CareKitEssentials/Cards/Shared/DetailsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2022 NetReconLab. All rights reserved.
//

#if canImport(SwiftUI)

import CareKitStore
import SwiftUI

Expand Down Expand Up @@ -82,3 +84,5 @@ struct DetailsView_Previews: PreviewProvider {
}
}
}

#endif
4 changes: 4 additions & 0 deletions Sources/CareKitEssentials/Cards/Shared/DismissableView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// Created by Corey Baker on 4/29/25.
//

#if canImport(SwiftUI)

import SwiftUI

struct DismissableView<Content: View>: View {
Expand Down Expand Up @@ -48,3 +50,5 @@ struct DismissableView_Previews: PreviewProvider {
}
}
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
// Copyright © 2024 NetReconLab. All rights reserved.
//

#if canImport(SwiftUI) && !os(watchOS)

import SwiftUI
import CareKit
import CareKitStore
import CareKitUI
import os.log

#if !os(watchOS)

/// A view that wraps any view that is `EventWithContentViewable` and provides
/// the respective view with an up-to-date latest event matching the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
// Copyright © 2024 NetReconLab. All rights reserved.
//

#if canImport(SwiftUI) && !os(watchOS)

import CareKit
import CareKitStore
import CareKitUI
import SwiftUI

#if !os(watchOS)

/// A view that wraps any view that is `EventViewable` and provides
/// the respective view with an up-to-date latest event matching the
/// specified event query.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// Copyright © 2025 Network Reconnaissance Lab. All rights reserved.
//

#if canImport(SwiftUI)
import SwiftUI

extension CKEDataSeries: AXChartDescriptorRepresentable {
Expand Down Expand Up @@ -41,3 +42,4 @@ extension CKEDataSeries: AXChartDescriptorRepresentable {
}

}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2025 Network Reconnaissance Lab. All rights reserved.
//

#if canImport(SwiftUI)

import Charts
import SwiftUI

Expand Down Expand Up @@ -92,3 +94,5 @@ extension CareKitEssentialChartBodyView {
}
}
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2025 Network Reconnaissance Lab. All rights reserved.
//

#if !os(watchOS)
#if canImport(SwiftUI) && !os(watchOS)

import CareKitStore

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2024 Network Reconnaissance Lab. All rights reserved.
//

#if !os(watchOS)
#if canImport(SwiftUI) && !os(watchOS)

import CareKit
import CareKitStore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// Created by Corey Baker on 5/20/23.
//

#if canImport(SwiftUI)

import CareKitStore
import CareKitUI
import Foundation
Expand Down Expand Up @@ -51,3 +53,5 @@ public extension InstructionsTaskView where Header == InformationHeaderView {
)
}
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2024 NetReconLab. All rights reserved.
//

#if !os(watchOS)
#if canImport(SwiftUI) && !os(watchOS)

import CareKit
import CareKitStore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Corey Baker on 5/20/23.
//

#if !os(watchOS)
#if canImport(SwiftUI) && !os(watchOS)

import CareKit
import CareKitStore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2024 NetReconLab. All rights reserved.
//

#if !os(watchOS)
#if canImport(SwiftUI) && !os(watchOS)

import CareKit
import CareKitStore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Corey Baker on 5/20/23.
//

#if !os(watchOS)
#if canImport(SwiftUI) && !os(watchOS)

import CareKit
import CareKitStore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2024 Network Reconnaissance Lab. All rights reserved.
//

#if !os(watchOS)
#if canImport(SwiftUI) && !os(watchOS)

import CareKit
import CareKitStore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// Created by Corey Baker on 5/20/23.
//

#if canImport(SwiftUI)

import CareKitStore
import CareKitUI
import Foundation
Expand Down Expand Up @@ -50,3 +52,5 @@ public extension SimpleTaskView where Header == InformationHeaderView {
)
}
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2022 NetReconLab. All rights reserved.
//

#if canImport(SwiftUI)

import CareKitUI
import CareKitStore
import SwiftUI
Expand Down Expand Up @@ -185,3 +187,5 @@ struct InformationHeaderView_Previews: PreviewProvider {
}
}
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// Created by Corey Baker on 6/24/24.
//

#if canImport(SwiftUI)

import CareKitStore
import SwiftUI

Expand Down Expand Up @@ -167,3 +169,5 @@ extension CareKitEssentialView {
}

}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
// Copyright © 2024 NetReconLab. All rights reserved.
//

#if canImport(SwiftUI) && !os(watchOS)

import CareKit
import CareKitStore
import SwiftUI

#if !os(watchOS)

/// Conforming to this protocol ensures your view
/// consists of the proper initializers to view events.
public protocol EventViewable: View {
Expand Down
Loading
Loading