The things about iOS devices

Source: Internet
Author: User
Tags bssid

First recommend a library in use Xyquick address: Https://github.com/uxyheaven/XYQuick

Idfa

How to get [Asidentifiermanager sharedmanager].advertisingidentifier.uuidstring
, general---restore , restore location and privacy users explicitly restore ads (set, general------ about this computer, ADS--Restore AD identifiers)
AppStore ban on IDFA apps that don't use ads
Check the code for the use of IDFA1, open the terminal CD to the root of the file you want to check. 2, execute the following statement: Grep-r Advertisingidentifier.   (Don't lose the last sign).
Since IDFA will not be available, it must not be used as the main ID of the business analysis to identify the user or to use another method to generate the same function identifier stored in the keychain if IDFA does not take it.

IDFV:

How to get [Uidevice currentdevice].identifierforvendor.uuidstring

  

Features: Depending on the value of vendor, the same string is returned if the vendor is the same, or a different string if the vendor is different. Vendor Explanation: English explanation for Sellers, hawkers. According to the Xcode documentation, it is normal to judge according to the data provided by the App Store. However, if the app is not installed through the App Store (such as an enterprise application or development debugging phase), it will be judged based on the bundle ID. Judging criteria: Refer to official note com.example.app1 and COM.EXAMPLE.APP2, only the last suffix is different, so will produce the same vendor ID
If the user uninstalls all apps that belong to this vender, the value of IDFV is reset, that is, the APP,IDFV value of this vender is re-installed and the previous difference

Udid

The full name of Udid is unique device Identifier, which, as its name implies, is the unique identifier of the Apple iOS device, which consists of 40 characters of letters and numbers.
It is often used in many applications where it is necessary to restrict an account to a single device. The udid of the device can be obtained in iOS5, which was later banned by Apple.

Uuid:

UUID is universally unique identifier abbreviation, Chinese meaning is universal unique identification code. It is to allow all the elements in the distributed system to have unique identification information, and do not need to through the central control side to do the identification information designation.
In this way, everyone can create a UUID that does not clash with others. In this case, there is no need to consider the name duplication problem when the database is established. Apple recommends using a UUID to generate a unique identification string for your app. Developers can call once when the app is first launched, and then store the string instead of Udid. However, if the user deletes the app and then installs again, a new string is generated, so it is not guaranteed to uniquely identify the device.

。 However, there is no guarantee that the system will be available after the upgrade (if the system saves the information)

Isjailbreaking:

Mobile phone jailbreak is based on the mobile file directory to achieve, you can use the method provided by Xyquick: [Xysysteminfo Sharedinstance].isjailbroken

  

Isdevicesimulator:

-(BOOL) isdevicesimulator{    struct utsname systemInfo;    Uname (&systeminfo);        NSString *tmpdevstr = [NSString stringWithCString:systemInfo.machine encoding:nsutf8stringencoding];    if ([Tmpdevstr isequaltostring:@ "x86_64"]        | | [Tmpdevstr isequaltostring:@ "i386"]        | | [Tmpdevstr isequaltostring:@ "i586"]) {        return YES;    }        return NO;}

  

Wi-fimac:

Usually refers to the Wi-Fi bssid-(NSString *) wifimac{    nsstring *macip = @ "Not Found";    Cfarrayref MyArray = Cncopysupportedinterfaces ();    if (myArray! = nil) {        Cfdictionaryref mydict = Cncopycurrentnetworkinfo (Cfarraygetvalueatindex (myArray, 0));        if (mydict! = nil) {            nsdictionary *dict = (nsdictionary*) cfbridgingrelease (mydict);            MacIP = [Dict valueforkey:@ "BSSID"];        }    }    if (MyArray) {        cfrelease (myArray);    }    return MACIP;}

Wi-Fi Name:

Wi-Fi name usually refers to Wi-Fi ssid-(NSString *) devicessid{    nsstring *wifiname = nil;     Cfarrayref wifiinterfaces = Cncopysupportedinterfaces ();        if (!wifiinterfaces) {        return nil;    }        Nsarray *interfaces = (__bridge Nsarray *) wifiinterfaces;        For (NSString *interfacename in interfaces) {        Cfdictionaryref dictref = Cncopycurrentnetworkinfo ((__bridge CFSTRINGREF) (InterfaceName));                if (dictref) {            nsdictionary *networkinfo = (__bridge nsdictionary *) dictref;            Wifiname = [Networkinfo objectforkey: (__bridge NSString *) Kcnnetworkinfokeyssid];                        Cfrelease (DICTREF);        }    }        Cfrelease (wifiinterfaces);    return wifiname;}

DeviceName:

-(NSString *) devicename{#if (Target_os_iphone | | Target_iphone_simulator)    return [Uidevice currentdevice].name; #else    return @ ""; #endif}

Freediskspace:

-(NSString *) freediskspace{#if (Target_os_iphone | | Target_iphone_simulator)    NSString *path = [Nssearchpathfordirectoriesindomains (NSDocumentDirectory, Nsuserdomainmask, YES) objectatindex:0];    Nsfilemanager *filemanager = [[Nsfilemanager alloc]init];    Nsdictionary *filesysattributes = [FileManager attributesoffilesystemforpath:path error:nil];    NSNumber *totalspace = [Filesysattributes objectforkey:nsfilesystemfreesize];    return [NSString stringwithformat:@ "%.2FG", [Totalspace longlongvalue]/1024.0/1024.0/1024.0]; #else    return nil;# endif

  

Totalspace:

-(NSString *) totalspace{#if (Target_os_iphone | | Target_iphone_simulator)    NSString *path = [Nssearchpathfordirectoriesindomains (NSDocumentDirectory, Nsuserdomainmask, YES) objectatindex:0];    Nsfilemanager *filemanager = [[Nsfilemanager alloc]init];    Nsdictionary *filesysattributes = [FileManager attributesoffilesystemforpath:path error:nil];    NSNumber *totalspace = [Filesysattributes objectforkey:nsfilesystemsize];    return [NSString stringwithformat:@ "%.2FG", [Totalspace longlongvalue]/1024.0/1024.0/1024.0]; #else    return nil;# endif

  

  

The things about iOS devices

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.