Otok public index

apotocki/updates

apotocki/updates 2.0.2 (r1, apple)

Library
updates
Variant
apple, target apple
Channel
stable
Published
2026-11-07
Recipe source
https://github.com/otok-dev/recipes
32756a87cf5bd189ca4c9825159bf0713ea8cf5e in recipes/updates/2.0/apple/
Recipe SHA-256
a652f376a48d1d2449a18027815daeac8071edceb46b5d8f19cad033cdeb3327

Inputs

source.commit388bc6369ca5b83a41b77743d8a62902b6ff7ef3
source.githttps://github.com/rwbutler/Updates
source.tag2.0.2

Platforms

ios, iossim, macosx, catalyst

Recipe files

patches/0001-itunes-https.patch 912 bytes · raw
diff --git a/Updates/Classes/Services/App Metadata/Implementation/ITunesSearchAPIService.swift b/Updates/Classes/Services/App Metadata/Implementation/ITunesSearchAPIService.swift
index 376a7ac..93e2d1f 100644
--- a/Updates/Classes/Services/App Metadata/Implementation/ITunesSearchAPIService.swift	
+++ b/Updates/Classes/Services/App Metadata/Implementation/ITunesSearchAPIService.swift	
@@ -17,7 +17,7 @@ struct ITunesSearchAPIService: AppMetadataService {
 
     init?(bundleIdentifier: String, countryCode: String) {
         let lowercasedCountryCode = countryCode.lowercased()
-        let urlString = "http://itunes.apple.com/lookup?bundleId=\(bundleIdentifier)&country=\(lowercasedCountryCode)"
+        let urlString = "https://itunes.apple.com/lookup?bundleId=\(bundleIdentifier)&country=\(lowercasedCountryCode)"
         guard let url = URL(string: urlString) else {
             return nil
         }
patches/0002-ui-for-uikit.patch 1435 bytes · raw
diff --git a/Package.swift b/Package.swift
index 61986fb..2f1c9c2 100644
--- a/Package.swift
+++ b/Package.swift
@@ -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")]
         )
     ]
diff --git a/Updates/Classes/UI/Updates+UIDevice.swift b/Updates/Classes/UI/Updates+UIDevice.swift
index 28466c2..f8ffbfd 100644
--- a/Updates/Classes/UI/Updates+UIDevice.swift
+++ b/Updates/Classes/UI/Updates+UIDevice.swift
@@ -5,6 +5,8 @@
 //  Created by Ross Butler on 8/8/19.
 //
 
+// UIKit only: the package also builds for macOS, which these files are not for (otok recipe patch)
+#if canImport(UIKit)
 import Foundation
 import UIKit
 
@@ -15,3 +17,4 @@ public extension Updates {
     }
     
 }
+#endif
diff --git a/Updates/Classes/UI/UpdatesUI.swift b/Updates/Classes/UI/UpdatesUI.swift
index f3f4ca7..446f4ae 100644
--- a/Updates/Classes/UI/UpdatesUI.swift
+++ b/Updates/Classes/UI/UpdatesUI.swift
@@ -5,6 +5,8 @@
 //  Created by Ross Butler on 12/27/18.
 //
 
+// UIKit only: the package also builds for macOS, which these files are not for (otok recipe patch)
+#if canImport(UIKit)
 import Foundation
 import StoreKit
 import SafariServices
@@ -248,3 +250,4 @@ private extension UpdatesUI {
     }
     
 }
+#endif
recipe.toml 978 bytes · raw
[recipe]
api = 1
library = "updates"
name = "updates"
version = "2.0.2"
revision = 1
license = "MIT"
license-files = ["LICENSE"]
description = "Checks the App Store for a newer version of the app and prompts the user to update."
homepage = "https://github.com/rwbutler/Updates"
keywords = ["app-store", "updates", "swift"]

# Unmaintained upstream: the App Store lookup goes over http://, which App Transport Security blocks (0001);
# Package.swift leaves out the UI (UpdatesUI, checkForUpdates without an OS version), which CocoaPods
# had, because the package also builds for macOS: 0002 takes it in behind canImport(UIKit).
[source]
git = "https://github.com/rwbutler/Updates"
commit = "388bc6369ca5b83a41b77743d8a62902b6ff7ef3"
tag = "2.0.2"
patches = ["patches/0001-itunes-https.patch", "patches/0002-ui-for-uikit.patch"]

[platforms]
supported = ["ios", "iossim", "macosx", "catalyst"]
build-on = ["macos/xcode"]

[apple]
swift-package = "."

[[product]]
name = "Updates"