Solved

Store settings in ios5 app

Posted on 2012-03-19
3
582 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
[X]
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
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

In this article I'm going to cover the basics and usages of NSInvocation. What is NSInvocation? Apple Developer Reference describes NSInvocation this way: An NSInvocation is an Objective-C message rendered static, that is, it is an action tur…
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…
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.

749 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