libspotify导致Apple App Store拒绝 [英] libspotify causing Apple App store rejection

查看:159
本文介绍了libspotify导致Apple App Store拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

Looks like Apple has tightened app store submissions staring May 1. I have an app that uses Spotify and have been accepted into the App Store multiple times. On a recent update, the app was rejected for the following reasons...

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

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上执行以下操作

Doing the following on libspotify

strings libspotify | grep uniqueIdentifier

返回了3个uniqueIdentifier实例.另一篇文章指出,这可能是由于openSSL造成的,可能与UDID无关.但是,Apple拒绝该代码.有解决方法吗?

returned 3 instances of uniqueIdentifier. Another posting stated that this is probably due to openSSL and may have nothing to do with UDID. However, Apple is rejecting the code. Is there a work-around?

推荐答案

这是一个 Cr4zY 快速修复程序,仅当您急于使用时才使用(例如,我现在在,船还是死!) ...

Here is a Cr4zY quick-fix, use only if you are in a real hurry (like I am right now, Ship or Die!)...

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

Use a tool like 0xED http://www.suavetech.com/0xed/ to change the uniqueIdentifier parts in the libspotify binary to something like uniqueXdentifier. (Note! Has to have same length or it will break hard!!!)

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

Then add a category method for UIDevice i.e. like this in your project (using same name as was changed to)

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

这篇关于libspotify导致Apple App Store拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆