Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 供应商和苹果拒绝的uniqueIdentifier与Identifier_Ios_Objective C_Ipad_Ios6 - Fatal编程技术网

Ios 供应商和苹果拒绝的uniqueIdentifier与Identifier

Ios 供应商和苹果拒绝的uniqueIdentifier与Identifier,ios,objective-c,ipad,ios6,Ios,Objective C,Ipad,Ios6,我有一个关于uniqueIdentifiervsidentifierforVendor的问题。我们使用UDID进行登录标识,我们正在切换到新的iOS 6版本的forVendor 我的问题是 1) 苹果是否拒绝仍然使用uniqueIdentifier的应用程序? 2) 既然他们不允许第一代iPad升级到6.0,他们又怎么能拒绝呢 PS-还发现供应商的标识在6.0中并不总是有效,看起来它在6.0.1中得到了解决 这是我正在使用的代码。。。你认为它会被拒绝吗 static inline NSStrin

我有一个关于
uniqueIdentifier
vs
identifierforVendor
的问题。我们使用UDID进行登录标识,我们正在切换到新的iOS 6版本的forVendor

我的问题是 1) 苹果是否拒绝仍然使用uniqueIdentifier的应用程序? 2) 既然他们不允许第一代iPad升级到6.0,他们又怎么能拒绝呢

PS-还发现供应商的标识在6.0中并不总是有效,看起来它在6.0.1中得到了解决

这是我正在使用的代码。。。你认为它会被拒绝吗

static inline NSString* UniqueDeviceId() {
    if ([[[UIDevice currentDevice] systemVersion] compare:@"6.0.1" options:NSNumericSearch] != NSOrderedAscending)
        return [[[UIDevice currentDevice] identifierForVendor] UUIDString];
    return [[UIDevice currentDevice] uniqueIdentifier];
}

谢谢,我不能代表苹果评论小组发言。只要你的应用程序支持没有替代版本的iOS,你就不太可能因为使用此不推荐的API而被拒绝

我将更新您的代码以正确检查新方法:

if ([[UIDevice currentDevice] respondsToSelector:@selector(identifierForVendor)]) {
    return [[[UIDevice currentDevice] identifierForVendor] UUIDString];
} else {
    return [[UIDevice currentDevice] uniqueIdentifier];
}

虽然我不能代表苹果审查小组发言。只要你的应用程序支持没有替代版本的iOS,你就不太可能因为使用此不推荐的API而被拒绝

我将更新您的代码以正确检查新方法:

if ([[UIDevice currentDevice] respondsToSelector:@selector(identifierForVendor)]) {
    return [[[UIDevice currentDevice] identifierForVendor] UUIDString];
} else {
    return [[UIDevice currentDevice] uniqueIdentifier];
}

现在,不允许应用程序访问UDID,并且不得使用UIDevice的uniqueIdentifier方法。请更新您的应用程序和服务器,以将用户与iOS 6中引入的供应商或广告标识符相关联

NSUUID *uuid = [[UIDevice currentDevice] identifierForVendor];
NSString *uuidString = [uuid UUIDString];

并且必须添加ADSupport framework

现在不允许应用访问UDID,也不能使用UIDevice的uniqueIdentifier方法。请更新您的应用程序和服务器,以将用户与iOS 6中引入的供应商或广告标识符相关联

NSUUID *uuid = [[UIDevice currentDevice] identifierForVendor];
NSString *uuidString = [uuid UUIDString];

并且必须添加ADSupport框架

感谢您的回复。。。这种方法的唯一问题是,在6.0中,我们发现identifierForVendor有时会返回空白。这是一个错误报告,谢谢你的回复。。。这种方法的唯一问题是,在6.0中,我们发现identifierForVendor有时会返回空白。这里有一个关于这个的bug报告