Get an iPad/iPhones unique information from your app? - iphone

How do you get the unique identifying information from an iPhone/iPad within an app? For instance, I want my app to send support emails to my website for users who have problems and I need to uniquely identify the phone number/id of the device it is running on. Is this possible, forbidden?

The unique identifier for the particular iPhone you're running on:
NSString *uniqueIdentifier = [[UIDevice currentDevice] uniqueIdentifier];
More info on CFUUID

There's some discussion about getting the user's phone number here:
Programmatically get own phone number in iOS

Related

How to grab the user's device token and attach it to an email as PDF file?

My app has a voting topic and to avoid cheating I'm planing to let the user to vote by email which includes his/her device token so I can find out if the user voted more than one time. Is there any way to grab the user's device token and attach it to this email as a PDF file for example? if so can anyone please provide me with a sample code?
Thanks in advance.
First of all this seems to be a really bad idea, sending an email and attaching a file... just ugly. Better open a URL on your voting server including the ID of the device.
You can get the unique ID of the device like
[[UIDevice currentDevice] identifierForVendor]
or prior to iOS 6 you could use OpenUDID.
Then use NSURLConnection to do the voting.

Tracking an iOS App user

All,
I would like to collect stats on what users are entering into my apps' search box so I created a web service that phones home with the search string they typed in along with the number of results it returned.
How can I relate these search stats to a specific device? I heard that Apple is going to disallow the access of user device ids:
//deprecated
[[UIDevice currentDevice] uniqueIdentifier]
You could use a third party for your analytics, instead of the web service. Try:
Flurry.com
is a good one.
Then you could use an app like Stats for Flurry to view your statistics:
Stats for Flurry
Yes, Apple has deprecated UDID - but they have provided another method to uniquely identify your users per app. You need to use:
CFUUIDCreate
You could try Flurry, Google Analytics and TestFlight. If you choose one of those, it will save your efforts. Also, if you want to track bugs, BugSense will help you a lot.

How to identify iPhone/iPad user's itunes account information?

I am working on a sync solution for my app, and I would like to be able to find out if the user who has just downloaded my app would like to sync the app's data with the same app but hosted on another device (e.g., installed on both an iPhone and an iPad), so I can prompt the user to set up syncing. Is there a way to either (a) get the user's iTunes account information (the email address or some other unique identifier), or (b) identify if the user's iTunes account has already installed the app on another device?
Theres absolutely no way to get user's iTunes account information; that would be a security issue. The devices themselves have a Unique Device ID which can be obtained using:
[[UIDevice currentDevice] uniqueidentifier];
If you implement UrbanAirships AirMail /Push feature, if the user opts to receive push messages from your app, you can view how many users are opt'd in, and if you set the device name property, but thats about it.
Also, to sync data between multiple devices and such, I would suggest Dropbox.

Where to look for documentation regarding iPhone telephone app

I'm new to the iPhone sdk and I'd like to know what kinds of functionality and documentation exist for the iPhone telephone app. Ie how can you make calls/get any information about calls for your personal iPhone app?
Thanks!
There is no API in the current iOS SDK to retrieve call history or make calls from within your app. There is an Address Book API (which will let you retrieve all the details for contacts in the iPhone Address Book, including phone numbers, etc.) but I don't think this is what you want. If you wanted to launch the Phone app and initiate a phone call from your app, you could do the following:
NSString *phoneNumber = #"8885555";
NSString *phoneURLString = [NSString stringWithFormat:#"tel:%#", phoneNumber];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:phoneURLString]];
Note that this will close your app and open the Phone app.

Read IPhone or iPad UUID using web application

Do you know if is possibile to get the uuid, the result of [[UIDevice currentDevice] uniqueIdentifier], using a web app ?
I need to access from iphone/ipad a web page using safari (and not UIwebview under application control) and I should identify the device using its UUID.
For example I would like to send an email Message to a user containing a link. When the receiver opens the link from its device I should autenticate him/her through UUID ?
Any suggestion ?
Thanks
Dario
No this isn't possible as far as I'm aware.