APP版本号:NSString *AppVersion = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
手机系统版本号:NSString *IPhoneVersion = [[UIDevice currentDevice] systemVersion]];
系统名称:NSString *systemName = [UIDevice currentDevice].systemName;
当前国家:NSString *currentCountry = [[NSLocale currentLocale] objectForKey:NSLocaleCountryCode];
设备型号:NSString *deviceName = [self getDeviceName];(首先声明#import"sys/utsname.h")
手机用户名称:NSString *iPhoneName = [UIDevice currentDevice].name;
设备上次重启的时间:NSTimeInterval time = [[NSProcessInfo processInfo] systemUptime];
IDFA与IDFV适用于那些情况?
IDFA在这两种情况下会被重置(默认是允许的,检测推广效果是可以的):
1. 设置程序 -> 通用 -> 还原 -> 还原位置与隐私
2.设置程序-> 通用 -> 关于本机 -> 广告 -> 还原广告标示符
IDFV会在用户卸载了同一个vendor对应的所有程序,然后在重新安装同一个vendor提供的程序,此时identifierForVendor会被重置。vendor是CFBundleIdentifier(反转DNS格式)的前两部分。
个人建议:如果不绑定用户数据,仅仅区分设备量两者都可用。如果绑定用户收据建议使用IDFV,因为IDFA可以被用户重置,会造成多个用户信息混乱。