Build Information
Failed to build GameCenterKit, reference 0.7.1 (cd3ffa), with Swift 6.1 for macOS (SPM) on 28 Aug 2025 20:46:07 UTC.
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64Build Log
========================================
RunAll
========================================
Builder version: 4.67.1
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/fserrazes/GameCenterKit.git
Reference: 0.7.1
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/fserrazes/GameCenterKit
* tag 0.7.1 -> FETCH_HEAD
HEAD is now at cd3ffab fix: Fatal error (TASK CONTINUATION MISUSE Authenticate() tried to resume its continuation more than once, returning true! This happen when the system presents a sign-in UI, dismisses it, or changes authentication state and completion gets called called every time that happens.
Cloned https://github.com/fserrazes/GameCenterKit.git
Revision (git rev-parse @):
cd3ffab0cc67c610584fdb80628841c06f323c0b
SUCCESS checkout https://github.com/fserrazes/GameCenterKit.git at 0.7.1
========================================
ResolveProductDependencies
========================================
Resolving dependencies ...
{
"identity": ".resolve-product-dependencies",
"name": "resolve-dependencies",
"url": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"dependencies": [
{
"identity": "gamecenterkit",
"name": "GameCenterKit",
"url": "https://github.com/fserrazes/GameCenterKit.git",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/GameCenterKit",
"dependencies": [
]
}
]
}
Fetching https://github.com/fserrazes/GameCenterKit.git
[1/211] Fetching gamecenterkit
Fetched https://github.com/fserrazes/GameCenterKit.git from cache (0.69s)
Creating working copy for https://github.com/fserrazes/GameCenterKit.git
Working copy of https://github.com/fserrazes/GameCenterKit.git resolved at 0.7.1 (cd3ffab)
warning: '.resolve-product-dependencies': dependency 'gamecenterkit' is not used by any target
Found 0 product dependencies
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.1
Building package at path: $PWD
https://github.com/fserrazes/GameCenterKit.git
https://github.com/fserrazes/GameCenterKit.git
{
"dependencies" : [
],
"manifest_display_name" : "GameCenterKit",
"name" : "GameCenterKit",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "14.0"
}
],
"products" : [
{
"name" : "GameCenterKit",
"targets" : [
"GameCenterKit"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "GameCenterKit",
"module_type" : "SwiftTarget",
"name" : "GameCenterKit",
"path" : "Sources",
"product_memberships" : [
"GameCenterKit"
],
"sources" : [
"GameCenterKit/GKPlayer+Extensions.swift",
"GameCenterKit/GameCenterKit.swift",
"GameCenterKit/GameCenterView.swift",
"GameCenterKit/PlayerEntry.swift"
],
"type" : "library"
}
],
"tools_version" : "5.5"
}
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-2F0A5646E1D333AE.txt
[3/7] Compiling GameCenterKit PlayerEntry.swift
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/PlayerEntry.swift:9:23: error: 'Image' is only available in macOS 10.15 or newer
4 | import SwiftUI
5 |
6 | public struct PlayerEntry: Identifiable {
| `- note: add @available attribute to enclosing struct
7 | public let id: String
8 | public let displayName: String
9 | public let photo: Image?
| `- error: 'Image' is only available in macOS 10.15 or newer
10 | public let leaderboard: Leaderboard
11 |
[4/7] Compiling GameCenterKit GameCenterView.swift
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterView.swift:19:47: error: cannot find type 'Context' in scope
17 | }
18 |
19 | public func makeUIViewController(context: Context) -> GKGameCenterViewController {
| `- error: cannot find type 'Context' in scope
20 | let gameCenterViewController = viewController
21 | gameCenterViewController.gameCenterDelegate = context.coordinator
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterView.swift:25:97: error: cannot find type 'Context' in scope
23 | }
24 |
25 | public func updateUIViewController(_ uiViewController: GKGameCenterViewController, context: Context) {
| `- error: cannot find type 'Context' in scope
26 | return
27 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterView.swift:8:31: error: cannot find type 'UIViewControllerRepresentable' in scope
6 |
7 | /// Presents the game center view provided by GameKit.
8 | public struct GameCenterView: UIViewControllerRepresentable {
| `- error: cannot find type 'UIViewControllerRepresentable' in scope
9 | let viewController: GKGameCenterViewController
10 |
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterView.swift:12:31: error: 'init(state:)' is only available in macOS 11.0 or newer
6 |
7 | /// Presents the game center view provided by GameKit.
8 | public struct GameCenterView: UIViewControllerRepresentable {
| `- note: add @available attribute to enclosing struct
9 | let viewController: GKGameCenterViewController
10 |
11 | public init(viewState: GKGameCenterViewControllerState = .default) {
| `- note: add @available attribute to enclosing initializer
12 | self.viewController = GKGameCenterViewController(state: viewState)
| |- error: 'init(state:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
13 | }
14 |
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterView.swift:12:31: warning: call to main actor-isolated initializer 'init(state:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
10 |
11 | public init(viewState: GKGameCenterViewControllerState = .default) {
12 | self.viewController = GKGameCenterViewController(state: viewState)
| `- warning: call to main actor-isolated initializer 'init(state:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
13 | }
14 |
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/GameKit.framework/Headers/GKGameCenterViewController.h:54:1: note: calls to initializer 'init(state:)' from outside of its actor context are implicitly asynchronous
52 | Use this to display content associated with the specified state. For example setting the state to GKGameCenterViewControllerStateLeaderboards will display a list of leaderboard sets or leaderboards (if no sets). Setting state to GKGameCenterViewControllerStateAchievements will display a list of achievements.
53 | */
54 | - (instancetype)initWithState:(GKGameCenterViewControllerState)state API_AVAILABLE(ios(14.0), macos(11.0), tvos(14.0));
| |- note: calls to initializer 'init(state:)' from outside of its actor context are implicitly asynchronous
| `- note: main actor isolation inferred from inheritance from class 'NSViewController'
55 |
56 | /**
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterView.swift:38:41: error: extraneous argument label 'animated:' in call
36 |
37 | public func gameCenterViewControllerDidFinish(_ gameCenterViewController: GKGameCenterViewController) {
38 | gameCenterViewController.dismiss(animated: true)
| `- error: extraneous argument label 'animated:' in call
39 | }
40 | }
error: emit-module command failed with exit code 1 (use -v to see invocation)
[5/7] Emitting module GameCenterKit
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GKPlayer+Extensions.swift:7:59: error: cannot find type 'UIImage' in scope
5 |
6 | extension GKPlayer {
7 | func loadPhoto(for size: GKPlayer.PhotoSize) async -> UIImage? {
| `- error: cannot find type 'UIImage' in scope
8 | await withCheckedContinuation { continuation in
9 | self.loadPhoto(for: size) { photo, _ in
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:12:26: error: 'Logger' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
| `- error: 'Logger' is only available in macOS 11.0 or newer
13 | private(set) var localPlayer = GKLocalPlayer.local
14 |
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:20:23: warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
18 |
19 | // Create as a Singleton to avoid more than one instance.
20 | public static var shared: GameCenterKit = GameCenterKit()
| |- warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'shared' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
21 |
22 | private override init() {
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:269:48: error: cannot find type 'UIViewController' in scope
267 | /// - viewController: The view controller to present GameKit's view controller from.
268 | /// - viewState: The state in which to present the new view controller
269 | public func showGameCenter(viewController: UIViewController, viewState: GKGameCenterViewControllerState = .default) throws {
| `- error: cannot find type 'UIViewController' in scope
270 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
271 |
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterView.swift:19:47: error: cannot find type 'Context' in scope
17 | }
18 |
19 | public func makeUIViewController(context: Context) -> GKGameCenterViewController {
| `- error: cannot find type 'Context' in scope
20 | let gameCenterViewController = viewController
21 | gameCenterViewController.gameCenterDelegate = context.coordinator
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterView.swift:25:97: error: cannot find type 'Context' in scope
23 | }
24 |
25 | public func updateUIViewController(_ uiViewController: GKGameCenterViewController, context: Context) {
| `- error: cannot find type 'Context' in scope
26 | return
27 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterView.swift:8:31: error: cannot find type 'UIViewControllerRepresentable' in scope
6 |
7 | /// Presents the game center view provided by GameKit.
8 | public struct GameCenterView: UIViewControllerRepresentable {
| `- error: cannot find type 'UIViewControllerRepresentable' in scope
9 | let viewController: GKGameCenterViewController
10 |
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/PlayerEntry.swift:9:23: error: 'Image' is only available in macOS 10.15 or newer
4 | import SwiftUI
5 |
6 | public struct PlayerEntry: Identifiable {
| `- note: add @available attribute to enclosing struct
7 | public let id: String
8 | public let displayName: String
9 | public let photo: Image?
| `- error: 'Image' is only available in macOS 10.15 or newer
10 | public let leaderboard: Leaderboard
11 |
[6/7] Compiling GameCenterKit GKPlayer+Extensions.swift
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GKPlayer+Extensions.swift:7:59: error: cannot find type 'UIImage' in scope
5 |
6 | extension GKPlayer {
7 | func loadPhoto(for size: GKPlayer.PhotoSize) async -> UIImage? {
| `- error: cannot find type 'UIImage' in scope
8 | await withCheckedContinuation { continuation in
9 | self.loadPhoto(for: size) { photo, _ in
[7/7] Compiling GameCenterKit GameCenterKit.swift
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:12:26: error: 'Logger' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
| `- error: 'Logger' is only available in macOS 11.0 or newer
13 | private(set) var localPlayer = GKLocalPlayer.local
14 |
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:20:23: warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
18 |
19 | // Create as a Singleton to avoid more than one instance.
20 | public static var shared: GameCenterKit = GameCenterKit()
| |- warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'shared' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
21 |
22 | private override init() {
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:269:48: error: cannot find type 'UIViewController' in scope
267 | /// - viewController: The view controller to present GameKit's view controller from.
268 | /// - viewState: The state in which to present the new view controller
269 | public func showGameCenter(viewController: UIViewController, viewState: GKGameCenterViewControllerState = .default) throws {
| `- error: cannot find type 'UIViewController' in scope
270 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
271 |
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:36:30: error: 'OSLogMessage' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
29 | /// Otherwise, present the view controller so the player can perform any additional actions to complete authentication.
30 | /// - Returns: Player autentication status.
31 | public func authenticate(completion: @escaping (Bool) -> Void) {
| `- note: add @available attribute to enclosing instance method
32 | guard !isAuthenticated else { completion(true); return }
33 |
34 | localPlayer.authenticateHandler = { [self] (viewController, error) in
35 | guard error == nil else {
36 | logger.error("Error on user authentication: \(error)")
| |- error: 'OSLogMessage' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
37 | completion(false)
38 | return
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:36:62: error: 'appendInterpolation(_:privacy:attributes:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
29 | /// Otherwise, present the view controller so the player can perform any additional actions to complete authentication.
30 | /// - Returns: Player autentication status.
31 | public func authenticate(completion: @escaping (Bool) -> Void) {
| `- note: add @available attribute to enclosing instance method
32 | guard !isAuthenticated else { completion(true); return }
33 |
34 | localPlayer.authenticateHandler = { [self] (viewController, error) in
35 | guard error == nil else {
36 | logger.error("Error on user authentication: \(error)")
| |- error: 'appendInterpolation(_:privacy:attributes:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
37 | completion(false)
38 | return
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:41:13: error: 'GKAccessPoint' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
29 | /// Otherwise, present the view controller so the player can perform any additional actions to complete authentication.
30 | /// - Returns: Player autentication status.
31 | public func authenticate(completion: @escaping (Bool) -> Void) {
| `- note: add @available attribute to enclosing instance method
32 | guard !isAuthenticated else { completion(true); return }
33 |
:
39 | }
40 |
41 | GKAccessPoint.shared.isActive = false
| |- error: 'GKAccessPoint' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
42 |
43 | if self.localPlayer.isAuthenticated {
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:56:15: error: 'withCheckedContinuation(isolation:function:_:)' is only available in macOS 10.15 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
53 | /// Otherwise, present the view controller so the player can perform any additional actions to complete authentication.
54 | /// - Returns: Player autentication status.
55 | public func authenticate() async -> Bool {
| `- note: add @available attribute to enclosing instance method
56 | await withCheckedContinuation { continuation in
| |- error: 'withCheckedContinuation(isolation:function:_:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
57 | var hasResumed = false
58 |
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:56:40: error: 'isolation()' is only available in macOS 10.15 or newer
`- /Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:56:39: note: expanded code originates here
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
53 | /// Otherwise, present the view controller so the player can perform any additional actions to complete authentication.
54 | /// - Returns: Player autentication status.
55 | public func authenticate() async -> Bool {
| `- note: add @available attribute to enclosing instance method
56 | await withCheckedContinuation { continuation in
+--- /Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift
|54 |
|55 |
|56 | #isolation
| | `- error: 'isolation()' is only available in macOS 10.15 or newer
+-----------------------------------------------------------------------------------------
57 | var hasResumed = false
58 |
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:79:73: error: 'loadLeaderboards(IDs:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
73 | /// - Parameter identifier: leaderboard id defined in App Store Connect.
74 | /// - Returns: Player score's, if a previous score was submitted.
75 | public func retrieveScore(identifier: String) async throws -> Int? {
| `- note: add @available attribute to enclosing instance method
76 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
77 |
78 | do {
79 | let leaderboards: [GKLeaderboard] = try await GKLeaderboard.loadLeaderboards(IDs: [identifier])
| |- error: 'loadLeaderboards(IDs:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
80 | if leaderboards.isEmpty {
81 | logger.warning("Leaderboad with \(identifier) is empty")
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:81:32: error: 'OSLogMessage' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
73 | /// - Parameter identifier: leaderboard id defined in App Store Connect.
74 | /// - Returns: Player score's, if a previous score was submitted.
75 | public func retrieveScore(identifier: String) async throws -> Int? {
| `- note: add @available attribute to enclosing instance method
76 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
77 |
:
79 | let leaderboards: [GKLeaderboard] = try await GKLeaderboard.loadLeaderboards(IDs: [identifier])
80 | if leaderboards.isEmpty {
81 | logger.warning("Leaderboad with \(identifier) is empty")
| |- error: 'OSLogMessage' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
82 | throw GameCenterError.emptyLeaderboad(identifier)
83 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:81:50: error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
73 | /// - Parameter identifier: leaderboard id defined in App Store Connect.
74 | /// - Returns: Player score's, if a previous score was submitted.
75 | public func retrieveScore(identifier: String) async throws -> Int? {
| `- note: add @available attribute to enclosing instance method
76 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
77 |
:
79 | let leaderboards: [GKLeaderboard] = try await GKLeaderboard.loadLeaderboards(IDs: [identifier])
80 | if leaderboards.isEmpty {
81 | logger.warning("Leaderboad with \(identifier) is empty")
| |- error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
82 | throw GameCenterError.emptyLeaderboad(identifier)
83 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:84:67: error: 'loadEntries(for:timeScope:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
73 | /// - Parameter identifier: leaderboard id defined in App Store Connect.
74 | /// - Returns: Player score's, if a previous score was submitted.
75 | public func retrieveScore(identifier: String) async throws -> Int? {
| `- note: add @available attribute to enclosing instance method
76 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
77 |
:
82 | throw GameCenterError.emptyLeaderboad(identifier)
83 | }
84 | let (localPlayerEntry, _) = try await leaderboards[0].loadEntries(for: [localPlayer], timeScope: .allTime)
| |- error: 'loadEntries(for:timeScope:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
85 | return localPlayerEntry?.score
86 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:87:26: error: 'OSLogMessage' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
73 | /// - Parameter identifier: leaderboard id defined in App Store Connect.
74 | /// - Returns: Player score's, if a previous score was submitted.
75 | public func retrieveScore(identifier: String) async throws -> Int? {
| `- note: add @available attribute to enclosing instance method
76 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
77 |
:
85 | return localPlayerEntry?.score
86 | } catch {
87 | logger.error("Error to retrieve leaderboad \(identifier) score: \(error)")
| |- error: 'OSLogMessage' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
88 | throw GameCenterError.failure(error)
89 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:87:57: error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
73 | /// - Parameter identifier: leaderboard id defined in App Store Connect.
74 | /// - Returns: Player score's, if a previous score was submitted.
75 | public func retrieveScore(identifier: String) async throws -> Int? {
| `- note: add @available attribute to enclosing instance method
76 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
77 |
:
85 | return localPlayerEntry?.score
86 | } catch {
87 | logger.error("Error to retrieve leaderboad \(identifier) score: \(error)")
| |- error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
88 | throw GameCenterError.failure(error)
89 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:87:78: error: 'appendInterpolation(_:privacy:attributes:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
73 | /// - Parameter identifier: leaderboard id defined in App Store Connect.
74 | /// - Returns: Player score's, if a previous score was submitted.
75 | public func retrieveScore(identifier: String) async throws -> Int? {
| `- note: add @available attribute to enclosing instance method
76 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
77 |
:
85 | return localPlayerEntry?.score
86 | } catch {
87 | logger.error("Error to retrieve leaderboad \(identifier) score: \(error)")
| |- error: 'appendInterpolation(_:privacy:attributes:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
88 | throw GameCenterError.failure(error)
89 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:107:73: error: 'loadLeaderboards(IDs:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
98 | /// - Parameter identifier: leaderboard id defined in App Store Connect.
99 | /// - Returns: Current and previous player rank's, if any score was submitted.
100 | public func retrieveRank(identifier: String) async throws -> (current: Int?, previous: Int?) {
| `- note: add @available attribute to enclosing instance method
101 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
102 |
:
105 |
106 | do {
107 | let leaderboards: [GKLeaderboard] = try await GKLeaderboard.loadLeaderboards(IDs: [identifier])
| |- error: 'loadLeaderboards(IDs:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
108 | if leaderboards.isEmpty {
109 | logger.warning("Leaderboad with \(identifier) is empty")
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:109:32: error: 'OSLogMessage' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
98 | /// - Parameter identifier: leaderboard id defined in App Store Connect.
99 | /// - Returns: Current and previous player rank's, if any score was submitted.
100 | public func retrieveRank(identifier: String) async throws -> (current: Int?, previous: Int?) {
| `- note: add @available attribute to enclosing instance method
101 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
102 |
:
107 | let leaderboards: [GKLeaderboard] = try await GKLeaderboard.loadLeaderboards(IDs: [identifier])
108 | if leaderboards.isEmpty {
109 | logger.warning("Leaderboad with \(identifier) is empty")
| |- error: 'OSLogMessage' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
110 | throw GameCenterError.emptyLeaderboad(identifier)
111 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:109:50: error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
98 | /// - Parameter identifier: leaderboard id defined in App Store Connect.
99 | /// - Returns: Current and previous player rank's, if any score was submitted.
100 | public func retrieveRank(identifier: String) async throws -> (current: Int?, previous: Int?) {
| `- note: add @available attribute to enclosing instance method
101 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
102 |
:
107 | let leaderboards: [GKLeaderboard] = try await GKLeaderboard.loadLeaderboards(IDs: [identifier])
108 | if leaderboards.isEmpty {
109 | logger.warning("Leaderboad with \(identifier) is empty")
| |- error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
110 | throw GameCenterError.emptyLeaderboad(identifier)
111 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:112:67: error: 'loadEntries(for:timeScope:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
98 | /// - Parameter identifier: leaderboard id defined in App Store Connect.
99 | /// - Returns: Current and previous player rank's, if any score was submitted.
100 | public func retrieveRank(identifier: String) async throws -> (current: Int?, previous: Int?) {
| `- note: add @available attribute to enclosing instance method
101 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
102 |
:
110 | throw GameCenterError.emptyLeaderboad(identifier)
111 | }
112 | if let (currentEntry, _) = try? await leaderboards[0].loadEntries(for: [localPlayer], timeScope: .allTime) {
| |- error: 'loadEntries(for:timeScope:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
113 | currentRank = currentEntry?.rank
114 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:115:68: error: 'loadPreviousOccurrence()' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
98 | /// - Parameter identifier: leaderboard id defined in App Store Connect.
99 | /// - Returns: Current and previous player rank's, if any score was submitted.
100 | public func retrieveRank(identifier: String) async throws -> (current: Int?, previous: Int?) {
| `- note: add @available attribute to enclosing instance method
101 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
102 |
:
113 | currentRank = currentEntry?.rank
114 | }
115 | if let (previousEntry, _) = try? await leaderboards[0].loadPreviousOccurrence()?.loadEntries(for: [localPlayer], timeScope: .allTime) {
| |- error: 'loadPreviousOccurrence()' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
116 | previousRank = previousEntry?.rank
117 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:115:94: error: 'loadEntries(for:timeScope:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
98 | /// - Parameter identifier: leaderboard id defined in App Store Connect.
99 | /// - Returns: Current and previous player rank's, if any score was submitted.
100 | public func retrieveRank(identifier: String) async throws -> (current: Int?, previous: Int?) {
| `- note: add @available attribute to enclosing instance method
101 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
102 |
:
113 | currentRank = currentEntry?.rank
114 | }
115 | if let (previousEntry, _) = try? await leaderboards[0].loadPreviousOccurrence()?.loadEntries(for: [localPlayer], timeScope: .allTime) {
| |- error: 'loadEntries(for:timeScope:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
116 | previousRank = previousEntry?.rank
117 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:119:26: error: 'OSLogMessage' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
98 | /// - Parameter identifier: leaderboard id defined in App Store Connect.
99 | /// - Returns: Current and previous player rank's, if any score was submitted.
100 | public func retrieveRank(identifier: String) async throws -> (current: Int?, previous: Int?) {
| `- note: add @available attribute to enclosing instance method
101 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
102 |
:
117 | }
118 | } catch {
119 | logger.error("Error to retrieve leadeboard \(identifier) rank: \(error)")
| |- error: 'OSLogMessage' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
120 | throw GameCenterError.failure(error)
121 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:119:57: error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
98 | /// - Parameter identifier: leaderboard id defined in App Store Connect.
99 | /// - Returns: Current and previous player rank's, if any score was submitted.
100 | public func retrieveRank(identifier: String) async throws -> (current: Int?, previous: Int?) {
| `- note: add @available attribute to enclosing instance method
101 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
102 |
:
117 | }
118 | } catch {
119 | logger.error("Error to retrieve leadeboard \(identifier) rank: \(error)")
| |- error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
120 | throw GameCenterError.failure(error)
121 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:119:77: error: 'appendInterpolation(_:privacy:attributes:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
98 | /// - Parameter identifier: leaderboard id defined in App Store Connect.
99 | /// - Returns: Current and previous player rank's, if any score was submitted.
100 | public func retrieveRank(identifier: String) async throws -> (current: Int?, previous: Int?) {
| `- note: add @available attribute to enclosing instance method
101 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
102 |
:
117 | }
118 | } catch {
119 | logger.error("Error to retrieve leadeboard \(identifier) rank: \(error)")
| |- error: 'appendInterpolation(_:privacy:attributes:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
120 | throw GameCenterError.failure(error)
121 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:140:56: error: 'loadLeaderboards(IDs:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
131 | /// - topPlayers: Specifies the number of top players (1 - 50) to use for getting the scores.
132 | /// - Returns: Ordered top player list and the number of total players.
133 | public func retrieveBestPlayers(identifier: String, topPlayers: Int = 5) async throws -> (player: [PlayerEntry], totalPlayers: Int) {
| `- note: add @available attribute to enclosing instance method
134 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
135 |
:
138 |
139 | do {
140 | let leaderboards = try await GKLeaderboard.loadLeaderboards(IDs: [identifier])
| |- error: 'loadLeaderboards(IDs:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
141 | guard let leaderboard = leaderboards.first else {
142 | logger.warning("Leaderboard with \(identifier) is empty")
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:142:32: error: 'OSLogMessage' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
131 | /// - topPlayers: Specifies the number of top players (1 - 50) to use for getting the scores.
132 | /// - Returns: Ordered top player list and the number of total players.
133 | public func retrieveBestPlayers(identifier: String, topPlayers: Int = 5) async throws -> (player: [PlayerEntry], totalPlayers: Int) {
| `- note: add @available attribute to enclosing instance method
134 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
135 |
:
140 | let leaderboards = try await GKLeaderboard.loadLeaderboards(IDs: [identifier])
141 | guard let leaderboard = leaderboards.first else {
142 | logger.warning("Leaderboard with \(identifier) is empty")
| |- error: 'OSLogMessage' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
143 | throw GameCenterError.emptyLeaderboad(identifier)
144 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:142:51: error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
131 | /// - topPlayers: Specifies the number of top players (1 - 50) to use for getting the scores.
132 | /// - Returns: Ordered top player list and the number of total players.
133 | public func retrieveBestPlayers(identifier: String, topPlayers: Int = 5) async throws -> (player: [PlayerEntry], totalPlayers: Int) {
| `- note: add @available attribute to enclosing instance method
134 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
135 |
:
140 | let leaderboards = try await GKLeaderboard.loadLeaderboards(IDs: [identifier])
141 | guard let leaderboard = leaderboards.first else {
142 | logger.warning("Leaderboard with \(identifier) is empty")
| |- error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
143 | throw GameCenterError.emptyLeaderboad(identifier)
144 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:146:72: error: 'loadEntries(for:timeScope:range:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
131 | /// - topPlayers: Specifies the number of top players (1 - 50) to use for getting the scores.
132 | /// - Returns: Ordered top player list and the number of total players.
133 | public func retrieveBestPlayers(identifier: String, topPlayers: Int = 5) async throws -> (player: [PlayerEntry], totalPlayers: Int) {
| `- note: add @available attribute to enclosing instance method
134 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
135 |
:
144 | }
145 |
146 | let (_, entries, totalPlayerCount) = try await leaderboard.loadEntries(
| |- error: 'loadEntries(for:timeScope:range:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
147 | for: .global,
148 | timeScope: .allTime,
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:155:84: error: cannot find 'UIImage' in scope
153 | for entry in entries {
154 | group.addTask {
155 | let uiImage = await entry.player.loadPhoto(for: .small) ?? UIImage()
| `- error: cannot find 'UIImage' in scope
156 | let image = Image(uiImage: uiImage)
157 | return PlayerEntry(
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GKPlayer+Extensions.swift:7:59: error: cannot find type 'UIImage' in scope
5 |
6 | extension GKPlayer {
7 | func loadPhoto(for size: GKPlayer.PhotoSize) async -> UIImage? {
| `- error: cannot find type 'UIImage' in scope
8 | await withCheckedContinuation { continuation in
9 | self.loadPhoto(for: size) { photo, _ in
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:179:26: error: 'OSLogMessage' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
131 | /// - topPlayers: Specifies the number of top players (1 - 50) to use for getting the scores.
132 | /// - Returns: Ordered top player list and the number of total players.
133 | public func retrieveBestPlayers(identifier: String, topPlayers: Int = 5) async throws -> (player: [PlayerEntry], totalPlayers: Int) {
| `- note: add @available attribute to enclosing instance method
134 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
135 |
:
177 |
178 | } catch {
179 | logger.error("Error to retrieve leaderboard \(identifier) best players: \(error.localizedDescription)")
| |- error: 'OSLogMessage' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
180 | throw GameCenterError.failure(error)
181 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:179:58: error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
131 | /// - topPlayers: Specifies the number of top players (1 - 50) to use for getting the scores.
132 | /// - Returns: Ordered top player list and the number of total players.
133 | public func retrieveBestPlayers(identifier: String, topPlayers: Int = 5) async throws -> (player: [PlayerEntry], totalPlayers: Int) {
| `- note: add @available attribute to enclosing instance method
134 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
135 |
:
177 |
178 | } catch {
179 | logger.error("Error to retrieve leaderboard \(identifier) best players: \(error.localizedDescription)")
| |- error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
180 | throw GameCenterError.failure(error)
181 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:179:86: error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
131 | /// - topPlayers: Specifies the number of top players (1 - 50) to use for getting the scores.
132 | /// - Returns: Ordered top player list and the number of total players.
133 | public func retrieveBestPlayers(identifier: String, topPlayers: Int = 5) async throws -> (player: [PlayerEntry], totalPlayers: Int) {
| `- note: add @available attribute to enclosing instance method
134 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
135 |
:
177 |
178 | } catch {
179 | logger.error("Error to retrieve leaderboard \(identifier) best players: \(error.localizedDescription)")
| |- error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
180 | throw GameCenterError.failure(error)
181 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:195:37: error: 'submitScore(_:context:player:leaderboardIDs:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
189 | /// - score: The score earned by the local player
190 | /// - identifier: leaderboard id defined in App Store Connect.
191 | public func submitScore(score: Int, identifier: String) async throws {
| `- note: add @available attribute to enclosing instance method
192 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
193 |
194 | do {
195 | try await GKLeaderboard.submitScore(score, context: 0, player: localPlayer, leaderboardIDs: [identifier])
| |- error: 'submitScore(_:context:player:leaderboardIDs:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
196 | } catch {
197 | logger.error("Error to submit leaderboard \(identifier) scores: \(error)")
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:197:26: error: 'OSLogMessage' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
189 | /// - score: The score earned by the local player
190 | /// - identifier: leaderboard id defined in App Store Connect.
191 | public func submitScore(score: Int, identifier: String) async throws {
| `- note: add @available attribute to enclosing instance method
192 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
193 |
:
195 | try await GKLeaderboard.submitScore(score, context: 0, player: localPlayer, leaderboardIDs: [identifier])
196 | } catch {
197 | logger.error("Error to submit leaderboard \(identifier) scores: \(error)")
| |- error: 'OSLogMessage' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
198 | throw GameCenterError.failure(error)
199 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:197:56: error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
189 | /// - score: The score earned by the local player
190 | /// - identifier: leaderboard id defined in App Store Connect.
191 | public func submitScore(score: Int, identifier: String) async throws {
| `- note: add @available attribute to enclosing instance method
192 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
193 |
:
195 | try await GKLeaderboard.submitScore(score, context: 0, player: localPlayer, leaderboardIDs: [identifier])
196 | } catch {
197 | logger.error("Error to submit leaderboard \(identifier) scores: \(error)")
| |- error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
198 | throw GameCenterError.failure(error)
199 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:197:78: error: 'appendInterpolation(_:privacy:attributes:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
189 | /// - score: The score earned by the local player
190 | /// - identifier: leaderboard id defined in App Store Connect.
191 | public func submitScore(score: Int, identifier: String) async throws {
| `- note: add @available attribute to enclosing instance method
192 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
193 |
:
195 | try await GKLeaderboard.submitScore(score, context: 0, player: localPlayer, leaderboardIDs: [identifier])
196 | } catch {
197 | logger.error("Error to submit leaderboard \(identifier) scores: \(error)")
| |- error: 'appendInterpolation(_:privacy:attributes:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
198 | throw GameCenterError.failure(error)
199 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:233:26: error: 'OSLogMessage' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
210 | /// - percent: A percentage value (0 - 100) stating how far the user has progressed on the achievement
211 | /// - banner: Define if achievement banner is shown with the local player progress.
212 | public func submitAchievement(identifier: String, percent: Double, showsCompletionBanner banner: Bool = true) async throws {
| `- note: add @available attribute to enclosing instance method
213 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
214 |
:
231 | }
232 | } catch {
233 | logger.error("Error to submit achievement \(identifier) progress: \(error)")
| |- error: 'OSLogMessage' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
234 | throw GameCenterError.failure(error)
235 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:233:56: error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
210 | /// - percent: A percentage value (0 - 100) stating how far the user has progressed on the achievement
211 | /// - banner: Define if achievement banner is shown with the local player progress.
212 | public func submitAchievement(identifier: String, percent: Double, showsCompletionBanner banner: Bool = true) async throws {
| `- note: add @available attribute to enclosing instance method
213 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
214 |
:
231 | }
232 | } catch {
233 | logger.error("Error to submit achievement \(identifier) progress: \(error)")
| |- error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
234 | throw GameCenterError.failure(error)
235 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:233:80: error: 'appendInterpolation(_:privacy:attributes:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
210 | /// - percent: A percentage value (0 - 100) stating how far the user has progressed on the achievement
211 | /// - banner: Define if achievement banner is shown with the local player progress.
212 | public func submitAchievement(identifier: String, percent: Double, showsCompletionBanner banner: Bool = true) async throws {
| `- note: add @available attribute to enclosing instance method
213 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
214 |
:
231 | }
232 | } catch {
233 | logger.error("Error to submit achievement \(identifier) progress: \(error)")
| |- error: 'appendInterpolation(_:privacy:attributes:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
234 | throw GameCenterError.failure(error)
235 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:248:26: error: 'OSLogMessage' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
240 | /// - Throws: GameCenterError.notAuthenticated: if local player is not authenticated.
241 | /// GameCenterError.failure: If an error occurred, It holds an error that describes the problem.
242 | public func resetAchievements() async throws {
| `- note: add @available attribute to enclosing instance method
243 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
244 |
:
246 | try await GKAchievement.resetAchievements()
247 | } catch {
248 | logger.error("Error to reset achievements: \(error)")
| |- error: 'OSLogMessage' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
249 | throw GameCenterError.failure(error)
250 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:248:57: error: 'appendInterpolation(_:privacy:attributes:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
240 | /// - Throws: GameCenterError.notAuthenticated: if local player is not authenticated.
241 | /// GameCenterError.failure: If an error occurred, It holds an error that describes the problem.
242 | public func resetAchievements() async throws {
| `- note: add @available attribute to enclosing instance method
243 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
244 |
:
246 | try await GKAchievement.resetAchievements()
247 | } catch {
248 | logger.error("Error to reset achievements: \(error)")
| |- error: 'appendInterpolation(_:privacy:attributes:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
249 | throw GameCenterError.failure(error)
250 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:257:13: error: 'GKAccessPoint' is only available in macOS 11.0 or newer
252 | }
253 |
254 | extension GameCenterKit: GKGameCenterControllerDelegate {
| `- note: add @available attribute to enclosing extension
255 | public func toggleGameAccessPointView() {
| `- note: add @available attribute to enclosing instance method
256 | if isAuthenticated {
257 | GKAccessPoint.shared.isActive.toggle()
| |- error: 'GKAccessPoint' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
258 | }
259 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:272:40: error: 'init(state:)' is only available in macOS 11.0 or newer
252 | }
253 |
254 | extension GameCenterKit: GKGameCenterControllerDelegate {
| `- note: add @available attribute to enclosing extension
255 | public func toggleGameAccessPointView() {
256 | if isAuthenticated {
:
267 | /// - viewController: The view controller to present GameKit's view controller from.
268 | /// - viewState: The state in which to present the new view controller
269 | public func showGameCenter(viewController: UIViewController, viewState: GKGameCenterViewControllerState = .default) throws {
| `- note: add @available attribute to enclosing instance method
270 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
271 |
272 | let gameCenterViewController = GKGameCenterViewController(state: viewState)
| |- error: 'init(state:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
273 | gameCenterViewController.gameCenterDelegate = self
274 | viewController.present(gameCenterViewController, animated: true)
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:272:40: warning: call to main actor-isolated initializer 'init(state:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
267 | /// - viewController: The view controller to present GameKit's view controller from.
268 | /// - viewState: The state in which to present the new view controller
269 | public func showGameCenter(viewController: UIViewController, viewState: GKGameCenterViewControllerState = .default) throws {
| `- note: add '@MainActor' to make instance method 'showGameCenter(viewController:viewState:)' part of global actor 'MainActor'
270 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
271 |
272 | let gameCenterViewController = GKGameCenterViewController(state: viewState)
| `- warning: call to main actor-isolated initializer 'init(state:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
273 | gameCenterViewController.gameCenterDelegate = self
274 | viewController.present(gameCenterViewController, animated: true)
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/GameKit.framework/Headers/GKGameCenterViewController.h:54:1: note: calls to initializer 'init(state:)' from outside of its actor context are implicitly asynchronous
52 | Use this to display content associated with the specified state. For example setting the state to GKGameCenterViewControllerStateLeaderboards will display a list of leaderboard sets or leaderboards (if no sets). Setting state to GKGameCenterViewControllerStateAchievements will display a list of achievements.
53 | */
54 | - (instancetype)initWithState:(GKGameCenterViewControllerState)state API_AVAILABLE(ios(14.0), macos(11.0), tvos(14.0));
| |- note: calls to initializer 'init(state:)' from outside of its actor context are implicitly asynchronous
| `- note: main actor isolation inferred from inheritance from class 'NSViewController'
55 |
56 | /**
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:273:34: warning: main actor-isolated property 'gameCenterDelegate' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
267 | /// - viewController: The view controller to present GameKit's view controller from.
268 | /// - viewState: The state in which to present the new view controller
269 | public func showGameCenter(viewController: UIViewController, viewState: GKGameCenterViewControllerState = .default) throws {
| `- note: add '@MainActor' to make instance method 'showGameCenter(viewController:viewState:)' part of global actor 'MainActor'
270 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
271 |
272 | let gameCenterViewController = GKGameCenterViewController(state: viewState)
273 | gameCenterViewController.gameCenterDelegate = self
| `- warning: main actor-isolated property 'gameCenterDelegate' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
274 | viewController.present(gameCenterViewController, animated: true)
275 | }
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/GameKit.framework/Headers/GKGameCenterViewController.h:49:85: note: mutation of this property is only permitted within the actor
47 | @interface GKGameCenterViewController ()
48 |
49 | @property (weak, nullable, NS_NONATOMIC_IOSONLY) id<GKGameCenterControllerDelegate> gameCenterDelegate;
| `- note: mutation of this property is only permitted within the actor
50 |
51 | /**
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:278:41: error: extraneous argument label 'animated:' in call
276 |
277 | public func gameCenterViewControllerDidFinish(_ gameCenterViewController: GKGameCenterViewController) {
278 | gameCenterViewController.dismiss(animated: true)
| `- error: extraneous argument label 'animated:' in call
279 | }
280 | }
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-2F0A5646E1D333AE.txt
[2/6] Compiling GameCenterKit PlayerEntry.swift
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/PlayerEntry.swift:9:23: error: 'Image' is only available in macOS 10.15 or newer
4 | import SwiftUI
5 |
6 | public struct PlayerEntry: Identifiable {
| `- note: add @available attribute to enclosing struct
7 | public let id: String
8 | public let displayName: String
9 | public let photo: Image?
| `- error: 'Image' is only available in macOS 10.15 or newer
10 | public let leaderboard: Leaderboard
11 |
[3/6] Compiling GameCenterKit GameCenterView.swift
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterView.swift:19:47: error: cannot find type 'Context' in scope
17 | }
18 |
19 | public func makeUIViewController(context: Context) -> GKGameCenterViewController {
| `- error: cannot find type 'Context' in scope
20 | let gameCenterViewController = viewController
21 | gameCenterViewController.gameCenterDelegate = context.coordinator
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterView.swift:25:97: error: cannot find type 'Context' in scope
23 | }
24 |
25 | public func updateUIViewController(_ uiViewController: GKGameCenterViewController, context: Context) {
| `- error: cannot find type 'Context' in scope
26 | return
27 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterView.swift:8:31: error: cannot find type 'UIViewControllerRepresentable' in scope
6 |
7 | /// Presents the game center view provided by GameKit.
8 | public struct GameCenterView: UIViewControllerRepresentable {
| `- error: cannot find type 'UIViewControllerRepresentable' in scope
9 | let viewController: GKGameCenterViewController
10 |
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterView.swift:12:31: error: 'init(state:)' is only available in macOS 11.0 or newer
6 |
7 | /// Presents the game center view provided by GameKit.
8 | public struct GameCenterView: UIViewControllerRepresentable {
| `- note: add @available attribute to enclosing struct
9 | let viewController: GKGameCenterViewController
10 |
11 | public init(viewState: GKGameCenterViewControllerState = .default) {
| `- note: add @available attribute to enclosing initializer
12 | self.viewController = GKGameCenterViewController(state: viewState)
| |- error: 'init(state:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
13 | }
14 |
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterView.swift:38:41: error: extraneous argument label 'animated:' in call
36 |
37 | public func gameCenterViewControllerDidFinish(_ gameCenterViewController: GKGameCenterViewController) {
38 | gameCenterViewController.dismiss(animated: true)
| `- error: extraneous argument label 'animated:' in call
39 | }
40 | }
error: emit-module command failed with exit code 1 (use -v to see invocation)
[4/6] Emitting module GameCenterKit
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GKPlayer+Extensions.swift:7:59: error: cannot find type 'UIImage' in scope
5 |
6 | extension GKPlayer {
7 | func loadPhoto(for size: GKPlayer.PhotoSize) async -> UIImage? {
| `- error: cannot find type 'UIImage' in scope
8 | await withCheckedContinuation { continuation in
9 | self.loadPhoto(for: size) { photo, _ in
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:12:26: error: 'Logger' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
| `- error: 'Logger' is only available in macOS 11.0 or newer
13 | private(set) var localPlayer = GKLocalPlayer.local
14 |
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:269:48: error: cannot find type 'UIViewController' in scope
267 | /// - viewController: The view controller to present GameKit's view controller from.
268 | /// - viewState: The state in which to present the new view controller
269 | public func showGameCenter(viewController: UIViewController, viewState: GKGameCenterViewControllerState = .default) throws {
| `- error: cannot find type 'UIViewController' in scope
270 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
271 |
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterView.swift:19:47: error: cannot find type 'Context' in scope
17 | }
18 |
19 | public func makeUIViewController(context: Context) -> GKGameCenterViewController {
| `- error: cannot find type 'Context' in scope
20 | let gameCenterViewController = viewController
21 | gameCenterViewController.gameCenterDelegate = context.coordinator
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterView.swift:25:97: error: cannot find type 'Context' in scope
23 | }
24 |
25 | public func updateUIViewController(_ uiViewController: GKGameCenterViewController, context: Context) {
| `- error: cannot find type 'Context' in scope
26 | return
27 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterView.swift:8:31: error: cannot find type 'UIViewControllerRepresentable' in scope
6 |
7 | /// Presents the game center view provided by GameKit.
8 | public struct GameCenterView: UIViewControllerRepresentable {
| `- error: cannot find type 'UIViewControllerRepresentable' in scope
9 | let viewController: GKGameCenterViewController
10 |
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/PlayerEntry.swift:9:23: error: 'Image' is only available in macOS 10.15 or newer
4 | import SwiftUI
5 |
6 | public struct PlayerEntry: Identifiable {
| `- note: add @available attribute to enclosing struct
7 | public let id: String
8 | public let displayName: String
9 | public let photo: Image?
| `- error: 'Image' is only available in macOS 10.15 or newer
10 | public let leaderboard: Leaderboard
11 |
[5/6] Compiling GameCenterKit GameCenterKit.swift
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:12:26: error: 'Logger' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
| `- error: 'Logger' is only available in macOS 11.0 or newer
13 | private(set) var localPlayer = GKLocalPlayer.local
14 |
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:269:48: error: cannot find type 'UIViewController' in scope
267 | /// - viewController: The view controller to present GameKit's view controller from.
268 | /// - viewState: The state in which to present the new view controller
269 | public func showGameCenter(viewController: UIViewController, viewState: GKGameCenterViewControllerState = .default) throws {
| `- error: cannot find type 'UIViewController' in scope
270 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
271 |
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:36:30: error: 'OSLogMessage' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
29 | /// Otherwise, present the view controller so the player can perform any additional actions to complete authentication.
30 | /// - Returns: Player autentication status.
31 | public func authenticate(completion: @escaping (Bool) -> Void) {
| `- note: add @available attribute to enclosing instance method
32 | guard !isAuthenticated else { completion(true); return }
33 |
34 | localPlayer.authenticateHandler = { [self] (viewController, error) in
35 | guard error == nil else {
36 | logger.error("Error on user authentication: \(error)")
| |- error: 'OSLogMessage' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
37 | completion(false)
38 | return
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:36:62: error: 'appendInterpolation(_:privacy:attributes:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
29 | /// Otherwise, present the view controller so the player can perform any additional actions to complete authentication.
30 | /// - Returns: Player autentication status.
31 | public func authenticate(completion: @escaping (Bool) -> Void) {
| `- note: add @available attribute to enclosing instance method
32 | guard !isAuthenticated else { completion(true); return }
33 |
34 | localPlayer.authenticateHandler = { [self] (viewController, error) in
35 | guard error == nil else {
36 | logger.error("Error on user authentication: \(error)")
| |- error: 'appendInterpolation(_:privacy:attributes:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
37 | completion(false)
38 | return
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:41:13: error: 'GKAccessPoint' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
29 | /// Otherwise, present the view controller so the player can perform any additional actions to complete authentication.
30 | /// - Returns: Player autentication status.
31 | public func authenticate(completion: @escaping (Bool) -> Void) {
| `- note: add @available attribute to enclosing instance method
32 | guard !isAuthenticated else { completion(true); return }
33 |
:
39 | }
40 |
41 | GKAccessPoint.shared.isActive = false
| |- error: 'GKAccessPoint' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
42 |
43 | if self.localPlayer.isAuthenticated {
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:56:15: error: 'withCheckedContinuation(isolation:function:_:)' is only available in macOS 10.15 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
53 | /// Otherwise, present the view controller so the player can perform any additional actions to complete authentication.
54 | /// - Returns: Player autentication status.
55 | public func authenticate() async -> Bool {
| `- note: add @available attribute to enclosing instance method
56 | await withCheckedContinuation { continuation in
| |- error: 'withCheckedContinuation(isolation:function:_:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
57 | var hasResumed = false
58 |
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:56:40: error: 'isolation()' is only available in macOS 10.15 or newer
`- /Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:56:39: note: expanded code originates here
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
53 | /// Otherwise, present the view controller so the player can perform any additional actions to complete authentication.
54 | /// - Returns: Player autentication status.
55 | public func authenticate() async -> Bool {
| `- note: add @available attribute to enclosing instance method
56 | await withCheckedContinuation { continuation in
+--- /Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift
|54 |
|55 |
|56 | #isolation
| | `- error: 'isolation()' is only available in macOS 10.15 or newer
+-----------------------------------------------------------------------------------------
57 | var hasResumed = false
58 |
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:79:73: error: 'loadLeaderboards(IDs:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
73 | /// - Parameter identifier: leaderboard id defined in App Store Connect.
74 | /// - Returns: Player score's, if a previous score was submitted.
75 | public func retrieveScore(identifier: String) async throws -> Int? {
| `- note: add @available attribute to enclosing instance method
76 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
77 |
78 | do {
79 | let leaderboards: [GKLeaderboard] = try await GKLeaderboard.loadLeaderboards(IDs: [identifier])
| |- error: 'loadLeaderboards(IDs:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
80 | if leaderboards.isEmpty {
81 | logger.warning("Leaderboad with \(identifier) is empty")
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:81:32: error: 'OSLogMessage' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
73 | /// - Parameter identifier: leaderboard id defined in App Store Connect.
74 | /// - Returns: Player score's, if a previous score was submitted.
75 | public func retrieveScore(identifier: String) async throws -> Int? {
| `- note: add @available attribute to enclosing instance method
76 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
77 |
:
79 | let leaderboards: [GKLeaderboard] = try await GKLeaderboard.loadLeaderboards(IDs: [identifier])
80 | if leaderboards.isEmpty {
81 | logger.warning("Leaderboad with \(identifier) is empty")
| |- error: 'OSLogMessage' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
82 | throw GameCenterError.emptyLeaderboad(identifier)
83 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:81:50: error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
73 | /// - Parameter identifier: leaderboard id defined in App Store Connect.
74 | /// - Returns: Player score's, if a previous score was submitted.
75 | public func retrieveScore(identifier: String) async throws -> Int? {
| `- note: add @available attribute to enclosing instance method
76 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
77 |
:
79 | let leaderboards: [GKLeaderboard] = try await GKLeaderboard.loadLeaderboards(IDs: [identifier])
80 | if leaderboards.isEmpty {
81 | logger.warning("Leaderboad with \(identifier) is empty")
| |- error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
82 | throw GameCenterError.emptyLeaderboad(identifier)
83 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:84:67: error: 'loadEntries(for:timeScope:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
73 | /// - Parameter identifier: leaderboard id defined in App Store Connect.
74 | /// - Returns: Player score's, if a previous score was submitted.
75 | public func retrieveScore(identifier: String) async throws -> Int? {
| `- note: add @available attribute to enclosing instance method
76 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
77 |
:
82 | throw GameCenterError.emptyLeaderboad(identifier)
83 | }
84 | let (localPlayerEntry, _) = try await leaderboards[0].loadEntries(for: [localPlayer], timeScope: .allTime)
| |- error: 'loadEntries(for:timeScope:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
85 | return localPlayerEntry?.score
86 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:87:26: error: 'OSLogMessage' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
73 | /// - Parameter identifier: leaderboard id defined in App Store Connect.
74 | /// - Returns: Player score's, if a previous score was submitted.
75 | public func retrieveScore(identifier: String) async throws -> Int? {
| `- note: add @available attribute to enclosing instance method
76 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
77 |
:
85 | return localPlayerEntry?.score
86 | } catch {
87 | logger.error("Error to retrieve leaderboad \(identifier) score: \(error)")
| |- error: 'OSLogMessage' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
88 | throw GameCenterError.failure(error)
89 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:87:57: error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
73 | /// - Parameter identifier: leaderboard id defined in App Store Connect.
74 | /// - Returns: Player score's, if a previous score was submitted.
75 | public func retrieveScore(identifier: String) async throws -> Int? {
| `- note: add @available attribute to enclosing instance method
76 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
77 |
:
85 | return localPlayerEntry?.score
86 | } catch {
87 | logger.error("Error to retrieve leaderboad \(identifier) score: \(error)")
| |- error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
88 | throw GameCenterError.failure(error)
89 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:87:78: error: 'appendInterpolation(_:privacy:attributes:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
73 | /// - Parameter identifier: leaderboard id defined in App Store Connect.
74 | /// - Returns: Player score's, if a previous score was submitted.
75 | public func retrieveScore(identifier: String) async throws -> Int? {
| `- note: add @available attribute to enclosing instance method
76 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
77 |
:
85 | return localPlayerEntry?.score
86 | } catch {
87 | logger.error("Error to retrieve leaderboad \(identifier) score: \(error)")
| |- error: 'appendInterpolation(_:privacy:attributes:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
88 | throw GameCenterError.failure(error)
89 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:107:73: error: 'loadLeaderboards(IDs:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
98 | /// - Parameter identifier: leaderboard id defined in App Store Connect.
99 | /// - Returns: Current and previous player rank's, if any score was submitted.
100 | public func retrieveRank(identifier: String) async throws -> (current: Int?, previous: Int?) {
| `- note: add @available attribute to enclosing instance method
101 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
102 |
:
105 |
106 | do {
107 | let leaderboards: [GKLeaderboard] = try await GKLeaderboard.loadLeaderboards(IDs: [identifier])
| |- error: 'loadLeaderboards(IDs:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
108 | if leaderboards.isEmpty {
109 | logger.warning("Leaderboad with \(identifier) is empty")
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:109:32: error: 'OSLogMessage' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
98 | /// - Parameter identifier: leaderboard id defined in App Store Connect.
99 | /// - Returns: Current and previous player rank's, if any score was submitted.
100 | public func retrieveRank(identifier: String) async throws -> (current: Int?, previous: Int?) {
| `- note: add @available attribute to enclosing instance method
101 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
102 |
:
107 | let leaderboards: [GKLeaderboard] = try await GKLeaderboard.loadLeaderboards(IDs: [identifier])
108 | if leaderboards.isEmpty {
109 | logger.warning("Leaderboad with \(identifier) is empty")
| |- error: 'OSLogMessage' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
110 | throw GameCenterError.emptyLeaderboad(identifier)
111 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:109:50: error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
98 | /// - Parameter identifier: leaderboard id defined in App Store Connect.
99 | /// - Returns: Current and previous player rank's, if any score was submitted.
100 | public func retrieveRank(identifier: String) async throws -> (current: Int?, previous: Int?) {
| `- note: add @available attribute to enclosing instance method
101 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
102 |
:
107 | let leaderboards: [GKLeaderboard] = try await GKLeaderboard.loadLeaderboards(IDs: [identifier])
108 | if leaderboards.isEmpty {
109 | logger.warning("Leaderboad with \(identifier) is empty")
| |- error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
110 | throw GameCenterError.emptyLeaderboad(identifier)
111 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:112:67: error: 'loadEntries(for:timeScope:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
98 | /// - Parameter identifier: leaderboard id defined in App Store Connect.
99 | /// - Returns: Current and previous player rank's, if any score was submitted.
100 | public func retrieveRank(identifier: String) async throws -> (current: Int?, previous: Int?) {
| `- note: add @available attribute to enclosing instance method
101 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
102 |
:
110 | throw GameCenterError.emptyLeaderboad(identifier)
111 | }
112 | if let (currentEntry, _) = try? await leaderboards[0].loadEntries(for: [localPlayer], timeScope: .allTime) {
| |- error: 'loadEntries(for:timeScope:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
113 | currentRank = currentEntry?.rank
114 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:115:68: error: 'loadPreviousOccurrence()' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
98 | /// - Parameter identifier: leaderboard id defined in App Store Connect.
99 | /// - Returns: Current and previous player rank's, if any score was submitted.
100 | public func retrieveRank(identifier: String) async throws -> (current: Int?, previous: Int?) {
| `- note: add @available attribute to enclosing instance method
101 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
102 |
:
113 | currentRank = currentEntry?.rank
114 | }
115 | if let (previousEntry, _) = try? await leaderboards[0].loadPreviousOccurrence()?.loadEntries(for: [localPlayer], timeScope: .allTime) {
| |- error: 'loadPreviousOccurrence()' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
116 | previousRank = previousEntry?.rank
117 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:115:94: error: 'loadEntries(for:timeScope:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
98 | /// - Parameter identifier: leaderboard id defined in App Store Connect.
99 | /// - Returns: Current and previous player rank's, if any score was submitted.
100 | public func retrieveRank(identifier: String) async throws -> (current: Int?, previous: Int?) {
| `- note: add @available attribute to enclosing instance method
101 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
102 |
:
113 | currentRank = currentEntry?.rank
114 | }
115 | if let (previousEntry, _) = try? await leaderboards[0].loadPreviousOccurrence()?.loadEntries(for: [localPlayer], timeScope: .allTime) {
| |- error: 'loadEntries(for:timeScope:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
116 | previousRank = previousEntry?.rank
117 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:119:26: error: 'OSLogMessage' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
98 | /// - Parameter identifier: leaderboard id defined in App Store Connect.
99 | /// - Returns: Current and previous player rank's, if any score was submitted.
100 | public func retrieveRank(identifier: String) async throws -> (current: Int?, previous: Int?) {
| `- note: add @available attribute to enclosing instance method
101 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
102 |
:
117 | }
118 | } catch {
119 | logger.error("Error to retrieve leadeboard \(identifier) rank: \(error)")
| |- error: 'OSLogMessage' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
120 | throw GameCenterError.failure(error)
121 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:119:57: error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
98 | /// - Parameter identifier: leaderboard id defined in App Store Connect.
99 | /// - Returns: Current and previous player rank's, if any score was submitted.
100 | public func retrieveRank(identifier: String) async throws -> (current: Int?, previous: Int?) {
| `- note: add @available attribute to enclosing instance method
101 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
102 |
:
117 | }
118 | } catch {
119 | logger.error("Error to retrieve leadeboard \(identifier) rank: \(error)")
| |- error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
120 | throw GameCenterError.failure(error)
121 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:119:77: error: 'appendInterpolation(_:privacy:attributes:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
98 | /// - Parameter identifier: leaderboard id defined in App Store Connect.
99 | /// - Returns: Current and previous player rank's, if any score was submitted.
100 | public func retrieveRank(identifier: String) async throws -> (current: Int?, previous: Int?) {
| `- note: add @available attribute to enclosing instance method
101 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
102 |
:
117 | }
118 | } catch {
119 | logger.error("Error to retrieve leadeboard \(identifier) rank: \(error)")
| |- error: 'appendInterpolation(_:privacy:attributes:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
120 | throw GameCenterError.failure(error)
121 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:140:56: error: 'loadLeaderboards(IDs:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
131 | /// - topPlayers: Specifies the number of top players (1 - 50) to use for getting the scores.
132 | /// - Returns: Ordered top player list and the number of total players.
133 | public func retrieveBestPlayers(identifier: String, topPlayers: Int = 5) async throws -> (player: [PlayerEntry], totalPlayers: Int) {
| `- note: add @available attribute to enclosing instance method
134 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
135 |
:
138 |
139 | do {
140 | let leaderboards = try await GKLeaderboard.loadLeaderboards(IDs: [identifier])
| |- error: 'loadLeaderboards(IDs:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
141 | guard let leaderboard = leaderboards.first else {
142 | logger.warning("Leaderboard with \(identifier) is empty")
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:142:32: error: 'OSLogMessage' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
131 | /// - topPlayers: Specifies the number of top players (1 - 50) to use for getting the scores.
132 | /// - Returns: Ordered top player list and the number of total players.
133 | public func retrieveBestPlayers(identifier: String, topPlayers: Int = 5) async throws -> (player: [PlayerEntry], totalPlayers: Int) {
| `- note: add @available attribute to enclosing instance method
134 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
135 |
:
140 | let leaderboards = try await GKLeaderboard.loadLeaderboards(IDs: [identifier])
141 | guard let leaderboard = leaderboards.first else {
142 | logger.warning("Leaderboard with \(identifier) is empty")
| |- error: 'OSLogMessage' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
143 | throw GameCenterError.emptyLeaderboad(identifier)
144 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:142:51: error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
131 | /// - topPlayers: Specifies the number of top players (1 - 50) to use for getting the scores.
132 | /// - Returns: Ordered top player list and the number of total players.
133 | public func retrieveBestPlayers(identifier: String, topPlayers: Int = 5) async throws -> (player: [PlayerEntry], totalPlayers: Int) {
| `- note: add @available attribute to enclosing instance method
134 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
135 |
:
140 | let leaderboards = try await GKLeaderboard.loadLeaderboards(IDs: [identifier])
141 | guard let leaderboard = leaderboards.first else {
142 | logger.warning("Leaderboard with \(identifier) is empty")
| |- error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
143 | throw GameCenterError.emptyLeaderboad(identifier)
144 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:146:72: error: 'loadEntries(for:timeScope:range:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
131 | /// - topPlayers: Specifies the number of top players (1 - 50) to use for getting the scores.
132 | /// - Returns: Ordered top player list and the number of total players.
133 | public func retrieveBestPlayers(identifier: String, topPlayers: Int = 5) async throws -> (player: [PlayerEntry], totalPlayers: Int) {
| `- note: add @available attribute to enclosing instance method
134 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
135 |
:
144 | }
145 |
146 | let (_, entries, totalPlayerCount) = try await leaderboard.loadEntries(
| |- error: 'loadEntries(for:timeScope:range:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
147 | for: .global,
148 | timeScope: .allTime,
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:155:84: error: cannot find 'UIImage' in scope
153 | for entry in entries {
154 | group.addTask {
155 | let uiImage = await entry.player.loadPhoto(for: .small) ?? UIImage()
| `- error: cannot find 'UIImage' in scope
156 | let image = Image(uiImage: uiImage)
157 | return PlayerEntry(
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GKPlayer+Extensions.swift:7:59: error: cannot find type 'UIImage' in scope
5 |
6 | extension GKPlayer {
7 | func loadPhoto(for size: GKPlayer.PhotoSize) async -> UIImage? {
| `- error: cannot find type 'UIImage' in scope
8 | await withCheckedContinuation { continuation in
9 | self.loadPhoto(for: size) { photo, _ in
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:179:26: error: 'OSLogMessage' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
131 | /// - topPlayers: Specifies the number of top players (1 - 50) to use for getting the scores.
132 | /// - Returns: Ordered top player list and the number of total players.
133 | public func retrieveBestPlayers(identifier: String, topPlayers: Int = 5) async throws -> (player: [PlayerEntry], totalPlayers: Int) {
| `- note: add @available attribute to enclosing instance method
134 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
135 |
:
177 |
178 | } catch {
179 | logger.error("Error to retrieve leaderboard \(identifier) best players: \(error.localizedDescription)")
| |- error: 'OSLogMessage' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
180 | throw GameCenterError.failure(error)
181 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:179:58: error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
131 | /// - topPlayers: Specifies the number of top players (1 - 50) to use for getting the scores.
132 | /// - Returns: Ordered top player list and the number of total players.
133 | public func retrieveBestPlayers(identifier: String, topPlayers: Int = 5) async throws -> (player: [PlayerEntry], totalPlayers: Int) {
| `- note: add @available attribute to enclosing instance method
134 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
135 |
:
177 |
178 | } catch {
179 | logger.error("Error to retrieve leaderboard \(identifier) best players: \(error.localizedDescription)")
| |- error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
180 | throw GameCenterError.failure(error)
181 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:179:86: error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
131 | /// - topPlayers: Specifies the number of top players (1 - 50) to use for getting the scores.
132 | /// - Returns: Ordered top player list and the number of total players.
133 | public func retrieveBestPlayers(identifier: String, topPlayers: Int = 5) async throws -> (player: [PlayerEntry], totalPlayers: Int) {
| `- note: add @available attribute to enclosing instance method
134 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
135 |
:
177 |
178 | } catch {
179 | logger.error("Error to retrieve leaderboard \(identifier) best players: \(error.localizedDescription)")
| |- error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
180 | throw GameCenterError.failure(error)
181 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:195:37: error: 'submitScore(_:context:player:leaderboardIDs:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
189 | /// - score: The score earned by the local player
190 | /// - identifier: leaderboard id defined in App Store Connect.
191 | public func submitScore(score: Int, identifier: String) async throws {
| `- note: add @available attribute to enclosing instance method
192 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
193 |
194 | do {
195 | try await GKLeaderboard.submitScore(score, context: 0, player: localPlayer, leaderboardIDs: [identifier])
| |- error: 'submitScore(_:context:player:leaderboardIDs:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
196 | } catch {
197 | logger.error("Error to submit leaderboard \(identifier) scores: \(error)")
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:197:26: error: 'OSLogMessage' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
189 | /// - score: The score earned by the local player
190 | /// - identifier: leaderboard id defined in App Store Connect.
191 | public func submitScore(score: Int, identifier: String) async throws {
| `- note: add @available attribute to enclosing instance method
192 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
193 |
:
195 | try await GKLeaderboard.submitScore(score, context: 0, player: localPlayer, leaderboardIDs: [identifier])
196 | } catch {
197 | logger.error("Error to submit leaderboard \(identifier) scores: \(error)")
| |- error: 'OSLogMessage' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
198 | throw GameCenterError.failure(error)
199 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:197:56: error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
189 | /// - score: The score earned by the local player
190 | /// - identifier: leaderboard id defined in App Store Connect.
191 | public func submitScore(score: Int, identifier: String) async throws {
| `- note: add @available attribute to enclosing instance method
192 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
193 |
:
195 | try await GKLeaderboard.submitScore(score, context: 0, player: localPlayer, leaderboardIDs: [identifier])
196 | } catch {
197 | logger.error("Error to submit leaderboard \(identifier) scores: \(error)")
| |- error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
198 | throw GameCenterError.failure(error)
199 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:197:78: error: 'appendInterpolation(_:privacy:attributes:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
189 | /// - score: The score earned by the local player
190 | /// - identifier: leaderboard id defined in App Store Connect.
191 | public func submitScore(score: Int, identifier: String) async throws {
| `- note: add @available attribute to enclosing instance method
192 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
193 |
:
195 | try await GKLeaderboard.submitScore(score, context: 0, player: localPlayer, leaderboardIDs: [identifier])
196 | } catch {
197 | logger.error("Error to submit leaderboard \(identifier) scores: \(error)")
| |- error: 'appendInterpolation(_:privacy:attributes:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
198 | throw GameCenterError.failure(error)
199 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:233:26: error: 'OSLogMessage' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
210 | /// - percent: A percentage value (0 - 100) stating how far the user has progressed on the achievement
211 | /// - banner: Define if achievement banner is shown with the local player progress.
212 | public func submitAchievement(identifier: String, percent: Double, showsCompletionBanner banner: Bool = true) async throws {
| `- note: add @available attribute to enclosing instance method
213 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
214 |
:
231 | }
232 | } catch {
233 | logger.error("Error to submit achievement \(identifier) progress: \(error)")
| |- error: 'OSLogMessage' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
234 | throw GameCenterError.failure(error)
235 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:233:56: error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
210 | /// - percent: A percentage value (0 - 100) stating how far the user has progressed on the achievement
211 | /// - banner: Define if achievement banner is shown with the local player progress.
212 | public func submitAchievement(identifier: String, percent: Double, showsCompletionBanner banner: Bool = true) async throws {
| `- note: add @available attribute to enclosing instance method
213 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
214 |
:
231 | }
232 | } catch {
233 | logger.error("Error to submit achievement \(identifier) progress: \(error)")
| |- error: 'appendInterpolation(_:align:privacy:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
234 | throw GameCenterError.failure(error)
235 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:233:80: error: 'appendInterpolation(_:privacy:attributes:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
210 | /// - percent: A percentage value (0 - 100) stating how far the user has progressed on the achievement
211 | /// - banner: Define if achievement banner is shown with the local player progress.
212 | public func submitAchievement(identifier: String, percent: Double, showsCompletionBanner banner: Bool = true) async throws {
| `- note: add @available attribute to enclosing instance method
213 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
214 |
:
231 | }
232 | } catch {
233 | logger.error("Error to submit achievement \(identifier) progress: \(error)")
| |- error: 'appendInterpolation(_:privacy:attributes:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
234 | throw GameCenterError.failure(error)
235 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:248:26: error: 'OSLogMessage' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
240 | /// - Throws: GameCenterError.notAuthenticated: if local player is not authenticated.
241 | /// GameCenterError.failure: If an error occurred, It holds an error that describes the problem.
242 | public func resetAchievements() async throws {
| `- note: add @available attribute to enclosing instance method
243 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
244 |
:
246 | try await GKAchievement.resetAchievements()
247 | } catch {
248 | logger.error("Error to reset achievements: \(error)")
| |- error: 'OSLogMessage' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
249 | throw GameCenterError.failure(error)
250 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:248:57: error: 'appendInterpolation(_:privacy:attributes:)' is only available in macOS 11.0 or newer
9 | }
10 |
11 | public class GameCenterKit: NSObject, GKLocalPlayerListener {
| `- note: add @available attribute to enclosing class
12 | private let logger = Logger(subsystem: "com.serrazes.gamecenterkit", category: "GameCenter")
13 | private(set) var localPlayer = GKLocalPlayer.local
:
240 | /// - Throws: GameCenterError.notAuthenticated: if local player is not authenticated.
241 | /// GameCenterError.failure: If an error occurred, It holds an error that describes the problem.
242 | public func resetAchievements() async throws {
| `- note: add @available attribute to enclosing instance method
243 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
244 |
:
246 | try await GKAchievement.resetAchievements()
247 | } catch {
248 | logger.error("Error to reset achievements: \(error)")
| |- error: 'appendInterpolation(_:privacy:attributes:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
249 | throw GameCenterError.failure(error)
250 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:257:13: error: 'GKAccessPoint' is only available in macOS 11.0 or newer
252 | }
253 |
254 | extension GameCenterKit: GKGameCenterControllerDelegate {
| `- note: add @available attribute to enclosing extension
255 | public func toggleGameAccessPointView() {
| `- note: add @available attribute to enclosing instance method
256 | if isAuthenticated {
257 | GKAccessPoint.shared.isActive.toggle()
| |- error: 'GKAccessPoint' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
258 | }
259 | }
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:272:40: error: 'init(state:)' is only available in macOS 11.0 or newer
252 | }
253 |
254 | extension GameCenterKit: GKGameCenterControllerDelegate {
| `- note: add @available attribute to enclosing extension
255 | public func toggleGameAccessPointView() {
256 | if isAuthenticated {
:
267 | /// - viewController: The view controller to present GameKit's view controller from.
268 | /// - viewState: The state in which to present the new view controller
269 | public func showGameCenter(viewController: UIViewController, viewState: GKGameCenterViewControllerState = .default) throws {
| `- note: add @available attribute to enclosing instance method
270 | guard isAuthenticated else { throw GameCenterError.notAuthenticated }
271 |
272 | let gameCenterViewController = GKGameCenterViewController(state: viewState)
| |- error: 'init(state:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
273 | gameCenterViewController.gameCenterDelegate = self
274 | viewController.present(gameCenterViewController, animated: true)
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GameCenterKit.swift:278:41: error: extraneous argument label 'animated:' in call
276 |
277 | public func gameCenterViewControllerDidFinish(_ gameCenterViewController: GKGameCenterViewController) {
278 | gameCenterViewController.dismiss(animated: true)
| `- error: extraneous argument label 'animated:' in call
279 | }
280 | }
[6/6] Compiling GameCenterKit GKPlayer+Extensions.swift
/Users/admin/builder/spi-builder-workspace/Sources/GameCenterKit/GKPlayer+Extensions.swift:7:59: error: cannot find type 'UIImage' in scope
5 |
6 | extension GKPlayer {
7 | func loadPhoto(for size: GKPlayer.PhotoSize) async -> UIImage? {
| `- error: cannot find type 'UIImage' in scope
8 | await withCheckedContinuation { continuation in
9 | self.loadPhoto(for: size) { photo, _ in
BUILD FAILURE 6.1 macosSpm