Skip to content

Commit 9681cf9

Browse files
committed
Added an availability check for async methods
1 parent 3486f66 commit 9681cf9

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

TypographyKit/Classes/TypographyKit.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ public struct TypographyKit {
9191
}
9292

9393
/// Requires iOS 13 in order to use as part of a task; otherwise must use the `await` keyword.
94+
@available(iOS 13.0, *)
9495
@discardableResult
9596
public static func configure(
9697
with configuration: TypographyKitConfiguration = TypographyKitConfiguration.default
@@ -151,6 +152,7 @@ public struct TypographyKit {
151152
}
152153
}
153154

155+
@available(iOS 13.0, *)
154156
public static func refresh() async {
155157
guard let settings = Self.settings else {
156158
return
@@ -376,6 +378,7 @@ private extension TypographyKit {
376378

377379
static var settings: TypographyKitSettings?
378380

381+
@available(iOS 13.0, *)
379382
static func loadSettings(configurationURL: URL?) async -> TypographyKitSettings? {
380383
guard let configurationURL = configurationURL, let data = try? Data(contentsOf: configurationURL) else {
381384
guard case let .success(model) = loadSettings(from: nil) else { // Data not received - load from cache.

0 commit comments

Comments
 (0)