<!--
{
  "availability" : [
    "iOS: 4.1.0 - 7.0.0",
    "iPadOS: 4.1.0 - 7.0.0",
    "macOS: 10.8.0 - 10.10.0",
    "visionOS: 1.0.0 - 1.0.0",
    "watchOS: 3.0.0 - 3.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "GameKit",
  "identifier" : "/documentation/GameKit/GKScore/init(category:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKScore(im)initWithCategory:"
  },
  "title" : "init(category:)"
}
-->

# init(category:)

Returns an initialized score object.

```
init(category: String?)
```

## Parameters

`category`

An identifier for a specific leaderboard you’ve configured in App Store Connect. Must not be `nil`.

## Return Value

An initialized score object, or `nil` if an error occurred.

## Discussion

Your game explicitly allocates and initializes a score object when it needs to report a new score to Game Center.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)