Apple recommends using the primary MAC (Media Access Layer) address instead of the machine serial number to uniquely identify a computer for this purpose. Read:

http://developer.apple.com/technotes/tn/tn1103.html

You can find some code on developer.apple.com named "GetPrimaryMACAddress.c" for getting this.

Another possible cause of no serial number is that the machine is a so- called "Hackintosh"; non-Apple hardware modified to run Mac OS X.

I modified GetPrimaryMACAddress.c, adding a Cocoa wrapper and the ability to handle null MAC addresses by substituting the user's primary email if the primary MAC address comes up NULL. (It was been reported to me that Hackintoshes don't report MAC addresses either.) It's straightforward. The implementation is too long to paste in here but if anyone wants it I can post it somewhere. Here's the .h:

#import <Cocoa/Cocoa.h>

@interface SSIOKit : NSObject

+ (NSData*)primaryMACAddressData ;
//+ (NSData*)machineSerialNumberData ; // not recommended

@end

_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to