Returns an initialized score object using the local player and the current date.
SDKs
- iOS 7.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 3.0+
Framework
- Game
Kit
Declaration
init(leaderboardIdentifier identifier: String)
Parameters
initializer
Identifies the leaderboard that the score is being sent to.
Return Value
An initialized score object, or nil
if an error occurred.
Discussion
Your game explicitly allocates and initializes a score object using the current player and date when it needs to report a new score to Game Center.