UniqueIdentifier now causing rejections from Apple [duplicate]

╄→гoц情女王★ 提交于 2019-12-02 22:11:27

问题


Please, do not mark this as a duplicate. This question is about Simperium and the way it deals with uniqueIdentifier and identifierForVendor.

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.

I am experimenting with [[[UIDevice] currentDevice] identifierForVendor] UUIDString]; but I am not sure if there would be any problem doing so.

What do you say?

Best,


回答1:


According to Apple documents identifierForVendor can be used from iOS 6.0 and later so no issues in using identifierForVendor




回答2:


It is should work. Because they say

"While you may have removed access and usage of UDIDs from your app, the invalid binary message indicates that your app uses or accesses UDIDs. Please check your source code for any occurrence of the "uniqueIdentifier" method; this is the method that returns a device's UDID."

So it is only matter of using "uniqueIdentifier" method.

Thanks




回答3:


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;

}



来源:https://stackoverflow.com/questions/16602684/uniqueidentifier-now-causing-rejections-from-apple

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!