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

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.

Related

Persistent device identifier even after app gets uninstalled

In my iPhone/iPad app's use case, there is a voting system and one device can send its vote once to the server. Therefore my server needs to identify user's device. I don't want the user to register an account because that makes the app complicate. However, I couldn't find a solution that works.
UDID is deprecated
I presume getting MAC address will get your app rejected by the app review process
I tried creating my own UUID using [[NSUUID UUID] UUIDString] and then storing it using NSUserDefaults, but the settings disappear if the user uninstalls the app
identifierForVendor is also reset when the user uninstalls the app
I considered advertisingIdentifier but because I'm not using it for advertisement, I presume it will also be rejected by the app review process
I'm not asking for a bulletproof solution in every situation. Just a solution that works even if the user uninstalls the app. Because I can generate my own UUID, I guess my question boils down to: How I can save data for the app that survives app uninstallation?
However if any of you have other approach, please feel free to inform me. Thanks.
Save the UUID into the keychain.

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

Prefill user data just after download and first launch iPhone app

User downloads my iPhone app from the appStore link I provide from invite email. Is it possible to persist/cache the user-data say email Address and pre-fill when the app launched.
Thank you.
You can get all the data that Apple allows you to get, which is absolutely none - you can't get the user's email, you can't get his phone number, you can't get his UDID. No way to identify him. If you want anything from the user, he needs to enter it manually. If you think about it - it's actually a good thing. All your iphone information is completely secure and protected.
No, this can't be done. Your special link might take the user to the app store, but then that's it. The act of installing the app has nothing to do with your link anymore and no data can be passed to the freshly installed app.
Of course once the app is installed, if the user taps on a special link you provide, it could force your app to run and provide data to it.
Maybe you could provide a QR code the use can scan with your app the first time they run it. The QR code can contain the data you want. Of course the user may choose to not scan the code. Then again, the user can install your app without using your link to begin with.

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.

Unique identifier for an iPhone app, NOT device

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.