Git Product home page Git Product logo

uidevice-with-uniqueidentifier-for-ios-5's Introduction

** NOTE: this is not going to work under iOS 7 **

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.

  • if your are using ARC in your project, you have to add the -fno-objc-arc flag to both files. Apple ARC Guidelines

  • use [[UIDevice currentDevice] uniqueDeviceIdentifier] to retrieve the unique identifier (it's a hash of your Bundle ID + MAC address)

  • use [[UIDevice currentDevice] uniqueGlobalDeviceIdentifier] to retrieve a global unique identifier (it's a hash of the MAC address, used for tracking between different apps).

  • have fun and follow gekitz ;)

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

License

see license file.

uidevice-with-uniqueidentifier-for-ios-5's People

Contributors

fleitz avatar gekitz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

uidevice-with-uniqueidentifier-for-ios-5's Issues

How unique is uniqueGlobalDeviceIdentifier?

I have a database of users which are identified by their udid and I'm now transitioning to your uniqueGlobalDeviceIdentifier. I'm wondering, is it possible that one of these new identifier ends up being the same as an old udid (but belonging to a different user)?

The udid used to be SHA1(SerialNumber + IMEI + WiFiAddress + BluetoothAddress), whereas this new identifier is MD5(MAC address). I'm not too familiar with how SHA1 and MD5 work, but is it a possibility that, even though all the variables are different, the end result ends up being the same, since they are encrypted using different algorithms?

Can't access MAC address

I understand that Apple are starting to restrict access to the MAC address too. Is this going to affect the functionality?

If so, has anyone got any plans as to how we can generate a unique ID for a device?!

Making a static library

Hi,

I tried to make the classes as static library but when I compiled, I always got this error: "Cannot find interface declaration for "UIDevice".

Target development is iOS 5 and XCode is version 4.3.2. If I required, I can email you the project.

MAC id deprecated in iOS 7

Making UniqueIndentifier using the MAC ID not going to work on IOS 7. Need some other technique if possible.

Actually viable in the App Store?

I see this is utilizing LLADDR, a BSD networking tool, to grab the mac address. Has anyone that you know of run this through Apple's private framework checks & review process to make sure it's OK to be using it?

How long do you think this will work?

OK, The apple don't want their devices have unique identifiers. But, you create exactly what apple don't want!

So.. Apple failed to achieve his goal. And now, what it can do against your program? Is easy to him detect this this codes and reject programs with it? You know program that was rejected because this?

What do you think?

How unique is this identifier?

Haven't inspected the code in great detail, but how unique is this identifier really? MAC Addresses are not unique. There is 16.7 million possible addresses per manufacturer. Given that Apple Sold way more iPhones (250 millions) than possible addresses is only a matter of time before you get same MAC Address for 2 different users.

My understanding is that the App's Bundle Identifier is also the same for all users that download the app, which will not make it unique if two users that have the same MAC address use the same app.

Am I missing something?

iOS 7 users receiving the same UDID

My users have just started upgrading to the iOS 7 beta, and I'm finding that their UDIDs have changed and hundreds of them are being assigned the same UDIDs as each other.

Enhance Readme

Would be nice if the readme contained:

  1. http://stackoverflow.com/questions/9897162/ios-uuid-generation-throwing-a-strange-exception <- The instructions to make sure both m files are compiled.
  2. Im using arc so at the above screen i also had to add "-fno-objc-arc" as a compiler flag
  3. add "#import "UIDevice+IdentifierAddition.h"" to the top of the .m file
    4.Better clarification as to the difference between global and regular. Im guessing the regular is app specific so an uninstall reinstall will give you a different number. Whereas global will be the same across reinstalls.

Just a suggestion. If you dont want to do it i can do a pull (i think thats what its called, still new to github)

[[UIDevice currentDevice] uniqueIdentifier] is global or local

I never thought about it, but this old way is global for all app, or only for one bundle identifier app? You give us this 2 way :)

For making this noise, I give you this function (I can't sent by git because my "stupid" firewall). Your code give a identifier that don't look like the apple one. Is only put this code to solve:

- (NSString *)lookLikeUniqueIdentifier {
    NSString *code = [[NSString stringWithString:self] uppercaseString];
    return [NSString stringWithFormat: @"%@-%@-%@-%@-%@", 
            [code substringToIndex:8], 
            [code substringWithRange: NSMakeRange(8,4)], 
            [code substringWithRange:NSMakeRange(12,4)], 
            [code substringWithRange:NSMakeRange(16,4)],  
            [code substringFromIndex:20]];
}

Add a version tag

Please, could you add a version tag?

I need this to create a cocoapods podspec to this library.

Thanks

License

An old 4-clause BSD license really? I'm going to add to my marketing material "This product includes tracking software developed by the Georg Kitz" :-P

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.