Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to ban an iOS user?

Tags:

ios

A while ago, I got banned from an iOS app. Not a user ID ban, but it seems to have been a device ban. Even if I delete and reinstall the app and try to make a new account, it would automatically get banned. My question is, how are they doing this? What are all the possible ways to ban a device that is persistent even after deleting and re-installing the app?

It is not possible to access UDID anymore, so there's that. And I don't think iOS allows them to view iTunes account, so that's not possible. Are they perhaps storing anything in the keychain? From what I know, some things in the keychain don't get removed even if the app is uninstalled.

I'd like to implement something like this in my app, so I want to know all the possible methods, with pros and cons for each.

like image 449
thisiscrazy4 Avatar asked Aug 13 '14 00:08

thisiscrazy4


People also ask

How do I block another iPhone user?

Phone app on your iPhone: In the Phone app, tap Favorites, Recents, or Voicemail, tap the Info button next to the name, phone number, or email address of the contact you want to block, scroll down, tap Block this Caller, then tap Block Contact.

Can you block an Apple ID?

"If you're in Messages, open the conversation, tap the contact at the top of the conversation, then tap . Tap the name, phone number or email address, scroll to the bottom of the screen, then tap Block this Caller."

Can Apple ban a device?

The app can just ban you based on verification token, basically smth like digital signature of your device. No one can get access to read the imei in this case except the app in terms of yes\no.


2 Answers

When the app is uninstalled, all data goes with it. So writing anything to disk isn't going to work.

You can store something in the keychain, although users can edit the keychain if they sync it to a mac. That makes it pretty insecure.

The best option is to store it off the device, in iCloud. I'd go with key/value storage: https://developer.apple.com/library/mac/documentation/General/Conceptual/iCloudDesignGuide/Chapters/DesigningForKey-ValueDataIniCloud.html

Another option you could choose is Apple's replacement for reading the UDID which is to grab the advertising identifier. However it is possible for users to block this in Settings and your app could theoretically be kicked out of the store if it's used for something other than the intended purpose. I don't think it's actively policed, but still probably not a good idea to use it.

A belts and suspenders option would be to do everything:

  • save it to disk (in application support)
  • save it to key value storage in icloud
  • save it to keychain
  • use the advertising identifier to and send it to a remote server that you control (personally I'd skip this to avoid having the app banned from the store)

However... I'm not sure if Apple allows users to be banned. You might well be violating the developer rules by doing so. Especially the last one, which goes something like "this list is incomplete and constantly changing, your app might cause us to add a new rule to the list".

If it's a paid app or has in app purchases I'm pretty sure they would issue refunds to any customer who complains, and they'd probably follow the refund up with kicking your app out of the store.

like image 189
Abhi Beckert Avatar answered Oct 21 '22 19:10

Abhi Beckert


Were I tasked to implement something like this, I would do exactly what you suspect: generate a simple random token, keep it in the keychain, and include it in API requests.

Nothing in the iOS keychain is removed when the app is uninstalled. I don't actually know of a good way to manually remove stuff from it.

like image 2
rgeorge Avatar answered Oct 21 '22 21:10

rgeorge