IS storing data without user signing in on flutter app possible? - ios

I'm making a card game for apple appstore that consists of 5 decks, 2 of them being free to play and 3 of them needed payment to be unlocked. I am not currently planning to do a login for my app. Would there be any way for me to track whether or not the user has paid and unlocked a particular deck?

If you want to detect if user bought something and you need to do it in different devices and even in the same device if user uninstall / install again, you'll need to implement a sign up strategy.
If you don't care about cross device, cross installations.. then you could generate an installation id that you're sure to be unique and send it to the server the first time the app is opened and use that to identify activity on that device/installation in the future.
You could use a uuid or any other identifier that you know that won't be used by anyone else.
So the flow would be:
App opened for first time
Generate installation id
Store it locally
Send installation id to server
Send it in the future to identify current installation

Related

iOS DeviceCheck API - Will the token remain same if user uninstall the app

We want to prevent user from creating multiple profiles on same device.
For this we first tried IDFA but IDFA can be reset anytime from Settings.
Then we found DeviceCheck that states:
identifying Access per-device, per-developer data that your associated
server can use in its business logic
According to this we get to set two bits per device and a token for server to server verification. Now the question is:
If user uninstalls the app and installs again. will the token remain same?
How would we detect user isn't creating multiple Profiles on same device?
Device Check is the best solution for what you are trying to achieve. The advertising ID can be turned off and reset, and the [[UIDevice currentDevice] uniqueIdentifier] will be reset once the user uninstalls all app from a given developer.
Device Check is the solution Apple has proposed to check whether a device has redeemed an offer, created a previous profile, or simply to check whether the device is an authentic Apple device.
It requires the use of a server to communicate with Apple servers to validate a client generated token. You get two bits you can set. Those two bits are connected to your developer profile, not two bits per app.
keychain is the place where you can store users data securely. Storing data in keychain has one more advantage — in a case when the user decides to remove the app from the device and then he decides to install it again, the data is still saved.
You can also do this by storing a value in the Keychain. It will persist even if the app is deleted and thus you can tell if the app is a new install or a reinstall. So if a value is there in your keychain it is a reinstall otherwise its a fresh install.

How to stop users from using an app over two devices?

I have an iOS application in which i am using Facebook login, and after that phone verification is done which lets the user continue with the app. I ask for phone verification only once when user is being registered.
I wanted to ask if there is any way i can stop users from using the app on two devices? because application records user's footprints(location) and current location, if users use the app on two devices, locations updates will be made by both devices and there won't be any way to tell which location belongs to the user?
Can i use UUID or some other identifier?
You are not allowed to use the UUID. But you can generate a vendor id. But you will need to check if the user already uses on device on some kind of server and let the App ask if it is allowed to run.
But keep in mind that Apple doesn't like such things.
Well, I had to do a similar thing once. The app used to have in app purchase of number of device it can run for a single user. What I did was:
I used to take the UUID of the device while signing in to my app and send it to server.
In my server side database could store the UUID against a user. Whenever a user tries to sign in I used send the UUID with the sign in request.
If the UUID was present then I return success response otherwise I used to check the number of device allowed for this user. If adding this device exceeds the limit then I used to send failure response. Otherwise used to insert the UUID against that user and return a success response.
Suppose if a user deletes the app from a device and want to login from another device. Then display a popup like "Do you want to change the device?" If he/she say Yes then I used to update the UUID and allow him/her to use the app in this device. And every time the app starts (new launch or from background) I used to check the UUID against server's UUID.
You can design your own system but using device UUID gives some extra benefit. like you don't need to store the UUID anywhere and you can rely on its uniqueness.

Is it possible to obtain an unique iCloud user ID on cocoa?

My iOS app is currently on beta in TestFlight, and as a way to retribute to the nice people who helped me test it I would like to offer them some goodies such as, for instance, the full final version of the app for free.
For this, I was thinking of sending them a last beta version which would, automatically and upon execution, store some kind of ID from the logged in user into a VIP list I would keep online and then every next version of the app would check for their ID in order to verify if the user is a VIP user and unlock all the premium features.
Is it possible to obtain in the Cocoa apis a unique identifier that is associated to the user (as opposed to the device unique identifier)? I want this because I want to recognise the user in whatever device he installs it. I would like to avoid having to make my beta testers manually register as VIPs.
Thanks!
Yes, this is possible using CloudKit. You'll need a CKContainer, and you'll ask it to fetch the user record ID. That record ID is unique for your apps, but is also stable for that user this means the same iCloud account will have the same record ID, regardless of which device they're running on or which of your apps they're using.
If you turn on the CloudKit capability for your project, Xcode will automatically create the iCloud container for you, and you can then access it using one of the two CKContainer constructors.

Retrieve Apple ID in Cordova

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.

VPP account - will the user see a badge on the app store if an update is available?

If we distribute an app through an VPP account (Volume Purchase), will the user also get a badge on the AppStore Dashboard icon, if an update is available (like with the 'normal' user accounts?)
There is a comparison table of the VPP features for the three possible distribution paths "MDM User Assignment", "MDM Device Assignment" and "Redemption codes".
The way I understand the table is that automatic updates through the App Store are available if you distribute via redemption codes OR assign the app via MDM directly to the user / Apple ID.
Only if you assign it via MDM directly to a device (no Apple ID required), it will not have a connection to the store and therefore not provide any automatic updates. However, if you have the MDM in place, you push updates through that anyway.
Yes! After about a day — I’m not sure whether it was closer to 24 or 36 hours — every user either got auto-updated or got the badge. It just took a lot longer than you’d think. Thanks for asking — I got the email letting me know to respond or I wouldn’t have remembered to.

Resources