Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Mar 22, 2009, 10:52 AM   #1
davbeck
macrumors regular
 
Join Date: May 2008
Location: Reno, NV
Getting a unique identifier

How do I get a unique identifier for a computer with cocoa? Or how can I tell that my application is running on a different machine?
__________________
13" Unibody Aluminum MacBook, 2.4GHz, 4GB RAM, 250 GB HD; 16 GB iPhone 4;
davbeck is offline   0 Reply With Quote
Old Mar 22, 2009, 11:36 AM   #2
Wes
macrumors 68020
 
Wes's Avatar
 
Join Date: Jun 2001
Location: London
Send a message via ICQ to Wes Send a message via AIM to Wes Send a message via MSN to Wes Send a message via Yahoo to Wes
MAC address seems like a good choice here.

From the terminal you can do ifconfig en0. You can make a system call and parse that. I don't know the Cocoa API but I assume Apple will have a wrapped that too, potentially here:
http://developer.apple.com/documenta...CH203-CHDDEDFJ
Wes is offline   0 Reply With Quote
Old Mar 22, 2009, 12:33 PM   #3
MrFusion
macrumors 6502a
 
Join Date: Jun 2005
Location: West-Europe
Quote:
Originally Posted by Wes View Post
MAC address seems like a good choice here.

From the terminal you can do ifconfig en0. You can make a system call and parse that. I don't know the Cocoa API but I assume Apple will have a wrapped that too, potentially here:
http://developer.apple.com/documenta...CH203-CHDDEDFJ
A MAC address can be changed. Don't use it for security applications.
MrFusion is offline   0 Reply With Quote
Old Mar 22, 2009, 12:37 PM   #4
Wes
macrumors 68020
 
Wes's Avatar
 
Join Date: Jun 2001
Location: London
Send a message via ICQ to Wes Send a message via AIM to Wes Send a message via MSN to Wes Send a message via Yahoo to Wes
http://developer.apple.com/samplecod.../listing1.html

There's a little code.

I guess you could also get the serial number:
http://discussions.apple.com/thread....402&tstart=105
Wes is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Strange model identifier yjchua95 iMac 2 Nov 2, 2013 03:43 AM
Undeclared identifier in UIAlertView Kapthehat iPhone/iPad Programming 2 Sep 2, 2013 06:19 AM
Apple Will No Longer Approve Apps Using Unique Device Identifier (UDID) Beginning May 1, Must Also Support iPhone 5 and Retina Display MacRumors MacRumors.com News Discussion 99 May 6, 2013 06:32 AM
Edit Mac Hardware UUID (Universal Unique Identifier) padgo iMac 0 Feb 7, 2013 10:44 PM
12,5 will be the model identifier of the new iMac Puevlo iMac 5 Sep 4, 2012 11:35 PM

Forum Jump

All times are GMT -5. The time now is 10:46 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC