Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
1 change: 0 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ let package = Package(
name: "Updates",
dependencies: [],
path: "Updates/Classes",
exclude: ["UI"],
resources: [.copy("../../Example/Pods/Target Support Files/Updates/PrivacyInfo.xcprivacy")]
)
]
Expand Down
16 changes: 13 additions & 3 deletions Updates/Classes/Core/Updates.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class Updates {
/// - appStoreId: The app store identifier specified as a String.
/// - Returns: The URL required to launch the App Store page for the specified app,
/// provided a valid identifier is provided.
static func appStoreURL(for appStoreId: String) -> URL? {
public static func appStoreURL(for appStoreId: String) -> URL? {
Updates.appStoreId = appStoreId
return appStoreURL
}
Expand Down Expand Up @@ -78,7 +78,7 @@ public class Updates {

public static var notifying: NotificationMode = .once

public static var minimumOSVersion: String?
public static var minimumOSVersion: String? = Bundle.main.infoDictionary?["MinimumOSVersion"] as? String

public static var minimumOptionalAppVersion: String?

Expand Down Expand Up @@ -187,8 +187,18 @@ public class Updates {
releaseNotes: releaseNotes,
updateType: updateType,
updatingMode: updatingMode,
latestVersion: versionString
latestVersion: newVersionString
)
}

}

#if canImport(UIKit)
import UIKit

public extension Updates {
static func checkForUpdates(completion: @escaping (UpdatesResult) -> Void) {
Updates.checkForUpdates(currentOSVersion: UIDevice.current.systemVersion, completion: completion)
}
}
#endif
17 changes: 0 additions & 17 deletions Updates/Classes/UI/Updates+UIDevice.swift

This file was deleted.

3 changes: 3 additions & 0 deletions Updates/Classes/UI/UpdatesUI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
// Created by Ross Butler on 12/27/18.
//

#if canImport(UIKit)
import Foundation
import StoreKit
import SafariServices
import Updates

public class UpdatesUI: NSObject {

Expand Down Expand Up @@ -248,3 +250,4 @@ private extension UpdatesUI {
}

}
#endif