Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Store settings in ios5 app

Posted on 2012-03-19
3
577 Views
Last Modified: 2012-06-21
My iOS app has a need to uniquely identify each device so it can retrieve files that it has uploaded to the server with as little user interaction as possible (IE we don't want the user to have to have a username and password). With the release of iOS5, apple has deprecated the UDIDs which would have been the easiest way to go about this. The other way would be to generate and store an identifier on the device and read it from there every time. However, apple could at any time delete the files because they feel there isn't enough free space on the device.

Is there a way to store a device identifier on the local filesystem without worrying about apple "cleaning" it for me?

Or if there's not, how would I go about generating a device identifier that would be the same for one device no matter how many times I generated it but still different from all other identifiers?
0
Comment
Question by:HDM
3 Comments
 
LVL 30

Expert Comment

by:IanTh
ID: 37738315
0
 
LVL 20

Accepted Solution

by:
darbid73 earned 500 total points
ID: 37738687
Here is what I use to make one.  There are two different kinds in there.

Description

Apple stopped supporting a unique identifier for iOS. This source code solves the problem. It generates a unique identifier based on the mac address of the device in combination with the bundle identifier.

What you need to do:

    copy NSString+MD5Addition and UIDevice+IdentifierAddition to your project.

    use [[UIDevice currentDevice] uniqueDeviceIdentifier] to retrieve the unique identifier or

    use [[UIDevice currentDevice] uniqueGlobalDeviceIdentifier] to retrieve a global unique identifier (used for tracking between different apps).

    have fun and follow twitter.com/gekitz ;)

//Thanks to Erica Sadun for her UIDevice+Hardware Addition (used for the mac address retrieval).
0
 

Author Closing Comment

by:HDM
ID: 37738944
Works great! Thanks
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Basics of Storyboard Storyboards were first introduced to developers in the release of iOS 5. They save the developer the trouble of designing each screen’s interface in a different file. The storyboard allows you to see the conceptual mockup o…
Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question