Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9277355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T17:05:16+00:00 2026-06-18T17:05:16+00:00

I am developing an iDevice game and I would like to store the local

  • 0

I am developing an iDevice game and I would like to store the local player’s scores on the device. However, the local player may change. For example, if a family shares an iPad, then they may sign in to GameCenter separately before playing the game. To solve this problem, I decided to store the local scores as a dictionary where the keys are determined by the local player and the values are arrays of GKScore objects.

My first idea was to use the GKLocalPlayer shared instance as the key, but since it doesn’t conform to NSCopying, GKLocalPlayer is not an ideal key candidate. My second idea was to use the local player’s identifier, but Apple states “Do not make assumptions about the contents of the player identifier string. Its format and length are subject to change.” Naturally, I am concerned that a player might lose their local scores if their player identifier magically changes one day.

My final idea was to use the local player’s alias. I have confirmed that the alias string for an unauthenticated local player is equal to nil. Is it safe to use [NSNull null] as a dictionary key in this case? Is it safe to assume the local player’s alias will remain consistent?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T17:05:17+00:00Added an answer on June 18, 2026 at 5:05 pm

    The only thing about the player that is guaranteed to be permanent is the playerID string. When it says the format and length are subject to change, that’s in the context of trying to interpret the context of the string. AFAIK it isn’t that it a particular player’s ID might change, but that Apple might generate IDs using a different scheme in the future, so you shouldn’t depend on the string having any particular format or certain information being derivable from the string.

    The docs are pretty unambiguous about that being the right way to do it, though:

    Every player account on Game Center is permanently assigned a unique player identifier string. Your game should use this string to store per-player information or to disambiguate between players

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Developing a game with AndEngine GLES2 I am having an issue trying to change
developing for Android phone(ver 1.5) I would like to know if there is an
Developing a simple game for the iPhone, what gives a better performance? Using a
I have been developing an app for an iDevice, and I wanted to create
Developing an iPhone application on Xcode 4.5.2. Device: iPhone 4. I was preparing my
I´m developing an app like Blackberry Travel. In Blackberry Travel, when add a flight,
Developing a Sencha Touch MVC app that pulls data from json store (thats set
Developing websites are time-consuming. To improve productivity, I would code a prototype to show
Developing for Android 2.3, I have a question regarding layouts. I use a vertival
Developing a project of mine I realize I have a need for some level

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.