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.
Related
I have made a social application, since I don't like apps that asks to create a profile...remember passwords...etc, my app works without login needed.
In order to identify an user, I use the UDID. In iOS6, Apple doesn't provide no more access to UDID, but forces developer to use the identifierForVendor, the problem is that this identifier changes if the application is deleted and installed again...or if the application is upgraded.
What are your suggestions to save users profiles?
Is there other ways to have a kind of "login" without an account?
Thank you very much.
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
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.
There is any way for identify that user is installing my app again? Actually in my app i have a feature user can translate some word for free but after that he have to pay. I am using in app purchase for same. But what if user delete app and install again ? he will be able to translate again for free.How to know app was previously install on that device?
Application goes to the App Store for in app purchases. If user has already bought that item, it returns true to your request. User won't pay it again each time.
Some implementations of in app purchases use the keychain to record purchase flags or freebie flags as you mention.
This blog entry will show you how to store and retrieve something from the keychain.
This approach really doesn't to my mind sit well with the principal of sandboxing an application so I expect it's frowned upon by Apple and by purists but if you search SO then you will find other posts relating to in app purchases and using the keychain.
See this answer as it seems to be pretty definitive on the subject.
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.