アプリを iTunes Connect に送信しているときに、この問題に直面しています。
このリンクを試しましたが、役に立ちませんでした。
ご意見をお聞かせください。ありがとう!
Apple のガイドラインによると、advertisingIdentifier を使用する必要があります。iOS 5 で動作しない問題。このコードを自由に使用してください。
- (NSString *) advertisingIdentifier
{
if (!NSClassFromString(@"ASIdentifierManager")) {
SEL selector = NSSelectorFromString(@"uniqueIdentifier");
if ([[UIDevice currentDevice] respondsToSelector:selector]) {
return [[UIDevice currentDevice] performSelector:selector];
}
//or get macaddress here http://iosdevelopertips.com/device/determine-mac-address.html
}
return [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];
}
UDID は廃止され、使用が許可されなくなりました。UUID を使用する必要があります。
UDID と比較して、欠点と利点があります。
- (NSString *)uuidString {
// Returns a UUID
CFUUIDRef uuid = CFUUIDCreate(kCFAllocatorDefault);
NSString *uuidStr = (__bridge_transfer NSString *)CFUUIDCreateString(kCFAllocatorDefault, uuid);
return uuidStr;
}