Skip to content

Commit

Permalink
Merge pull request #112 from getditto/BP/ios_14
Browse files Browse the repository at this point in the history
Bump minimum iOS version to 14 instead of 11
  • Loading branch information
bplattenburg authored May 13, 2024
2 parents 4bddd6e + 96864b1 commit 1d26674
Show file tree
Hide file tree
Showing 16 changed files with 2 additions and 24 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import PackageDescription
let package = Package(
name: "DittoSwiftTools",
platforms: [
.iOS(.v11),
.iOS(.v14),
.macOS(.v11),
],
products: [
Expand Down
1 change: 0 additions & 1 deletion Sources/DittoDataBrowser/DataBrowser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import SwiftUI
import DittoSwift

@available(iOS 14.0, *)
public struct DataBrowser: View {

@StateObject var viewModel: DataBrowserViewModel
Expand Down
1 change: 0 additions & 1 deletion Sources/DittoDataBrowser/DataBrowserViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import SwiftUI
import DittoSwift

@available(iOS 13.0, *)
class DataBrowserViewModel: ObservableObject {

@Published var collections: [DittoCollection]?
Expand Down
1 change: 0 additions & 1 deletion Sources/DittoDataBrowser/DocumentsViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import Foundation
import DittoSwift
import OrderedCollections

@available(iOS 13.0, *)
class DocumentsViewModel : ObservableObject {

let collectionName: String
Expand Down
3 changes: 0 additions & 3 deletions Sources/DittoDiskUsage/DittoDiskUsageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ fileprivate struct DiskUsageState {
let error: String?
}

@available(iOS 14, *)
class DiskUsageViewModel: ObservableObject {

@Published fileprivate var diskUsage: DiskUsageState?
Expand Down Expand Up @@ -85,7 +84,6 @@ class DiskUsageViewModel: ObservableObject {
}
}

@available(iOS 14, *)
public struct DittoDiskUsageView: View {

@Environment(\.presentationMode) var presentationMode
Expand Down Expand Up @@ -157,7 +155,6 @@ public struct DittoDiskUsageView: View {
}
}

@available(iOS 14, *)
struct DittoDiskUsageView_Previews: PreviewProvider {
static var previews: some View {
DittoDiskUsageView(ditto: Ditto())
Expand Down
2 changes: 0 additions & 2 deletions Sources/DittoExportData/ExportData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import SwiftUI
import UIKit
#endif


@available(iOS 13.0, *)
public struct ExportData: UIViewControllerRepresentable {

private let ditto: Ditto
Expand Down
2 changes: 0 additions & 2 deletions Sources/DittoExportLogs/ExportLogs.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import SwiftUI
import UIKit
#endif


@available(iOS 13.0, *)
public struct ExportLogs: UIViewControllerRepresentable {

public init() {}
Expand Down
1 change: 0 additions & 1 deletion Sources/DittoHeartbeat/HeartbeatVM.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import SwiftUI

public typealias HeartbeatCallback = (DittoHeartbeatInfo) -> Void

@available(iOS 13, *)
public class HeartbeatVM: ObservableObject {
@Published public var isEnabled = false
private var hbConfig: DittoHeartbeatConfig?
Expand Down
1 change: 0 additions & 1 deletion Sources/DittoPeersList/DittoPeer+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import Foundation
import DittoSwift
import CryptoKit

@available(iOS 13.0, *)
extension DittoPeer {
var peerSDKVersion: String {
let sdk = "SDK "
Expand Down
3 changes: 0 additions & 3 deletions Sources/DittoPermissionsHealth/BluetoothManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import CoreBluetooth
import DittoHealthMetrics
import Foundation

@available(iOS 13.0, *)
public class BluetoothManager: NSObject, ObservableObject {
private var centralManager: CBCentralManager!
private var cancellables = Set<AnyCancellable>()
Expand Down Expand Up @@ -90,15 +89,13 @@ public class BluetoothManager: NSObject, ObservableObject {
}
}

@available(iOS 13.0, *)
extension BluetoothManager: CBCentralManagerDelegate {
public func centralManagerDidUpdateState(_ central: CBCentralManager) {
// This delegate method is called when there's a change in the manager's state.
// We don't need to do anything here since we're observing the state using Combine.
}
}

@available(iOS 13.0, *)
extension BluetoothManager: HealthMetricProvider {
public var metricName: String {
DittoPermissionsHealthConstants.bluetoothManagerHealthMetricName
Expand Down
2 changes: 0 additions & 2 deletions Sources/DittoPermissionsHealth/NetworkManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import Combine
import DittoHealthMetrics
import Network

@available(iOS 13.0, *)
public class NetworkManager: NSObject, ObservableObject {
@Published var isWifiEnabled = false

Expand All @@ -30,7 +29,6 @@ public class NetworkManager: NSObject, ObservableObject {
}
}

@available(iOS 13.0, *)
extension NetworkManager: HealthMetricProvider {
public var metricName: String {
DittoPermissionsHealthConstants.networkManagerHealthMetricName
Expand Down
1 change: 0 additions & 1 deletion Sources/DittoPermissionsHealth/PermissionsHealth.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import SwiftUI
import Combine

@available(iOS 14.0, *)
public struct PermissionsHealth: View {
@ObservedObject var bluetoothManager = BluetoothManager()
@ObservedObject var networkManager = NetworkManager()
Expand Down
1 change: 0 additions & 1 deletion Sources/DittoPresenceDegradation/NewSessionView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import SwiftUI

@available(iOS 14.0, *)
public struct NewSessionView: View {

@Binding private var expectedPeers: Int
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import DittoSwift
import CryptoKit
import Combine

@available(iOS 13.0, *)
class PresenceDegradationVM: ObservableObject {

@Published var expectedPeers: Int = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import SwiftUI
import DittoSwift

@available(iOS 14.0, *)
public struct PresenceDegradationView: View {

@StateObject var vm: PresenceDegradationVM
Expand Down
3 changes: 1 addition & 2 deletions Sources/DittoPresenceViewer/PresenceView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import UIKit
import AppKit
#endif

@available(iOS 13, macOS 10.15, *)
@available(macOS 10.15, *)
public struct PresenceView: View {
public var ditto: Ditto

Expand All @@ -34,7 +34,6 @@ public struct PresenceView: View {

// MARK: - UIViewRepresentable
#if os(iOS)
@available(iOS 13, *)
extension PresenceView: UIViewRepresentable {
public typealias Body = Never
public typealias UIViewType = UIView
Expand Down

0 comments on commit 1d26674

Please sign in to comment.