🧱 Import only Foundation instead of Cocoa

This commit is contained in:
Chris Araman 2021-04-14 12:08:55 -07:00
parent 99bd7533b1
commit f28c2a4232
No known key found for this signature in database
GPG key ID: BB4499D9E11B61E0
15 changed files with 23 additions and 3 deletions

View file

@ -6,6 +6,8 @@
// Copyright © 2018 mas-cli. All rights reserved.
//
import Foundation
/// Utility for managing installed apps.
public protocol AppLibrary {
/// Entire set of installed apps.

View file

@ -6,6 +6,8 @@
// Copyright © 2018 mas-cli. All rights reserved.
//
import Foundation
/// Manages searching the MAS catalog through the iTunes Search and Lookup APIs.
public class MasStoreSearch: StoreSearch {
private let networkManager: NetworkManager

View file

@ -6,6 +6,8 @@
// Copyright © 2018 mas-cli. All rights reserved.
//
import Foundation
/// Protocol for searching the MAS catalog.
public protocol StoreSearch {
func lookup(app appId: Int) throws -> SearchResult?

View file

@ -6,6 +6,8 @@
// Copyright © 2019 mas-cli. All rights reserved.
//
import Foundation
/// CLI command
public protocol ExternalCommand {
var binaryPath: String { get set }

View file

@ -6,6 +6,8 @@
// Copyright © 2019 mas-cli. All rights reserved.
//
import Foundation
/// Wrapper for the external open system command.
/// https://ss64.com/osx/open.html
public struct OpenSystemCommand: ExternalCommand {

View file

@ -6,6 +6,8 @@
// Copyright © 2016 Andrew Naylor. All rights reserved.
//
import Foundation
/// A collection of output formatting helpers
/// Terminal Control Sequence Indicator

View file

@ -6,6 +6,8 @@
// Copyright © 2018 mas-cli. All rights reserved.
//
import Foundation
/// Protocol describing the members of CKSoftwareProduct used throughout MasKit.
public protocol SoftwareProduct {
var appName: String { get }

View file

@ -6,6 +6,8 @@
// Copyright © 2019 mas-cli. All rights reserved.
//
import Foundation
enum NetworkResult {
case success(Data)
case failure(Error)

View file

@ -6,6 +6,8 @@
// Copyright © 2019 mas-cli. All rights reserved.
//
import Foundation
@objc public protocol NetworkSession {
@objc func loadData(from url: URL, completionHandler: @escaping (Data?, Error?) -> Void)
}

View file

@ -6,7 +6,7 @@
// Copyright © 2018 Andrew Naylor. All rights reserved.
//
@import Cocoa;
@import Foundation;
//! Project version number for MasKit.
FOUNDATION_EXPORT double MasKitVersionNumber;

View file

@ -6,6 +6,7 @@
// Copyright © 2019 mas-cli. All rights reserved.
//
import Foundation
@testable import MasKit
class OpenSystemCommandMock: ExternalCommand {

View file

@ -6,6 +6,7 @@
// Copyright © 2018 mas-cli. All rights reserved.
//
import Foundation
@testable import MasKit
struct SoftwareProductMock: SoftwareProduct {

View file

@ -6,6 +6,7 @@
// Copyright © 2018 mas-cli. All rights reserved.
//
import Foundation
import MasKit
/// Mock NetworkSession for testing.

View file

@ -6,6 +6,7 @@
// Copyright © 2019 mas-cli. All rights reserved.
//
import Foundation
import MasKit
/// Mock NetworkSession for testing with saved JSON response payload files.

View file

@ -290,7 +290,6 @@
F80B27B52611116A00A285C9 /* AppListFormatterSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppListFormatterSpec.swift; sourceTree = "<group>"; };
F80B27B92611118E00A285C9 /* AppListFormatter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppListFormatter.swift; sourceTree = "<group>"; };
F8242D8020746A510026DF35 /* StoreAccount.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoreAccount.swift; sourceTree = "<group>"; };
F83213A42173EF75008BA8A0 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
F83213A52173EF75008BA8A0 /* StoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreFoundation.framework; path = /System/Library/PrivateFrameworks/StoreFoundation.framework; sourceTree = "<absolute>"; };
F83213A62173EF75008BA8A0 /* CommerceKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CommerceKit.framework; path = /System/Library/PrivateFrameworks/CommerceKit.framework; sourceTree = "<absolute>"; };
F85DA8AD240C313900FE5650 /* MasAppLibrarySpec.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MasAppLibrarySpec.swift; sourceTree = "<group>"; };
@ -639,7 +638,6 @@
EDFC76381B642A2E00D0DBD7 /* Frameworks */ = {
isa = PBXGroup;
children = (
F83213A42173EF75008BA8A0 /* Cocoa.framework */,
F83213A62173EF75008BA8A0 /* CommerceKit.framework */,
F83213A52173EF75008BA8A0 /* StoreFoundation.framework */,
);