Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Dan 2 · Mar 10, 2010 at 10:01 PM · applescoreboardunique-identifiersonline-scoreboards

iPhone Unique Identifier

Hi,

I have the problem that I'm trying to submit and retrieve user scores to my online database from within the game, I'm pretty sure I've got the actual submitting and retrieving sorted using the WWW class and some kind of XML parser using php pages residing on my domain. That bit seems relatively straight forward.

However, so as I can identify a returning user and specifically show their score I need some kind of identifier that is submitted with the score and the users' chosen display name. I know that all iPhones and iPod touches have a UDID but whilst searching out how to pull that from the iPhone all I can find are reports of games being rejected for using 'private APIs' and companies being accused of 'harvesting'.

Of course I'm not wanting to do anything frowned upon by Apple and I can understand why Apple and/or a user may not want to hand out their device's UDID.

I'm struggling to find answers or a workaround, I was thinking that if it's not possible to retrieve the UDID then maybe I could issue my own unique identifier the first time a user submits a score and then store that within the game so when they return their score can be updated correctly.

Either method has pro and cons that I have thought of already, for instance if I am able to get the UDID and use that method, then if a user sells their iPhone/iPod, even if the app is removed, if it is re-added by the new owner score records would be carried across, although not sensitive info it doesn't seem like good practice.

On the flip side, if I am able to generate and store my own unique ID on the device (which I have no idea how to do yet, but know must be possible or how else do games offer save functions) then if a user removes the app , then re-installs they lose their ability to update previous scores.

I'm thinking I could use username and passwords so a user could retrieve their unique ID that I previously generated for them, but I'm trying to create a pleasant user experience, that is suitable for all users, I don't want to have to worry about privacy policies or communicating why they even need a username/password!!

I've only been developing on iPhone for a few months and have not yet published anything to the store, so please consider me a noob, and apologies if this is stupid question! Any suggestions, knowledge of rules and Apple's policy would be greatly appreciated.

Many thanks in advance.

Dan

---UPDATE---

In writing this question it's made me think generating my own IDs is the way to go since user may upgrade their iPhone/iPod or get a replacement for any reason, and instead of username/password simply ask for an email address, through which they can retrieve their ID and re-input it themselves, still a little messy though! Obviously Facebook connect is an almost perfect solution but that can of worms will probably have to be saved for an update! Suggestions still very much welcome... Thank you!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Eric5h5 · Mar 10, 2010 at 10:38 PM

You can use iPhoneSettings.uniqueIdentifier to get the device ID. It's not a private API.

Comment
Add comment · Show 5 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Dan 2 · Mar 10, 2010 at 11:58 PM 0
Share

That simple?? Wow, thank you very much!!

Dan

avatar image tonycoculuzzi · Apr 30, 2012 at 03:14 PM 0
Share

This just helped me so much. I thought it was going to be something complicated because of Apple's policy about UDIDs and such. Thanks!

avatar image Graham-Dunnett ♦♦ · Jul 10, 2012 at 02:16 PM 0
Share

It's now found at http://docs.unity3d.com/Documentation/ScriptReference/SystemInfo-deviceUniqueIdentifier.html

avatar image Tutanhomon · Oct 09, 2013 at 01:47 PM 0
Share

yeah, and it doesn't work

avatar image AllanMSmith · Feb 01, 2016 at 06:42 PM 1
Share

Unfortunately @Eric5h5 answer is not 100% accurate anymore. As Graham said, you can use the deviceUniqueIdentifier, however, it changes everytime the user uninstall/reinstall your app from their devices. I am still looking for a way to find a REALLY unique identifier now that UDID is a no go.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Implementing a leader board / high score (File read / write) 7 Answers

How is SystemInfo.deviceUniqueIdentifier computed? 2 Answers

How can I connect a set of variables to a unique identifier? 0 Answers

Erratic mouse Input.GetAxis values on OS X 0 Answers

xCode > testFlight 3 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges