Skip to content

Commit

Permalink
Update RefdsGameCenter.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelesantos committed Aug 22, 2024
1 parent fd21a27 commit 2378177
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions Sources/RefdsGamification/GameCenter/RefdsGameCenter.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Foundation
import SwiftUI
import UIKit
import RefdsShared
import GameKit

Expand All @@ -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))
Expand Down Expand Up @@ -47,8 +45,7 @@ public final class RefdsGameCenter: NSObject, GKGameCenterControllerDelegate {

UIApplication.shared.rootViewController?.present(
viewController,
animated: true,
completion: nil
animated: true
)
}

Expand All @@ -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)
}
}

0 comments on commit 2378177

Please sign in to comment.