views:

369

answers:

1

In 3.0 they have Auto-Fill for Safari. You go into the settings app to turn it on, and it needs to tie into an entry in the Address Book.

I went into the Settings app to set up mine, and I noticed that it already had guessed who I was. Was it doing this using something in the API? If so, how do I access this function?

My iPhone syncs up to Address Book on my Mac, and the desktop app knows who I am. Does the iPhone now look at this same property?

+2  A: 

Unfortunately, there is no public API for identifying who the owner of the phone is.

If this is something you would like I recommend filing a bug report with the Apple developer connection.

Otherwise, (while I don't recommend it) you might be able to infer from the array returned from [[NSHost currentHost] names] who the device owner is.

tmh
There's no NSHost class in iPhone 3.0 SDK. There's NSFullUserName() [works in Simulator, haven't tested on the device].
porneL
NSFullUserName() just returns "Mobile User". Not sure that's going to be of much help. But you might be able to retrieve the phone number and key off of that. http://arstechnica.com/apple/news/2009/01/iphone-dev-user-phone-numbers.ars
Greg Maletic