Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
147 views
in Technique[技术] by (71.8m points)

ios - What exactly does resolveConflictingSavedGames in GameKit do?

According to the documentation, The GameKit function resolveConflictingSavedGames resolves conflicting saved games. However, I don't really understand what it does exactly, and how to use it.

  • Does it replace the data in all saved games in the provided conflictingSavedGames array with the data provided in Data?
  • Do I have to handle the GKSavedGame passed to the completion handle in some way? I.e manually erase the old ones and save the new savedgame?
  • Am I supposed to call it when loading or saving?
  • Should I always call it when there are multiple savedgames tied to one filename?

The function:

 func resolveConflictingSavedGames(
      _ conflictingSavedGames: [GKSavedGame],   
      with data: Data, 
      completionHandler handler: (([GKSavedGame]?, Error?) -> Void)? = nil)

Documentation for resolveConflictingSavedGames

question from:https://stackoverflow.com/questions/65881086/what-exactly-does-resolveconflictingsavedgames-in-gamekit-do

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...