Unique identifier for an iPhone app, NOT device - iphone

I want to avoid user registration in my app, and to identity my user by purchased app.
If someone purchase app on his iPhone, and with the same Apple ID download this app on other device, I want to use the same settings and content on this devices.
Is posible to use identifiers like AppleID (without entering in input field by user)?
I found similar question but UniqueIdentifier is unique only for physical device, not for user.

No. Apple does not give an app access to the user's Apple ID without the user's involvement. And for good reason.

I don't think you should outsmart the user. You can't assert that the user will want the same settings on another device. For instance I manage all my family iphones and download apps for them, all of them have their own accounts in apps and like different preferences. That's why it's the best to allow users to create accounts and sing in. This way user has a clear understanding what he/she is doing.

Related

Paid App : need to uniquely ID the user

I am designing a paying app that will require users to create their own profile.
This app will of course be downloadable on each of the devices the user has.
This is the precise scenario I want to bypass :
the user downloads the App on an iPhone
he creates an account and start using the app that makes server
calls
he downloads the app on his iPad and with his login & password
retreives the data on the server, so far so good
Now, he lends his iPad to a friend (who didn't pay for the app).
The friend wants to use the App, and wants to create his own
account. Yet, I want to forbide this since he didn't pay for the
App.
So my problem is : I want to restrict the use of the app only to the user that paid for the App, not for his friend.
Of course, I cannot use the AppleID since there is no way to reach it from code.
I thought one moment that I could use iCloud like mentioned here but since the ( iOS unique user identifier )user can choose not to use iCloud, my problem is not solved ...
Is there an easy solution that I missed to solve that issue?
You friend will be using different apple id. You could use Restoring Transactions api of apple to get understand whether the user has purchased the app or not. This is possible for non-consumable in app purchase. Please do check the below link :
https://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/StoreKitGuide/MakingaPurchase/MakingaPurchase.html#//apple_ref/doc/uid/TP40008267-CH3-SW1

How I verify that user installed an iPhone app?

We provide advertising capabilities to iPhone app customers, where they can advertise apps to millions of users on social network, and stand out among large number of apps in app store.
Now, to prove the ROI, we also want to provide statistics of how many users actually installed the app using our advertisements on social network.
My question is:
How do I verify whether user installed an app (when user clicks on advertisement and we take user to App Store (on mobile device) or itunes page (on PC/Mac) )
Is there a way to integrate with developer's interface to get this information?
Thanks in advance.
This is a broad question and there are some simple solutions which may require some work. Apple provides you no feedback for when an app is installed. Assuming you are storing the click of the ad on a server you will need to match to that click with something you send up when the app is opened for the first time.
(if the ad is shown in a native app on the phone) You can send up a unique key when the click happens and also send that same unique key when the app opens for the first time and match them on the server. This key can be a hashed mac address or something you save to the UIPasteboard. This requires integration on the side of your clients app because they will need to send a http request to you when the app launches.
If the social network is web based then your best bet is to match on IP address which isn't perfect but can give you a high percentage of accuracy.
I guess I'm assuming you are hosting the ads though. If you are not then you will have to rely on what the ad networks give you and many of them can provide some form of install tracking.
Well, you can always look at that persons phone and check if your app is present there :P
Just kidding.
You have some ways to get information such as these.
If you have registration in your app, you can monitor the userInfo, along with the UDID.
You can setup some webservice calls on applicationDidFinishLaunching for the first time events (using NSUserDefaults key to save the first time info) and use that.
Check out FLURRY for data analytics in your app. This is an awesome service, and allows you to track your users and how they interact with your app. I would recommend this !
Most ad networks have conversion tracking capabilities, but once you click an ad from the web and go to iTunes, all hope is lost tracking a conversion.
I guess you'd be able to track a conversion if you require the user to provide information (like an email address) before directing them to the appstore then requiring them to input that same email once the app is opened.

How to identify user across devices on iOS?

I am working on an app where user will be buying some "credits" as in-app purchases and use them to buy some services inside the app. As user can has more then one device I need to identify him across different devices.
I understand I can create some logging (and store user accounts on my own server) but I would like to avoid this. In best case I would like to use Apple ID but I can't figure out how can I access Apple ID inside an app?
I found similar questions here but no satisfying answer. I do not believe there is no chance to access Apple ID from the app (I don't need password, just the id) as I found something like AVMetadataiTunesMetadataKeyAppleID in AVFoundation but this framework seems to be only for Mac OS X.
Any suggestion how to solve this?
Sorry. There's no way to do it without implementing your own authentication system on your own server. UDIDs are unique to each device and Apple does not give access to the iTunes user account whatsoever.
Other way is you can use facebook authentication in order to achieve that. Just connect you app with facebook api and u can keep their login address with some additional info.
Furthermore, it might be useful for your app if they can share your app with their facebook friends :p
You can identify user with help of GameKit.

Is it possible to get the user's apple ID through the SDK?

is it possible to get the user's information, such as apple ID, through the sdk? I am writing an app which will require an account linked to the app user. I want to allow the user to have one account across multiple devices, so using the device ID is not possible. The easiest way to do this, I am thinking, is to use the app user's apple ID as this account's ID, so not requiring them to create yet another account.
No, it's a privacy issue, just like their phone number.
They'd still have to create an account on your site since you don't have access to Apple's databases, and no one will be willing to give you their iTunes passwords for obvious reasons.
All you're really saving is them entering a user name, since they'd still have to give you a password. It's very easy to remember this data for future runs of your application. Look into using NSUserDefaults. I would recommend against using the UDID and give the user the option to save their password. That way if the phone is lost, whoever finds it doesn't have automatic access to the owner's account. If the user opts for automatic login, you can easily save the password and send it along with the username when the app loads.
It's not (AFAIK) possible. You can only retrieve the device's UDID.
What I've done in the past is link an account on my side with multiple UDIDs on the user's side, so when they install the app on various devices they can just use that single account and it will automatically link that device. Not ideal, but I've not seen a better solution.
If it is a game, you can use the Game Center Account to identify an user
Instead of the UDID for the device, you might try the [UIDevice currentDevice].identifierForVendor It is linked to the device and the app installation.
I am storing the username and encrypted password in a file that is stored in the user's application file space. When the app starts up, if it finds this file, it attempts a login without asking the user. Having a password, even encrypted, stored in the file system does seem insecure, but the application is not one where people are apt to try and steal passwords.

iPhone appstore account name programmatically

Is there a way in the iphone sdk to retrieve the name of the account which bought the application programmatically?
With account name I mean the name you use to login into iTunes.
Edit
To make it more clear, I mean the account name you can find under your iPhone settings under 'Store'.
Edit
Might it be accessible trough NSUserDefaults?
There is no documented way to do this, and if you try and hack around it, you may find yourself rejected by the AppStore reviewers. Apple tries to protect its customers info.
I have an addition to the question:
Is there a way at least to confirm (programmatically) that the application was purchased from AppStore?
Or, maybe, there is a way to get a list of devices IDs from AppStore that purchased my app?
The reason is the willing to determine if the application was legally purchased or not...