3

I was tasked with a subject that requires immediate development, but I'm at lost. The task was to make a Mac App to get the UDID (and other information) of an iPhone plugged in a Mac and then export it in a csv file. The same thing can be achieved through iTunes or iPhone Configuration Utility, copy-pasting to Excel or Numbers, but it is very time consuming and the users requested something like this:

-User plugs iPhone on Mac

-User runs app.

-iPhone data is fetched and gets exported to a csv file.

The csv file export is already covered, so what I need right now is a method (as Sarah said in the comments) on the Mac SDK that will let me get those information. After hours on google I found out that I can use IOKit to get information from devices connected fror the USB ports, but nothing else came up specifying on how.

Sorry if it is too simple, I think a simple google search can suffice but I still can't find any leads.Thanks for the help.

EDIT: I now think that it is not that simple. I've gotten to the point of using IOKit to get information from a USB device using this sample. But after that I have no idea what to do. I'm still reading on the IOKit documentation, but if ever there are others who've encountered this and know the solution it would be a great deal of help.

IBG
  • 465
  • 12
  • 34
  • so basically you need a method to fetch the UDID? – Yama Apr 02 '12 at 04:27
  • 1
    yes, and possibly other info as well such as the serial number and WiFi Mac. I think my question is not very clear, I'll edit it. Thanks. – IBG Apr 02 '12 at 04:42
  • This question does not contain or concern Objective-C; please do not add that tag. – jscs Apr 02 '12 at 07:00
  • @IuliusCæsar But I need this done in Xcode, hence the obj-c tag. Am I not correct about this? I'm not very good with tags. – IBG Apr 02 '12 at 07:17
  • You may want to take a look at Apple's recent announcements that UDIDs will no longer be accessible... – Joshua Nozzi Apr 02 '12 at 12:50
  • @JoshuaNozzi yes I am aware of that and we recently changed our unique identifier to a different format. But I think the case here is different, since the information will be extracted from a Mac. Just like the Summary page of iPhone Configuration Utility where the MAC addresses and serial and UDID is displayed, that's what I want to get. – IBG Apr 03 '12 at 00:32

1 Answers1

2

Check this link (for UDID and Serial number) and this too (for mac addredd). Also

UDID :

NSString *udid = [[UIDevice currentDevice] uniqueIdentifier];

Community
  • 1
  • 1
Yama
  • 2,649
  • 3
  • 31
  • 63
  • I think this is getting the information from an iOS device. Someone messed up with my tags. I need to get the information from a Mac OS X Application. Like when opening up iPhone Configuration Utility, you can find the information on the Summary page. That's what I was looking for. – IBG Apr 02 '12 at 05:19
  • you need to mention clearly. the sentence "The task was to get the UDID (and other information) of an iPhone plugged in a Mac" explains that you need details of an iOS device only. Make it clear. – Yama Apr 02 '12 at 05:36
  • I got to the IOKit part so the first link (about UDID and Serial Number) seriously helped. +1 for that. Thanks. – IBG Apr 02 '12 at 09:34