Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Store settings in ios5 app

Posted on 2012-03-19
3
Medium Priority
?
607 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:Curtis Long
3 Comments
 
LVL 30

Expert Comment

by:IanTh
ID: 37738315
0
 
LVL 20

Accepted Solution

by:
darbid73 earned 2000 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:Curtis Long
ID: 37738944
Works great! Thanks
0

Featured Post

[Webinar] Cloud Security

In this webinar you will learn:

-Why existing firewall and DMZ architectures are not suited for securing cloud applications
-How to make your enterprise “Cloud Ready”, and fix your aging DMZ architecture
-How to transform your enterprise and become a Cloud Enabler

Question has a verified solution.

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

When Apple released Swift last year, the aim was to introduce a new programming language for Cocoa and Cocoa Touch that was fast, easy and effective, like the name connotes. Apple succeeded. Swift is designed to couple with Objective-C program…
While there are many new features for iOS 11, these are the five that can improve your digital lifestyle.
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 response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

971 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