Skip to content

Commit

Permalink
Set minimum iOS support to iOS 11
Browse files Browse the repository at this point in the history
  • Loading branch information
antranapp committed Dec 17, 2022
1 parent 036f820 commit 05ab3e5
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import XCTest
@testable import Diagnostics
#if canImport(MessageUI)
import MessageUI

final class MFMailComposeViewControllerTests: XCTestCase {
Expand Down Expand Up @@ -49,3 +50,4 @@ private final class MockedMFMailComposeViewController: MFMailComposeViewControll
self.filename = filename
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import XCTest
@testable import Diagnostics
import Combine

@available(iOS 13, *)
final class UpdateAvailableInsightTests: XCTestCase {

let exampleError = NSError(domain: UUID().uuidString, code: -1, userInfo: nil)
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import PackageDescription
let package = Package(name: "Diagnostics",
platforms: [
.macOS(.v10_15),
.iOS(.v13),
.iOS(.v11),
.tvOS(.v12),
.watchOS(.v6)],
products: [
Expand Down
9 changes: 8 additions & 1 deletion Sources/Reporters/SmartInsightsReporter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,19 @@ public struct SmartInsightsReporter: DiagnosticsReporting {
init() {
var defaultInsights: [SmartInsightProviding?] = [
DeviceStorageInsight(),
UpdateAvailableInsight()
]
#if os(iOS) && !targetEnvironment(macCatalyst)
defaultInsights.append(CellularAllowedInsight())
#endif

#if os(iOS)
if #available(iOS 13, *) {
defaultInsights.append(UpdateAvailableInsight())
}
#else
defaultInsights.append(UpdateAvailableInsight())
#endif

insights = defaultInsights.compactMap { $0 }
}

Expand Down
1 change: 1 addition & 0 deletions Sources/SmartInsights/UpdateAvailableInsight.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import Combine

/// Uses the bundle identifier to fetch latest version information and provides insights into whether
/// an app update is available.
@available(iOS 13, *)
struct UpdateAvailableInsight: SmartInsightProviding {

let name = "Update available"
Expand Down

0 comments on commit 05ab3e5

Please sign in to comment.