Answers to unity and ios - get user's phone number ( 3 )

  1. 2016-11-30 13:11

    I think the only info you can get is the identifierForVendor.

    The identifier for vendor is :

    An alphanumeric string that uniquely identifies a device to the app’s vendor.

    Not Sure you can do this in Unity.

    Objective C code to do it is :

     UIDevice *device = [[UIDevice alloc]init];
     NSString *idForVend = [NSString stringWithFormat:@"%@", [device identifierForVendor]];
     NSLog(@"%@",idForVend);
    

    If you want to get more info about the user, you should ask him to fill out forms field in your app. Then your app can send back the info to you.

    Hope this can help you.

  2. 2016-11-30 14:11

    You cannot take IMEI and phone number of user mobile, Apple is restricted to get these uniqueID's.

    You have to store UDID in keychain. for this you have to download keychainwrapper class and store the UDID generated by above code:

    UIDevice *device = [[UIDevice alloc]init]; NSString *idForVend = [NSString stringWithFormat:@"%@", [device identifierForVendor]]; NSLog(@"%@",idForVend);

    follow this link it will solve your problem for sure: How to store a string in KeyChain , iOS?

  3. 2016-11-30 14:11

    Unfortunately, you can NOT get anything like IMIE number or Phone number from iOS any more if you want to submit app to App Store. There is not any public api available for this.

    You can get carrier info like carrierName, country code, network code- but these are not unique to device.

    You can check what information available from UIDevice from : https://developer.apple.com/reference/uikit/uidevice

    To check what you can get from core telephony https://developer.apple.com/reference/coretelephony

    To check what you can get from System Configuration: https://developer.apple.com/reference/systemconfiguration

Leave a reply to - unity and ios - get user's phone number

◀ Go back