spotify - libspotify 导致苹果应用商店拒绝

标签 spotify cocoalibspotify-2.0 libspotify

看来 Apple 从 5 月 1 日起收紧了应用程序商店提交。我有一个使用 Spotify 的应用程序,并且已多次被 App Store 接受。在最近的更新中,该应用程序因以下原因被拒绝...

Non-public API usage:
Apps are not permitted to access the UDID and must not use the uniqueIdentifier method of UIDevice. Please update your apps and servers to associate users with the Vendor or Advertising identifiers introduced in iOS 6.

在 libspotify 上执行以下操作

strings libspotify | grep uniqueIdentifier

返回了 3 个 uniqueIdentifier 实例。另一篇帖子指出,这可能是由于 openSSL 造成的,可能与 UDID 无关。然而,苹果拒绝了该代码。有解决办法吗?

最佳答案

这里有一个 Cr4zY 快速修复,仅当您非常着急时才使用(就像我现在一样,要么发货,要么死!)...

使用像 0xED http://www.suavetech.com/0xed/ 这样的工具将 libspotify 二进制文件中的 uniqueIdentifier 部分更改为 uniqueXdentifier 之类的内容。 (注意!必须具有相同的长度,否则会很难折断!!!)

然后为 UIDevice 添加一个类别方法,即在您的项目中像这样(使用与更改为相同的名称)

static NSString *alternativeUniqueIdentifier = nil;

#define DEFAULTS_KEY @"heartbreakridge" // "Improvise, adapt, overcome" - Clint Eastwood in DEFAULTS_KEY

@interface UIDevice (CrazyFix)
- (NSString *)uniqueXdentifier;
@end

@implementation UIDevice (CrazyFix)

- (NSString *)uniqueXdentifier
{
    if (!alternativeUniqueIdentifier) {
        @synchronized(self) {
            alternativeUniqueIdentifier = [[NSUserDefaults standardUserDefaults] stringForKey:DEFAULTS_KEY];
            if (!alternativeUniqueIdentifier) {
                // XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX (capital hex)
                CFUUIDRef uuidRef = CFUUIDCreate(kCFAllocatorDefault);
                CFStringRef uuidStringRef = CFUUIDCreateString(NULL, uuidRef);
                CFRelease(uuidRef);
                alternativeUniqueIdentifier = [(NSString*)CFBridgingRelease(uuidStringRef) lowercaseString];
                alternativeUniqueIdentifier = [alternativeUniqueIdentifier stringByReplacingOccurrencesOfString:@"-" withString:@""];
                alternativeUniqueIdentifier = [NSString stringWithFormat:@"%@%@", [alternativeUniqueIdentifier substringToIndex:8], alternativeUniqueIdentifier];
                [[NSUserDefaults standardUserDefaults] setValue:alternativeUniqueIdentifier forKey:DEFAULTS_KEY];
                [[NSUserDefaults standardUserDefaults] synchronize];
            }
        }
    }
    return alternativeUniqueIdentifier;
}

@end

关于spotify - libspotify 导致苹果应用商店拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16433621/

相关文章:

ios - 在 ios 上动态加载 libspotify

spotify - 在 spotify 上放慢和循环播放部分歌曲

ios - 从其他应用程序获取用户事件信息

ios - Spotify 的 iOS SDK 教程出错

cocoa - Spotify 和 cocoalibspotify 应用程序是否共享一个通用的离线文件存储库?

java - 拦截 Spotify 好友信息流?

python - pyspotify 的问题

ios - Swift 的 Spotify API

ios - 正确设置 CocoaLibSpotify?

javascript - 我可以使用第 3 方 Spotify 移动应用程序的 Web API 和播放按钮小组件吗?