Last active
September 23, 2020 20:59
-
-
Save regularberry/2ba472ebf99c141ae12557c4d745c7c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override func viewWillAppear(_ animated: Bool) { | |
super.viewWillAppear(animated) | |
CLSDataStore.shared.mainAppContext.descendant(matchingIdentifierPath: [game.identifier]) { context, _ in | |
context?.becomeActive() | |
if let activity = context?.currentActivity { | |
activity.start() | |
} else { | |
context?.createNewActivity().start() | |
} | |
CLSDataStore.shared.save() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment