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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Unique Identifier Help! faffoo Mac Programming 12 Jul 8, 2011 12:49 PM
Vmware Fusion: How to get a unique externally (from the Mac) accessible IP? lokiju Mac Applications and Mac App Store 2 Feb 10, 2010 09:57 AM
TCP client unique identifier? boapps iPhone/iPad Programming 1 Aug 8, 2009 11:14 AM


All times are GMT -5. The time now is 01:01 AM.

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

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