From 237817727e7f0f39b2a278c36d8a00a3f6eba9a0 Mon Sep 17 00:00:00 2001 From: Rafael Escaleira Date: Thu, 22 Aug 2024 14:26:20 -0400 Subject: [PATCH] Update RefdsGameCenter.swift --- .../GameCenter/RefdsGameCenter.swift | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/Sources/RefdsGamification/GameCenter/RefdsGameCenter.swift b/Sources/RefdsGamification/GameCenter/RefdsGameCenter.swift index bfae59e..e223ece 100644 --- a/Sources/RefdsGamification/GameCenter/RefdsGameCenter.swift +++ b/Sources/RefdsGamification/GameCenter/RefdsGameCenter.swift @@ -1,5 +1,4 @@ -import Foundation -import SwiftUI +import UIKit import RefdsShared import GameKit @@ -14,8 +13,7 @@ public final class RefdsGameCenter: NSObject, GKGameCenterControllerDelegate { } else if let viewController = viewController { UIApplication.shared.rootViewController?.present( viewController, - animated: true, - completion: nil + animated: true ) } else if let error = error { completion(.failure(error.refdsError)) @@ -47,8 +45,7 @@ public final class RefdsGameCenter: NSObject, GKGameCenterControllerDelegate { UIApplication.shared.rootViewController?.present( viewController, - animated: true, - completion: nil + animated: true ) } @@ -64,9 +61,6 @@ public final class RefdsGameCenter: NSObject, GKGameCenterControllerDelegate { } public func gameCenterViewControllerDidFinish(_ gameCenterViewController: GKGameCenterViewController) { - gameCenterViewController.dismiss( - animated: true, - completion: nil - ) + gameCenterViewController.dismiss(animated: true) } }