John
John

Reputation: 2480

Requesting data about user iOS

Is there an API in iOS which would allow me to discover information about the user who owns the phone?

The address book api would allow me access to their contacts, but how would I find out about the self user?

Thanks!

Upvotes: 1

Views: 136

Answers (2)

Dylan
Dylan

Reputation: 1161

You could go through all the contacts in the Address Book and see if any of them are marked with the owner flag.
Edit
This was removed a while back, another way is getting the device name UIDevice.currentDevice().name
"Bob's Iphone"
Then you could cylce through the address book and find a bob, this is a solution i wouldn't recommend, the best bet might be to ask the user for their details

Upvotes: 1

RyanM
RyanM

Reputation: 761

Well there's not much more you can get from a user due to them wanting their privacy but there are a couple of things you can still find out about a user:

  • Get Device Info (find out more about their device)
  • HealthKit API (Get users health data like how many steps they make what they eat and drink etc)
  • Photo Album Access (access to their photos and videos)

That's about it really! Hope it helps :)

Upvotes: 1

Related Questions