I'm not looking to harvest information, I'm just trying to create a way to offer my users custom promo codes for In App Purchases since Apple doesn't offer promo codes for IAP. I'm looking for a way to identify a user when they move from device to device so I can unlock their In App Purchases they've gotten access to by using one of my custom promo codes.
Is there anyway to programmatically get the current user's iTunes Connect username?
No, and that is the way it should be. I, as a user, don't want that a developer can get my Apple Id which is also my email address.
The only way I think this works is to let the user create an account on a server which is managed by you.
Related
I know that apple do not permit to get programmatically details about phone's owner account. I can't have the email or any others personal informations, it's all about privacy.
If i want to identify a device instead of a user account, there is a similar situation, but in this case Apple is trying to fill this "lack of funcionality". From ios 11 there is a system that create a way to identify ( without show any personal informations ) a device.
DeviceCheck
So my question is: There is something similar but centered to user's identification ?
I don't need to collect/see personal info (lik emails,name,ecc..) , i need only an unique id that identify an apple user account. I have to store it in my system to check "if a user has did an action".
There's no way to do that. If you need to uniquely identify your users, create a UUID when your app starts the first time after installation.
Maybe someone knows, there are some plugin cordova, allowing to determine the user's Apple ID on iOS? I need to use this account to identify the user in the application, if it is, for example, decides to change the device to another. I would be very grateful for any help for two days looking for on the Internet, can not find anything. Sorry for my english
there is no way in iOS SDK to get AppleId (email or password) or any information about it this type of data is very sensitive and I hope well secured ;) So no plugin for Cordova.
To identify an user in your application you can use other ways, for example Game Center Account or Facebook login to identify user. I suggest you to find more information about these steps:
Allow user to sign using game center or facebook for iOS applications
Store obtained identifier at your server
Store app/game data at your server with obtained identifier
When user sign back to your app you can identify him at your server
You may restore some app/game data from your server after user sign on other device
Depends on your needs what you need to store and restore when user sign back.
Also I suggest read some parts from https://developer.apple.com/app-store/review/guidelines/ like 17.2, 22.7 before you made final decision about what and how you will ask user for some credentials or other private dat.
To identify a user across devices the only real solution is the implement an authentication system of some kind. There is nothing accessible through the API to uniquely identify the user.
I'm trying to learn about iCloud. I've read that there's
ubiquityIdentityToken and it's used to determine if iCloud is available or if the user changed the account signed in. Also, this is only available in ios 6+
But what i need to know is the unique data for every iCloud user. What i'm saying is, after the user logs into iCloud, is there a way for us developers to know who that persons is/who the account belongs to like a username or id (similar to Facebook's fbid/identiferForVendor)? Could we even get the iCloud account of the user in code?
The reason why I want to know this is because i want to check if it's possible to use the user's iCloud account(or whatever unique data we could get from them) as the user's unique identifier on our server.
I hope I could get some answers. Thank you so much!
You can use CKContainer.fetchUserRecordID(completionHandler:)
Returns the user record ID associated with the current user.
https://developer.apple.com/documentation/cloudkit/ckcontainer/1399191-fetchuserrecordid
This article shows example of practical usage of record ID retrieved in this way: Onboarding without Signup Screens.
Apple don't want you to do this. That is why they give you a unique token that is opaque. You can't use it as an id on your server. Apple do not allow iTunes accounts to be used in that way at this point in time.
I suggest you use your own account names, or you use accounts from Facebook or Twitter, which are accessible via system APIs on iOS.
I would like to build a mechanism to free my in-app purchases for some of my VIP users devices. My idea is I pre-save the UDID of the user devices in my backend server. When the app starts, it will call my server and get the list of udid and check if the device is in VIP list. if yes, directly show full features without any button to ask for in-app purchase.
However, UDID cannot be used anymore. What should I do in this case? I dont want to ask user to enter some codes. because it would disturb my user interface.
new updates of the question:
The purpose is that , I got a list of people that they will review my apps , but i dont want to have any pop up to ask for promo code or any specific UI for these people. So my idea is I ask them to give me their UDID (or whatever number that they can identify themselves for their phone), and I save them in my backend. When they download the app, the app call the backend and compare their identifier number/UDID, see if they are my VIP, and give them full features automatically without asking promo code and any UI specific for these user.
I would like to identify the user only. Do you guys have any solutions?
thanks
You could do something like provide a URL to the users which opens the app and gives the app some parameter(s). When the app receives these details it could show an alert to ask for a name or some other info (like an e-mail address) from the user. Then you can send the details to your server for verification and set some value in the app to enable the features. In this way the UI of the app is not changed.
I think it's not conform with the iOS/App Store TOS (to be clear).
The easy way is to use the UDID but we can't now... You can get another unique "number" for identifying the device like the Mac Address (you can get in in Objective-C, not really simple but you can).
You can add a button which asks for a promo code (maybe the same button to buy the in-app upgrade). Only those who have a promo code can get the upgrade for free.
Also, should it be "VIP users" rather than "VIP user devices"?
I want to create a social networking ios app which costs money, and when the user buys it they are allowed to create only one account on the app. So the purchase is associated with the account somehow... or the app has a specific id on each device its bought on... would I need to use gamecenter somehow...
How would I approach something like this?
Any help would be greatly appreciated.
First of all, more than one person may use the device (think a family with an iPad) so what your doing is inherently a bad idea.
That said, you can use an in-app purchase to let them buy account access - check with the server first to make sure a desired username is available, then let them use an in-app purchase to buy access, and on your server tie that purchase ID to the user name. Even if they deleted the app and tried to re-purchase (while logged into the same iTunes store account) it would see a purchase had been made and essentially be the same user. It even does kind of work with multiple users as they could switch iTunes accounts (though that is a pain).
I would also suggest trying to tie it to the users iCloud account in some way, which is easier for users to switch between on an device (a family might use one iTunes account but have separate iCloud accounts).
If you don't want to give Apple 30% of the registration fee, your only option is to have users sign up on the web and pay there, then have a login they can use in your app. Then it's a matter of trying to prevent duplicate logins on you server, although as a last point of thought, I can't remember a business that succeeded by refusing people's money.
You could generate an unique id on the phone, store it in the keychain, and use that to communicate with the server.
Since you are creating your own account management system, just save the user information once they do the account creation bit and never show the option again. Because developers no longer have access to the device id, you may have problems identifying an existing user if they delete and re-install the app, but I am not sure that there is a solution to that problem.
Edit: As a commenter to this question mentioned, you can save things to the keychain. Check out this link for a good lib for modifying the keychain.