现在,UniqueIdentifier引起Apple的拒绝 [英] UniqueIdentifier now causing rejections from Apple
问题描述
请不要将其标记为重复项.这个问题是关于 Simperium 及其处理uniqueIdentifier和identifierForVendor的方式.
Please, do not mark this as a duplicate. This question is about Simperium and the way it deals with uniqueIdentifier and identifierForVendor.
Simperium仍在使用
[[UIDevice currentDevice] uniqueIdentifier]
在Simperium.m中.此功能已被弃用,Apple现在完全拒绝使用该调用的应用程序.
Simperium is still using
[[UIDevice currentDevice] uniqueIdentifier]
in Simperium.m. This has been deprecated and Apple is now completely rejecting apps that use that call.
我正在尝试
[[[UIDevice] currentDevice] identifierForVendor] UUIDString];
但我不确定这样做是否会有任何问题.
I am experimenting with
[[[UIDevice] currentDevice] identifierForVendor] UUIDString];
but I am not sure if there would be any problem doing so.
你怎么说?
最好
推荐答案
您还可以使用此方法为您的应用程序获取uniqueidentifier.
You can also use this method for fetching uniqueidentifier for your app.
- (NSString *)createUUID{
NSString *uIdentifier = [[NSUserDefaults standardUserDefaults] objectForKey:@"Unique identifier for test"];
if (!uIdentifier) {
CFUUIDRef uuidRef = CFUUIDCreate(NULL);
CFStringRef uuidStringRef = CFUUIDCreateString(NULL, uuidRef);
CFRelease(uuidRef);
uIdentifier = [NSString stringWithString:(NSString *)CFBridgingRelease(uuidStringRef)];
[[NSUserDefaults standardUserDefaults] setObject:uIdentifier forKey:@"Unique identifier for test"];
[[NSUserDefaults standardUserDefaults] synchronize];
}
return uIdentifier;
}
这篇关于现在,UniqueIdentifier引起Apple的拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!