IOS7中的UDID替换

IOS7中的UDID替换,第1张

概述UDID是否有替代方案我的应用程序在我正在使用企业分发时不会去App Store.那有什么替换我绑定广告标识符,打开udid,UIID和安全的UDID.但如果手机被重置,那么我将得到一个新的UDID.任何帮助将不胜感激. 对于6.0以上的iOS,您可以使用identifierForVendor或CFUUIDRef. -(NSString*)uniqID{ NSString* unique UDID是否有替代方案我的应用程序在我正在使用企业分发时不会去App Store.那有什么替换我绑定广告标识符,打开udID,UIID和安全的UDID.但如果手机被重置,那么我将得到一个新的UDID.任何帮助将不胜感激.解决方法 对于6.0以上的iOS,您可以使用IDentifIErForvendor或CFUUIDRef.
-(Nsstring*)uniqID{    Nsstring* uniqueIDentifIEr = nil;    if( [UIDevice instancesRespondToSelector:@selector(IDentifIErForvendor)] ) {        // iOS 6+        uniqueIDentifIEr = [[[UIDevice currentDevice] IDentifIErForvendor] UUIDString];    } else {        // before iOS 6,so just generate an IDentifIEr and store it        uniqueIDentifIEr = [[NSUserDefaults standardUserDefaults] objectForKey:@"IDentifIErForvendor"];        if( !uniqueIDentifIEr ) {            CFUUIDRef uuID = CFUUIDCreate(NulL);            uniqueIDentifIEr = ( Nsstring*)CFUUIDCreateString(NulL,uuID);            CFRelease(uuID);            [[NSUserDefaults standardUserDefaults] setobject:uniqueIDentifIEr forKey:@"IDentifIErForvendor"];        }    }return uniqueIDentifIEr;}//

UPDATE

正如Leon LucardIE所言,他是对的

IDentifIErForvendor will change after app uninstall/reinstall. See here The value in this property remains the same while the app (or another app from the same vendor) is installed on the iOS device. The value changes when the user deletes all of that vendor’s apps from the device and subsequently reinstalls one or more of them.

总结

以上是内存溢出为你收集整理的IOS7中的UDID替换全部内容,希望文章能够帮你解决IOS7中的UDID替换所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1113503.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-29
下一篇2022-05-29

发表评论

登录后才能评论

评论列表(0条)

    保存