0

Is there a way to identify a device which was blocked by my app, so they cannot create a second account?

I have read a little bit about Unique Identification and DeviceCheck, Apple's own IPA. I also considered to ask for the phone number when the user signs up, but this seems a little complicated for me and the other solutions only work if the user is kind enough no to reinstall the app.

On other approach I had was to get some information (Carrier, iPhone Name, iOS Version, iPhone Model etc.), pack it into one String and use it as an unique id, but some of this information can be changed easily and I don't think Apple would like this solution.

I am sure that there are better/simpler solutions.

(This task seems very easy in Android. I plan to use this statement: UUID.randomUUID().toString();)

That info could help: I am planning to connect this app to Firebase.

In the best case, the solution would work from iOS 8.0 to the current iOS Version. I am open for any kind of creative solution in Swift or Objective C.

1 Answers1

2

We can achieve this by using SSKeychain. Using SSKeychain once we have set value for particular in the SSkeychain then that value will remain their even we have removed that application from your ios device.

Please check following e.g Objective- C

 if([SSKeychain passwordForService:@"your application bundle identifier" account:@"user"] == nil)
            {
                    NSString *UUID = AppDelegate.GetUUID;
                    [SSKeychain setPassword:UUID forService:@"your application bundle identifier" account:@"user"];
                    NSString *retrieveuuid = [SSKeychain passwordForService:@"your application bundle identifier" account:@"user"];
                    NSLog(@"retrieveuuid %@",retrieveuuid);
            }
    + (NSString *)GetUUID {
            CFUUIDRef theUUID = CFUUIDCreate(NULL);
            CFStringRef string = CFUUIDCreateString(NULL, theUUID);
            CFRelease(theUUID);
            return (__bridge NSString *)string;
    }
Faysal Ahmed
  • 7,501
  • 5
  • 28
  • 50
Hemant Sabale
  • 317
  • 2
  • 13